Блог пользователя craus

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

Всем привет!

В среду 9 декабря в 19 MSK будет CF Round #335 (div 1 + div 2) по задачам, сделанным мной и dalex. Идёмте его играть!

Благодарим GlebsHP за помощь в подготовке задач, Delinur за перевод и MikeMirzayanov за сам Codeforces.

Систему подсчета баллов и их распределение вы узнаете вместе с началом раунда. Все равно эта информация не несет особого смысла, пока контест не начался.

Всем полных решений и успешных взломов!

UPD. Поздравляем победителей Div. 2:

weiszago

Invisble

nezametdinov

И Div. 1:

jqdai0815

Um_nik

Egor

Разбор: blog/entry/22019.

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

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

сыграйте катку без меня.

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

Aaaaaaand the excitement starts again !!! :))

UPD.

This's my feeling after the down voting .. and I must admit it really hurts

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

    I think that now you're like this little boy.

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

      After the down voting ? .. yes. :)

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

        Something that I want to mention here that I don't like it when I've a negative impact on the community that I'm part of. But sometimes you can't avoid it specially when you're a beginner like me .. and finally no one learns for no price.. and down voting is the price here ! :D

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

Круто! Начинается на 30мин. раньше.

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

Cows give a lot of fame. Why? Because:

  • 3 1/2 hours before the previous contest (the one about cows): ~75 comments to the announcement (I really counted them).

  • 3 1/2 hours before this contest: 7 comments to the announcement.

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

I think one must comment for his/her help or other discussion. Not to get the upvote or downvote

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

Thanks to the contest notification message system too... :)

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

Is there a way to know if you have already voted on a blog?

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

hope the questions are as short as blog is

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

"Wish you accepted solutions and successful hacks!" sarcastic :P

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

Good Luck Everyone, the time is too late for eastern countries

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

Registered before the contest and appeared as registered right before it began. Once it started, I saw I can't submit any solution and went back to see , to my surprise, that I no longer appear as a participant. I guess I'm reporting a bug :-?

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

    The author had actually protected you from that difficult tasks. You should be happy, though!

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

Anyone finding the statement for Div2-B hard ? :( :(

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

    Not able to understand problem div2 B.

    Please explain output at least.

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

      I asume, that we must go step-by-step by commands to the robot. I think, that if you already was in this cell, you need to cout 0, else — 1. Last number is x*y-(number of couted 1), but i also have understood this problem only few minutes ago and this is my solution that come to my mind suddenly.

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

      Problem B is basically asking how many slots were visited before or not, and at the end how many were not visited yet.

      The key lies in the first paragraph when it says X*Y experiments are being made; one for each slot.

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

      You have a robot. This robot starts at position (x0, y0). There are various scenarios (one for every cell in the field). In one scenario, there is exactly one mine in a unique cell. So if the field is of size 3 * 4.

      X...
      ....
      ....
      
      .X..
      ....
      ....
      
      ..X.
      ....
      ....
      

      And so on are the scenarios, where "X" means that there is a mine right there, and "." means a empty cell.

      Your robot is given a sequence of "moves", and you have to tell, for every "move", in how many scenarios your robot will explode after that move.

      In the first testcase:

      ....
      .R..
      ....
      

      Is the map without any mine.

      How many scenarios are in which the robot explodes doing 0 moves?

      Just one, the one in which the mine is at the position of the robot.

      How many scenarios are in which the robot explodes doing 1 moves?

      The first move is to go up. So the only scenario in which the robot will explode after going up, is the scenario in which there is a mine in the cell (1, 2) (1-indexed).

      How many scenarios are in which the robot explodes doing 2 moves?

      The second move is to go up again, but the robot can't go up, so it stays at position (1, 2) and there is no scenario in which it will be blown up, because if there were a mine at position (1, 2) the robot would have explode in the last move, when it first got to that field.

      And you have to keep this process, for the last move, the robot will explode anyways, so you have to count the number of scenarios in which there is no mine in the path to the final field. Sorry for the english, I hope this can help.

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

    I know what is means, but can you implement it now...

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

    I came here for exactly this. I reach 90 percent of it. And the rest just doens't make sense

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

Too hard for me :(

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

Wtf. Get TLE with an optimized O(nlogn) solution in Div 1 B if I use GNU C++, but Pretests Passed if I use MS C++. Why??

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

Div 2 A

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

in div2 D is the graph directed...because otherwise no loops dont make sense??

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

Div2B's statement is a little confusing, that's why there are more people doing C than B.

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

Oh My Gods!!!! D is so easy :D . No time to implement. Yay! figured D during contest

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

    Sort edges. If 1st and 2nd one are 0, outpu -1, else add this edge to make a cycle in already made tree so far, using 1-edges

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

      Since no body upvoted my approach, kinda doubting it now.... hmmm it sounded like kruskal's algorithm though

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

        There is really sorting. But the algorithm is harder than you wrote.

        Test case:

        4 5
        1 1
        2 1
        3 0
        4 0
        5 1
        

        The answer is -1. You cannot make such graph.

        My solution: First, sort the edges by weight, and if the weights are simillar, edges with b[j] = 1 will be eariler than with b[j] = 0

        We must have add variable, which contatins the current size of the graph.

        Then, do the following thing: 1). If the vertex is in the tree, locate add with add + 1 and increase add by 1. 2). If the vertex isn't in the tree, we try to locate some vertexes in our graph, which is not located. We cannot also add new vertexes using this edge (remember that we have a graph with vertexes [1 .. add]). If it is impossible, print -1.

        It can be proved by Kruskal algorithm.

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

          Hmm....since multiple edges are not allowed. So you must keep track of theno. of possible cycles you can make uptil a 0-edge is found.

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

    It is not that hard, but it is definitely harder than A, B (except the statement reading :) and C :)

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

      But, is my approach correct?

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

        I don't really get what you mean, so can't say ) Seems close to what I've done, but not sure of your description.

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

          Reversed Kruskal's algo. If a smaller edge is not included but a bigger one is, then that smaller edge(0 egde) must've been part of a cycle in a graph using the edges that are even smaller.

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

            Sounds right. I've done the same thing:

            Put the first included ones (2). Loop for others.

            If one in included, put it in connecting new vertex. If not, check for the free place in current graph and put it there. If no free place = -1.

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

I have not seen a more confusing problem statement than of B.

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

    Yeah I am still curious what they were asking. I can't imagine many non-Russians submitted for it.

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

      If you make k moves, answer = 1 for that k if k-1th move didn't land in the same square, else answer for k=0. If k is the last in the string, pretty much any move will destroy it, so, all neighboring cells+the cell it is on at k-move is the answer for the last k.

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

      Well, I'm russian, but it wasn't an easy statement for us too :)

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

      Imagine the grid is full of bombs at first. The robot does X * Y tests. In the first try, it's obvious that he is gonna explode, since there is a bomb in the source point (he took no instruction, so k = 0). In the second one, the bomb that was on the source point is not that anymore, so he can take one instruction. If he walks to some position different from the one he is at, he is gonna explode. If he stays in source point he won't explode (k = 1). Keep doing this. The answer for k = s.size() is simply the total of tests (X * Y) minus the times he exploded in the other tests (since the path was out of bombs).

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

Кто-нибудь умеет ломать симплекс в С?

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

    Меня взломали на контесте, когда я не делал random_shuffle. Перепослал в дорешивании с random_shuffle — прошло за 124мс.

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

      Да я видел твой сабмит и сильно удивился, что тебя взломали. Странно, этот тест подобрали конкретно к твоему решению?

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

        Тест начинается так:

        100000 1000000 1000000
        1 100000
        2 99999
        3 99998
        4 99997
        5 99996
        6 99995
        7 99994
        8 99993
        9 99992
        ...
        

        Видимо, из-за каких-то особенностей конкретно той реализации что я использовал, она ТЛит на тестах такого вида.

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

In problem 'D' it should be written as "no self loop" as far as i learned.

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

    it is already written in the output section that u != v. Please read the problem statement carefully.

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

      And problem statement clearly said that- Vladislav drew a graph with n vertices and m edges containing no loops and multiple edges.,
      I mean if we combine "u!=v" and the above statement then this problem becomes something else. So what nighthowler said makes sense.
      UPD: Looks like i messed up "loop" with "cycle" in graph. Thanks to Swistakk for correcting.

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

        No, it doesn't. "Loop" in graph theory doesn't have any other meaning than "self-loop".

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

In C, Can the optimal answer have more than two types of projects?

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

    No.

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

      Why?

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

        C is a linear programming problem.

        minimize sum{xi}

        subject to sum{ai xi}>=p, sum{bi xi}>=q and xi>=0.

        To make it the standard form, we need to introduce two variables y and z. Then it becomes:

        minimize sum{xi}

        subject to sum{ai xi}-y=p, sum{bi xi}-z=q and xi, y, z>=0.

        The optimal solution of a linear programming problem can only be reach at extreme points of the feasible region. And extreme points must be solution to a linear equation system which has only one solution and is formed by some of sum{ai xi}-y=p, sum{bi xi}-z=q, xi=0, y=0, z=0. Since there are only two equation is not in form "x = 0", the extreme points can only have two nonzero components, i.e., optimal answer can be reach even if we don't used more than two type of projects. However, there are also optimal solution which is not reached at extreme points. So, the answer to the question should be YES. For example, ai={1,2,3}, bi={3,2,1}, {p,q}={2,2}. We can work on each project 1/3 day to get (2,2).

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

    Well, "can" but not necessary. It only occurs when there are more than two points lie on the same line.

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

I spent a lot of time to understood the statement? My English too poor?

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

This round is very interesting. I had lots of fun, even it is 2 AM here.

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

А какая задача была НЕ баяном?)

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

    пруф или не было!

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

      Задачу А я хотел дать на свой контест, но Zlobober сказал, что это баян и мы не будем ее давать. В итоге я скопипастил задачу из полигона.

      Задача B может и не баян в явном виде, но идея абсолютно не свежа.

      Задача C — стопудово баян с миллионом вариаций.

      Задача D — аналогично B.

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

        Чет мутный пруф какой-то. Но разбираться лень, поэтому гордо заявлю: согласно последним данным, не баян у нас Е!

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

          Что-то похожее на Е тоже уже видел несколько раз. Про задачи A и C savinov прав, особенно задачи похожие на C последнее время часто были (например, похожая задача была на контесте МГУ в Петрозаводске примерно год назад, называлась Ito).

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

          C — VkCup финал, задача "Макс Мин". Код оттуда отлично подошел

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

            Действительно, к задачам, где надо найти выпуклую оболочку, отлично подходит код нахождения выпуклой оболочки. И что?

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

Ok, how do you solve Div 2 — A? I have never had so much trouble with an A before D:

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

    let input be a1,a2,a3 and x1,x2,x3
    if a>x then remain + (a-x)/2
    else remain — (x-a)
    yes if remain >= 0

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

      et input be a1,a2,a3 and x1,x2,x3 if a>x then remain + (a-x)/2 else remain — (x-a) yes if remain >= 0

      Sorry, I didn't understand that at all.

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

      Why not remain == 0 but remain >= 0 my solution hacked I write remain == 0 Can you explain me ?

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

After each contest , i ask myself " how many rounds left of my life of getting UNACCEPTED solutions and SUCCESSFUL hacks ? " :( :P

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

Well,I accomplished my code a few seconds after the test.

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

Есть ли в Div 1D что-то принципиально проще 0-1-bfs по 2D дереву отрезков? Заранее спасибо за ответ.

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

I try my best to understand Div.2 B.But who can tell me what's the "test" means?What kind of role the "mine" played in the problem?What are differances between blow up with"a bug in the code" and without it?Maybe a explanation for the sample could make it easier for understanding.

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

ss

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

The problem statement for Div2 B was very poor, should have been clearer.

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

    I think it was clear. But maybe it was difficult. I understood the task clearly. But i had some problems what I should print. And the tests can help in this case. Of course, it was harder than usual B. But it was real to understand and solve.

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

What the? In 2 weeks, Round 337 Div 1 but Round 335 Div 2? :O

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

What is the hacking testcase Div2 C ?

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

Div2C / Div1A, how to crack this nut?

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

    Computed the length maxlen of the longest subarray that has a sequence of consecutive numbers sorted. and the ans is n-maxlen. Hope it is correct. I even survived two hacking attempts

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

      how about "2 1 4 3 5 6"?

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

        the sorted subarrays are:

        1, 2 3, 4 5 6 therefore maxlen is 3 ans is 6-3=3

        I should have said subarray that contains continuous numbers in a sorted manner. Sorry for bad english_

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

        Found a funny bug :)

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

          umm.... do u mean the upvote and downvote ? I had noticed it long time ago . So its a bug , eh? :v Didn't know. I just enjoyed the colours.

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

    Think 'longest continuous sub-sequence' :) the answer is n-longest continuous sub-sequence. At least i passed the pretests with that.

    Take 1 2 3 7 5 6 4. THe longest continuous sub-sequence is 1 2 3 4. Now you can shift the remaining elements in a particular order to get the sorted array always. At least that is how I thought of it intuitively

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

      1 2 4 5 7 8 3 6

      longest continuous sub-sequence: 1 2 4 5 7 8; 8 — 6 = 2, but answer is 5

      (you should find longest continuous sub-seq. that has step = 1 (e.g. 1 2 3 4, 7 8 9), i think)

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

        I'm not sure what you're saying. My logic was accepted. Here's my submission. Barely 5-7 lines 14730166

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

          Sorry, you have correct solution. I thought "continuous" meant "increasing" or "decrasing".

          1 2 4 isn't continuous, right?

          (english isn't my native language)

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

        Sub-sequence is an ordered subset of the array, 1 2 3 5 7 8 is a subarray.

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

That system test tho.

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

It was very difficult to understand the problem B (Div.2) isn't it?

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

I still don't understand DIV2 B.... Can you explain output of sample test??? This is the most confusing statements I've seen...

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

    Sample test 2:

    Size of field: (2, 2). Start position (2, 2). Sequence: ULD.

    Each round the mine starts in a different position of the field.

    Round 1: Mine is in (1, 1). After executing UL the robot explodes, 2 moves.

    Round 2: Mine is in (1, 2). After executing U the robot explodes, 1 move.

    Round 3: Mine is in (2, 1). After executing ULD the robot explodes, 3 moves.

    Round 4: Mine at starting position (2, 2). After executing 0 moves robot explodes.

    Answer: 1 1 1 1.

    Each position i(starting at 0) means how many times the robot exploded after i moves.

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

What is the point to check our English language skill by giving a problem like Div2 B -_- -_- -_-

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

Many will fail on DIV.2/C .. for a simple reason , LIS doesn't work ! :)

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

What is the point to test our English language skill by giving a problem like B -_- -_- -_-

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

statement of problem div2 B was very poorly made

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

I understand my bug in DIV2 D very late! cause that i couldn't submit the correct code :(

but i learned this: first think then code :D

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

In Div2D, test case 10

given answer is 1 2

2 3

1 3

1 4

My output

1 2

4 3

1 3

1 4

Checker Log is

wrong answer Multiset of lengths of MST edges is not the same as required by the input

Please tell what is the error in my solution? What am I missing?

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

    in your graph, the correct MST is { (1,2), (1,3), (3,4) }, but (3,4) should not be included to MST according to input.

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

Interesting!! Even none could do four problems in that room.

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

I think, it would be nice if after the contest we could see the test-case for which the solution got hacked.

Anyway, it was a great round!

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

1 point away from red :(

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

I accidentally made a submission, and now I am almost pupil

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

When you hack peoples code using a testcase your own code fails on

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

Div2 C hypnotize me :/

and it must be interesting =D

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

Hello, am I the only one who thinks that those two submissions share the same code ?

http://codeforces.com/contest/606/submission/14725950 http://codeforces.com/contest/606/submission/14730116

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

    That doesn't look suspicious for me at all. Common part is exactly LPSolver which was very definitely prewritten code and could have been easily shared before contest. Note that main() functions are definitely different.

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

Yayy, today I have solved my first E ever ^.^ (more precisely, most valuable problem on a contest to include rounds with more problems)! Few times I was like two seconds or two chars\lines from getting it, I have solved many Es during virtuals, achieved >2700 rating along the way, but I was never able to get AC on E during real contest and today I finally beat that long standing challenge :)

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

div2 A http://codeforces.com/contest/606/problem/A

Why answer is "Yes" ?

Test #6
Input
0 1 0
0 0 0

Answer
Yes

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

    It's Yes because the number of spheres you have of each color (0, 1, 0) it's greater or equal than the number of spheres you need of each color (0, 0, 0).

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

    The problem statement says:

    he needs at least x blue, y violet and z orange spheres

    He does have at least 0 blue, 0 violet and 0 orange spheres.

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

.

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

swap(Div 2.Problem B, Div 2.Problem C);

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

Почему остановилось тестирование у всех?

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

    Оно на всем Codeforces остановилось, не только на задачах этого раунда...