Автор KAN, 8 лет назад, По-русски

Всем привет!

Завтра, 29 апреля 2018, в 16:05 по московскому времени состоится третий раунд чемпионата VK Cup 2018. Это заключительный онлайн-раунд чемпионата, дальше — только финал, в который пройдут 20 команд! За шанс пройти в финал завтра сразятся 120 команд: 100 из них вышли в раунд из раунда 2, а 20 — по результатам второго уайлд-кард раунда, который завершился лишь несколько дней назад.

Параллельно с официальным раундом мы, как обычно, проведем неофициальные трансляции отдельно для первого и второго дивизионов. Присоединяйтесь!

Также обращаем ваше внимание, что участники всех команд, прошедших в Раунд 3 (независимо от их участия или неучастия в Раунде 3 или в его трансляции), получат фирменную футболку Чемпионата. Помимо этого, фирменной футболкой будут награждены топ-50 участников интернет-трансляции для первого дивизиона!

Все раунды будут рейтинговыми и продлятся 2.5 часа.

Авторы раунда — Zlobober, Endagorion и я. Спасибо qwerty787788 и vintage_Vlad_Makeev за помощь в подготовке раунда!

Удачи!

Поздравления победителям!

  1. Нижний Магазин SU: BZ: V--o_o--V, LHiC — решили все задачи с отрывом в две задачи!
  2. ИТМО 2.0: craborac, demon1999
  3. 120 Minutes Adventure: el_sanchez, SpyCheese
  4. Кекс столичный: Melnik, hloya_ygrt
  5. Z: egor_bb, Nikitosh

Зеркало для первого дивизиона:

  1. fateice
  2. Petr
  3. tourist
  4. budalnik
  5. TLE

Зеркало для второго дивизиона:

  1. _ChenKerui
  2. Hayven
  3. poisonous
  4. Gold_Three_Fat
  5. laofudage

Разбор скоро тут, всем спасибо за участие!

  • Проголосовать: нравится
  • +275
  • Проголосовать: не нравится

»
8 лет назад, скрыть # |
 
Проголосовать: нравится -11 Проголосовать: не нравится

Parallel rounds, yeah! Hope translation of this round would be better.

»
8 лет назад, скрыть # |
Rev. 3  
Проголосовать: нравится 0 Проголосовать: не нравится

Oh, 3 Consecutive Div-2 Rated contest in three consecutive days,

Its really amazing.

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Hope problem statements are clear and concise as the announcement!

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +30 Проголосовать: не нравится

That happiness you get when you are going through your boring and monotonous life but you notice that codeforces added a new contest!

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +7 Проголосовать: не нравится

Happiness is having codeforces round in 3 consecutive days. :D

Thanks a lot to the Codeforces team and the authors. :D

»
8 лет назад, скрыть # |
Rev. 3  
Проголосовать: нравится +9 Проголосовать: не нравится

registration of Educational Codeforces Round 43 can be closed till the system testing of this round ?!

because anyone will become Div.1 in this round, the Educational Round will be rated to him as a Div.2 participantes (it's already done before)

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

CodeJam and Codeforces round in the same day. This will be challenging :D

»
8 лет назад, скрыть # |
Rev. 4  
Проголосовать: нравится +86 Проголосовать: не нравится
»
8 лет назад, скрыть # |
 
Проголосовать: нравится +18 Проголосовать: не нравится

How many problems are there, and what's the score distribution?

»
8 лет назад, скрыть # |
 
Проголосовать: нравится -56 Проголосовать: не нравится

Too close to Code Jam 1B round :(

»
8 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +51 Проголосовать: не нравится
»
8 лет назад, скрыть # |
 
Проголосовать: нравится +53 Проголосовать: не нравится

Score distribution?

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +21 Проголосовать: не нравится

How many problems will be there?

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +18 Проголосовать: не нравится

delayed...

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +49 Проголосовать: не нравится

Please dont delay the contest. There's codejam today.

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +34 Проголосовать: не нравится

Delayed by 10 minutes. So now I have just 15 minutes for dinner before Code Jam. :(

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +20 Проголосовать: не нравится

tourist is back!!!

»
8 лет назад, скрыть # |
 
Проголосовать: нравится -26 Проголосовать: не нравится

Large number of hacks in Div.1 A.

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +9 Проголосовать: не нравится

World champions got first place here too !

»
8 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +8 Проголосовать: не нравится

I sure am curious about the quality of system tests for D. I have a solution without proof that it works, but I sure made it hard to break without specifically breaking exactly this solution.

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +16 Проголосовать: не нравится

How to solve C/Div1 ?

  • »
    »
    8 лет назад, скрыть # ^ |
     
    Проголосовать: нравится +1 Проголосовать: не нравится

    The condition for increasingness is "when xor-ing X with bi such that the highest set bit of bi is the d-th, the d-th bit of X must be 0". Therefore, we can group bi-s by the highest set bit.

    We can go from the highest to the lowest bit d and build the final sequence by merging everything with a given highest set bit with the sequence obtained in the previous step. We can't break that previous sequence this way and we only need to stuff the new bi-s at the beginning / after each 1 as the d-th bit; whether this is possible doesn't depend on what we did before.

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +12 Проголосовать: не нравится

Answer cant be more than 5 in D right?

  • »
    »
    8 лет назад, скрыть # ^ |
     
    Проголосовать: нравится +26 Проголосовать: не нравится

    I've proved that it's always smaller than or equal to 5, or no solution exists.

  • »
    »
    8 лет назад, скрыть # ^ |
    Rev. 6  
    Проголосовать: нравится 0 Проголосовать: не нравится

    There are two cases(excluding the trivial ones when you can go to n using a short simple path):

    1) If the connected component of 1 in the original graph is not a complete graph, we can go 1->a->x->1->n, where x is not connected to 1 in original graph, but a is.

    2) If connected component of 1 is a complete graph not a triangle, we can go 1->x->y->z->x->1, where all x, y, z are in a's component. EDIT : This is incorrect.

    • »
      »
      »
      8 лет назад, скрыть # ^ |
       
      Проголосовать: нравится 0 Проголосовать: не нравится

      On the second case, why can I go from z to x? Doesn't that edge erases when I visit x?

    • »
      »
      »
      8 лет назад, скрыть # ^ |
       
      Проголосовать: нравится +5 Проголосовать: не нравится

      In case (2) won't the z->x edge be removed when we go x->y?

    • »
      »
      »
      8 лет назад, скрыть # ^ |
       
      Проголосовать: нравится 0 Проголосовать: не нравится

      I think the second case should be: 2) If connected component of 1 is a complete graph, and n is not in it, then answer is -1. And also case 1) is not correct. We can have a path of length 5, ig the connected component of 1 is not complete. So, if we could not found a way as described above for the first case ( 1->a->x->1->n, where x is not connected to 1 in original graph, but a is.), we can find a way (1->x->y->z->x->1) where x, y, z are in the connected component of 1, and we have the edges 1-x, 1-y, 1-z, but we don't have z-x. I have got it accepted using these changes

      • »
        »
        »
        »
        8 лет назад, скрыть # ^ |
         
        Проголосовать: нравится +15 Проголосовать: не нравится

        Ok so I can detail a bit more (sorry for the late reply, I was doing GCJ). There is no solution if and only if all nodes except 1 from 1's component are directly linked to 1 and, removing 1 from its component you're left only with cliques (all the components are complete). Broadly speaking, my solution was something like:

        Consider the optimal solution x1, x2, .., xK. Either they are all distinct which means the edges should be those from the initial graph, or at least 2 are equal. Let j be the smallest index for which you also have i<j so that x[i] = x[j]. The thing is that from the minimality of the sequence, you know that you couldn't have ended it earlier so none of x[1], x[2], .., x[j — 1] had a direct link to N. Also from the minimality of j, you know x[1], x[2], .., x[j — 1] are all distinct. Buut then x[j] = x[i] comes. x[i] didn't use to have a link to N, and after first traversing it, it does, so when we're at x[j]=x[i], we have a link to N (and it's obviously optimal to follow it). So either all elements are distinct and you choose the shortest path to N (if any) or j = K and x[i] = x[j] are the first and only pair of equal numbers. Also for the x[i] = x[j] thing to exist, you must have an edge from x[j — 1] to x[j] = x[i] at the point when you travel between the two, which means that you didn't have an edge from x[j — 1] to x[i] in the initial graph (cause x[i]'s edges flipped when you first went through it)

        1) Direct link 1->N? Obvious solution

        2) A direct path from 1 to N of length 2 or 3? Definitely optimal, cause you can't get any better by doubling a node (you'd need 1 x y 1 N in the best case for a node-doubling option)

        3) Does the component of 1 also include a node that is not directly connected to 1? Then there must be a node at distance 2 as well (you can get it through bfs). You can then obtain 1-x-y-1-N which has length 4, definitely optimal

        4) All nodes in 1's component are directly linked to it. Delete 1 from its component and now you may assume that you can start from any point. Since you can start from any point and you want to minimize j so that x[j] = x[i], you may choose i = 1, x[j] = x[1] (why not, there's no use into delaying the occurrence of that thing, provided you can start anywhere). If all components are cliques, you definitely can't do anything, cause as I said for that double node to exist there must be 2 vertices x[j — 1] and x[j]=x[i] which don't have an edge in the initial graph, and since it's impossible to find that here, you have no solution. If at least one pair of nodes S, T exists where S and T are connected (provided you erased 1), You may run a bfs from S, and find at least one node T' at distance 2 (since from the existence of T, you know they are not all linked to S). Then you may have the following path 1-S-midNode-T'-S-N which has length 5, again optimal.

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

what is the hack for div1 A?

»
8 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +138 Проголосовать: не нравится

![ ]()

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +11 Проголосовать: не нравится

What is pretest 11 in Div1D?

  • »
    »
    8 лет назад, скрыть # ^ |
     
    Проголосовать: нравится +10 Проголосовать: не нравится

    I am guessing it is: one's connected component is a triangle, not containing n. Answer is -1 then. BTW, Is the answer always <= 5?

    • »
      »
      »
      8 лет назад, скрыть # ^ |
      Rev. 3  
      Проголосовать: нравится 0 Проголосовать: не нравится

      My code works on this test case, but probably something similar fails it.

      And yes answer is always smaller than 5 if not  - 1, if 1 N is closed, and there is a vertex u at distance = 2 from 1, then the edge 1 u is intially closed, and opens once you leave 1, so you can travel from 1 to u to 1 to N.

      EDIT: This is wrong, see my other comment.

  • »
    »
    8 лет назад, скрыть # ^ |
    Rev. 2  
    Проголосовать: нравится 0 Проголосовать: не нравится

    I got WA on the same pretest. My solution was to do a DFS for paths of length no more than 3. If we are able to reach N than that is the solution. Otherwise if there is a path of length 2 from 1 to some other node X, then we can go from X to 1 (because the tunnel is now open) and then from 1 to N.

    What is the flaw in this logic?

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +139 Проголосовать: не нравится

Hate rounds with so many hacks. What's sad is that there are some people who treated that case, but treated it wrong (one of my few hacks was on a poor guy who was printing y1-y2, provided y1<y2). It sucks to let this kind of things happen

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +32 Проголосовать: не нравится
if(r1==r2) {
    printf("%d\n", abs(c1-c2));
}

Forgot the "continue;" in Div1-A :D :D

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

How to solve div1A? binary search + greedy? min(only run, min(take nearest elevator(left), take nearest elevator(right)))?

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Can O(n sqrt log log ) pass div 1 E? Or can someone show me a better solution?

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

How to solve Div1B/Div2D?

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

How to solve div2 D / div1 B ?

  • »
    »
    8 лет назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    Sort the array elements in pairs(ar[i],i). Now assuming each array element of the sorted array s_ar[i] as the minimum element for two types of services separately, find j so that (j-i+1)*s_ar[i].first >= x1 and store in cal[i] for 1st type and similarly store for 2nd type in val[i] . Now check if there exists i<cal[i]<j<val[j] or i<val[i]<j<cal[j].

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Can O(m sqrt(n) log(n) log(sqrt(n)) solution pass Div 1 E?

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

I liked this contest a lot, the problems that I tried all seemed (particularly Div2D) were really interesting to think about but at the same time not all that hard to implement. Great job to writers! (Although div2 A was a bit hard)

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Can someone tell me why this solution for Div 1 — C : http://codeforces.me/contest/966/submission/37727089 is giving me tle. It is a O(n * 60) solution.

»
8 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +10 Проголосовать: не нравится

What happened with D in official round? UPD: everything is okay now.

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

The night of failing system test... I just wanna cry.

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +195 Проголосовать: не нравится

Cheater exposed.

![ ](abc)

»
8 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +3 Проголосовать: не нравится

What the heck!!! in Div2C?

»
8 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

Div-2-D

1st testcase :

6 8 16

3 5 2 9 8 7

output:

YES

2 2

2 6

5 4

Whats wrong here???

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Объясните, пожалуйста, у каких раундов есть дорешивание, а у каких — нет?

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

Explain me, please, which rounds have got "practice" and which — hasn't?

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I don't understand why there is so few submissions for div1 D. It is just simple case analysis

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

How to solve Div1E?

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +34 Проголосовать: не нравится

last tshirt wowoowoooowow

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Got WA on pretest 7 for problem C Div.2, does anyone know what this case was? My approach as just print abs(y1-y2) if on the same floor, otherwise binary search for closest elevator and for closest stairs and print the minimum of the two.

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +18 Проголосовать: не нравится

куда делся чел со 2 места?

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Can anybody help me why my solution to problem c of DIV2 failing 8th test case. Actualy it is giving output in exponential form which I am unable to understand why?.Any kind of help would be appreciated. submission link

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +10 Проголосовать: не нравится

for div 1 C i chose greedily the minimum value with which we should xor so that we can find the next value in a which is greater than the previous value. I used trie with deletion. Here is the code . http://codeforces.me/contest/967/submission/37730673. Why doesnt it work ?

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +70 Проголосовать: не нравится

You can assume you don't have to wait for an elevator

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +16 Проголосовать: не нравится

Обманули нас с разбором...

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +10 Проголосовать: не нравится

A good contest.But it has too long background for its problem.

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

Damn, my solution got hacked just because I missed one = sign in comparison! This is gonna be a good lesson for me! :-(

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Можете подкинуть маленькие тесты для wa8 в С и wa38 в D)) див 2 конечно. Спасибо!

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +17 Проголосовать: не нравится

Problem B greedy , Problem C greedy , Problem D greedy , Problem E greedy

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I do not konw how to solve the "Aztec Catacombs", so, when there can be answer

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

When will be my T-shirt for the 3 Round? I received a letter for address clarification three monthes ago and nothing after it, whereas my friends have received their T-shirts. Whom could I connect with about it?