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

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

Добрый день!

VK Cup 2015 — Раунд 1 (неофиц. интернет-трансляция, только Div. 1) — это неофициальный повтор Раунда 1, открытый для всех участников из первого дивизиона. Это означает, что если вы не принимали участие в VK Cup 2015 (например, вы старше 23 лет), решили прекратить участие в нем или не прошли квалификацию, то вы можете зарегистрироваться на VK Cup 2015 — Раунд 1 (неофиц. интернет-трансляция, только Div. 1) и принять в нем участие.

В интернет-трансляция — соревнование с индивидуальным (не командным) участием, по результатам трансляции будет пересчитан рейтинг всем ее участникам. Задачи будут предложены как на русском, там и английском языках.

На соревновании будет использована плавная динамическая система (с шагом 250). Подробнее о ней можно прочесть здесь.

Не забудьте зарегистрироваться заранее на раунд. Желаем удачи!

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

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

При попытке зарегистрироваться, я получаю alert "Unsupported participation type"

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

as i can see there is a time difference from the original round and the mirror round. Does the problem set could have seen before the round starts?

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

I am not going to be participating in the mirror, but I would like to ask a question on behalf of those who will be. How you will prevent cheaters who will compete in the VK round and then compete with another account in the mirror round? I am quite sure that there are highly rated people with additional d1 rated account, as we see in d2 competitions often times new accounts show up, place in the top 10, and then never do anything again. Of course one could say that this is against the terms of service, and is cheating obviously, but as we can see from d2 results this often does not stop people. In addition this time the reward for these cheaters is much greater. If they are already willing to cheat to try and win a d2 contest, would they not want to cheat even more when they have the opportunity to win a d1 round by spending 4.5 hours solving the problems. This is why if I were a red competitor I would be very scared about participating in this mirror, because what happens when you end up competing with a cheater who is actually red in real life, and has 2.5 hours to spend on the problems before you start? The answer it seems is that the honest red's rating will go way down. Anyway I hope I am wrong about this, and that the ethics of the Codeforces community will prevail, however I sadly will not be surprised to find tomorrow at the end of the mirror round several purples with only 1 previous round competed in at the top of the leaderboard, and this will be very sad for all the rest of us.

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

    This round is something like an experiment. Actually, I do not see much motivation to cheat here: it is hard, but it is possible to understand persons who register new accounts to be in top of D2-rounds. It could be fun for someone, but in case of this round I don't see any fun. It is not funny, but boring to solve problems if you saw them before.

    We had an option here: to host only VK Round 1 or to add an event for everyone. I think that it is better to trust participants and to organize contests than to suspect everybody and not to do contests. You see, programming contests mostly have many ways to cheat but I don't think that is the reason not to do contests.

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

    So good luck.

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

Why is it for div1 only? Only because estimated difficulty of problemset is too high for div2 users, or there are some other reasons behind this?

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

    Probably for that reason. It's also quite interesting: round 1 already is too hard for div1?

    Maybe there just aren't easy problems.

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

    I guess one reason would be to discourage cheating? If you can create a new account and immediately join, then cheating is much more appealing than using your main Div1 account. And in this particular case cheating is relatively easy as the official round is before the unofficial one, and the tasks could easily be leaked.

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

Atleast, out of competition for Div 2?

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

Рейтинг будет пересчитываться отдельно для основного тура и отдельно для зеркала, так как будто это два разных соревнования?

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

Unofficial But Rated : WOW.

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

Unofficial But Rated : WOW.

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

Where is official VK Cup 2015 Round 1 ? it's not in contests anymore, there is only mirror of it

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

i love contest i want register i hate you div1 only MikeMirzayanov is it problem if div2 coders register and contest will be unrated for them?

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

I encourage these teams to respect the position of the organizers and not to take part in official Round 1.

You ask us to not participate in the official VK Cup, however you make the unofficial Round Div 1 only.

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

Can we do gym contest while the VK cup round goes on !! I m in div2 , so want to practise there .

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

We do not have a heart? We want VK Cup

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

We do not have a heart? We want VK Cup

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

Are the problems sorted in order of difficulty?

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

This contest is only for Div 1 and it is rated . I think many coder's are unfortunately goes Div 2 Because it is rated. lol.....

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

The site is not letting me register.. At first it said "My submission for C has been hacked" even though the contest hasn't started.

Now its giving me a popup telling me that i'm registered, but nothing happens and I'm not on the registration list

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

This contest is Hello 1394(Iran). Happy new year and wish good rate

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

Delayed 15 mins :_(

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

One more postpone with 5 minutes and I win 100 dollars to my friend.

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

I got bored, so let me spend those few minutes before the contest by writing a joke:

If you have a homework that need at least two hours of working , how can you do it in only five minutes??

just do the homework in last 5 minutes before the starting time of a contest on codeforces because it feels like 2 hours.

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

Well, no cheaters because of delay?

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

Where is rooms?

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

rated?

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

Мы участвовали в официальном раунде. На трансляцию не регистрировались. Вот как выглядит список задач, если войти в трансляцию:  При этом, это не соответсвует множеству тех задач, что мы заслали в официальном раунде. Нажатие на замок ни к чему не приводит.

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

First time to see a contest in which E is the easiest problem :D

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

    E — Easy
    B — Basically easy
    D — Doesn't seem like greedy, but it is!
    C — Can't be bothered to make a funny name for the letter... oh wait
    A — Aw shit!

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

      Can you tell your solution of problem C?

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

        I didn't read it, I spent the last 40 minutes solving A (I don't know where I fail, since my approach uses quite general approaches).

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

        For each query, you want to know if there is a rook at every row/column of the special area.

        At least for my solution, you need to check the conditions separately for rows and columns. For the rows: sort the queries by increasing order of x1, then for all rows keep the leftmost rook such that xR ≥ x1. The query is valid if xR ≤ x2 for all rows (use a segment tree to check that).

        Do the same for the columns, and take the queries that passed any of the tests.

        This seems pretty annoying to code though, I wonder if anyone has something easier.

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

          This should be simpler:

          1. Check the rows
          2. Rotate the board and flip queries
          3. Check the rows
        • »
          »
          »
          »
          »
          11 лет назад, скрыть # ^ |
          Rev. 2  
          Проголосовать: нравится 0 Проголосовать: не нравится

          i got the same idea after this contest, but how to built a segment tree to get how many elements are greater than some value(i sweep from left to right).

          I know how to solve with SQRT descomposition, but querys with that is too expensive O(sqrtN * log(sqrtN)), updates in O(sqrtN), with segment tree, i don't have the faintest idea how to do that.

          Any hint with segment trees please?

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

            You don't need to know "how many", all you need to know is whether there is at least one or not. Similar example: on the given interval you need to check if there is any number greater than X. That can be solved by taking maximal value on the interval and comparing it with X.

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

              haha, i understand, just in my case maximal value is enough, but about how many element greater than some value, is possible to do that with segment tree?

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

                One of the ways to solve this problem: for every vertex of a tree store sorted list of all entries of rooks at it's segment, and also for every rook remember it's position in this list for every vertex it belongs to. And also build a fenwick tree in every vertex.

                Now do basically the same as in simple solution — move column by column, when you meet new rook — remove previous rook at this row (if exist) and add this one. But in simple solution you were only updating a value of minimum in some vertices of a tree, and here you have to update Fenwick trees for all affected vertices. You should update those trees in such way that there are always 1's for entries which are last at their horizontal line right now and 0's for everything else.

                Now to answer query "how many?" for vertex you need to count sum at some suffix of Fenwick tree for this vertex.

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

        The rectangle is defended by rooks if and only if it either has rooks on every row or it has rooks on every column (both taking only rectangle's range into account). Since those two are symmetrical I will describe only how to check whether there is a rook on every row. We will answer the queries in offline, sort queries by their left border and go left to right. Sort the rooks left to right as well. Now going left to right you need to remove the rooks from the board which are to the left of the query currently being checked. If you remove such rooks then for each row you can check what is the leftmost rook in that row. If you take max of these values across all rows in the rectangle (using interval tree for example) and compare the result with rectangle's right edge you will find whether it has any rooks missing or not.

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

        You can also use interval trees for a different solution. Again, this is to check just if every column has a rook.

        Keep for each column the intervals where you dont have rooks (if you have rooks at y's 1 2 5 on a column you have the intervals 3-4 and 6-M). You build a segment tree over these intervals and in a subset of columns (x .. (x + y) / 2, (x + y) / 2 + 1 .. y) you keep all the intervals from the 2 subsets (left and right) that are not contained in another interval. Now just query if the column subset (x..y) contains in interval that contains y1, y2 (from the query in the statement). If this stands true, that means there exists a column not covered by a rook.

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

      A -- why? Just use hashes to compare cyclic shifts in .

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

        and why does it work?

        • »
          »
          »
          »
          »
          11 лет назад, скрыть # ^ |
           
          Проголосовать: нравится -21 Проголосовать: не нравится
          • sorry my english *

          Лёх, в смысле, почему? Задача: выбрать мининмальный цикл сдвиг из каких-то. Решение: перебираем все, какие надо, из них за O(nlogn) хешами берём минимум. А какие надо, определяется по min баланса на отрезке и разнице балансов концов.

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

            Вопрос о том, почему хеши не отгребут?

            И, судя по обсуждению в ВК и твоей посылке, ответ — ни почему, отгребут

            Хотя можно использовать двойные, да (об этом сразу я не подумал)

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

              Ну блин =))) Я же на дорешке сразу перепослал с простым модулем и ОК получил. Всё норм.

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

                Да, про то, что хеши можно написать нормально, я иногда забываю:), не люблю я их:)

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

                (Russian version in edit history)

                This might be a silly thing to ask, but… how can you be sure that, when hashing a whole million of bits (and that’s only because we’re limited to parentheses here; we could easily have had letters) to just 64 bits, there won’t be any collisions that break the solution in one way or another?

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

                  Let hash-function is seem random. Then . Where N — number of substrings to hash. If N ≤ 108, it's small enough (10 - 3).

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

                  So basically, you just hope for the best?

                  Well, that’s one way to do it. I just thought it was customary to always expect the worst case in competitive programming.

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

                  So basically, you just hope for the best?

                  Yes, I always hope. Always, when I use randomized algorithms. Like polynomial-hashing, like Miller-Rabin, like Schwartz–Zippel

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

                  Not to belittle your main point, but Miller–Rabin is deterministic for finite input given the right (constant) set of bases. 2, 7 and 61 cover all 32-bit integers, while 2, 325, 9375, 28178, 450775, 9780504 and 1795265022 cover all 64-bit integers, or so the Internet told me back when I copied these lists.

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

                  You may modify Miller-Rabin to be more determenistic, but basically Miller-Rabin says "let consider any random number!". And it gets error with probability <= 1/4.

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

                  The thing is, using the (finite and constant) sets I posted instead of random numbers gives a probability of error of exactly 0, making the test completely and utterly deterministic and reliable.

                  There’s also a version that gives the same result for arbitrary input ranges with the assumption that the generalized Riemann hypothesis is true, but it’s asymptotically slower: it’s basically “try all potential witnesses up to ; the number is a guaranteed prime iff all of them fail”.

                  Of course, if you want an arbitrary input range and can’t accept the factor, the classical Miller–Rabin is probabilistic as you said.

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

                  Note that, when the probability of failure in your algorithm is less than, say, 10 - 15, it is less than the probability of a hardware failure. So, when solving a problem, it's customary to discard that probability, as it's customary to discard the probability of hardware failure when running your implementation.

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

Wow, I totally misread the fact that you have to use 2 different bills only in problem E, and only realized that 10 minutes before the end. Needless to say, time penalty when submitting at 01:57 is rough :D

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

What is the Hacking Case Of Problem E? TLE Case Or Any Critical Input Pls Suggest Me

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

Hm, my solution of A: STL magic to get all rotations where the answer is minimum (btw trivial minimum), then suffix array to sort rotations. It fails on pretest 11...

UPD: found it, I computed the costs of rotations incorrectly.

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

really bad problem statements :(. long, hard to understand and with constraints hidden among the story

what is the point of long statements?

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

There's a solution running on pretest 4. Because of that, the systest is stuck at 100%.

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

Problem D used a very simple greedy solution. It was so simple that I couldn't believe its correctness (as there were few people solved it). I spent much time to hack it, but failed. So I decided to code it.

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

When will the problems be available in the Problemset?

UPD: They're now available.

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

I lost about 30 minutes for problem E because I didn't read condition "at most two distinct denominations", and finally failed system tests because of runtime error :(

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

BTW, after we saw the problems , don't you think that the problems are not that hard to prevent div2 from participating ?

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

    And also in this div1 contest easiest problem from VK Cup wasn't used (problems B-F from VK Cup were presented there, but in shuffled order and with minor changes in some of the tasks); so I guess div2 contest can be obtained from div1 round by changing problem A (which was used as F at VK Cup) to problem A from VK Cup and changing problem B to it's simpler version from VK Cup (there was no <=n/2 lying limitation).

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

My code for problem B failed system test 22. Could someone tell me what's the problem?

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

How to solve problem E, please somebody who can explain his idea?

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

Why are previously accepted solutions for 529C - Rooks and Rectangles getting Runtime error on test 31?

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

about problem C : in input say n<=100000 ; but in test 31 n=3e5 !!! :(

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

In problem B: trying every height in the input to be the maximum height gets WA on test 18, while trying all heights from 1 to 1000 gets AC!

WA: 10389037

AC: 10389163

At least one person won't lie on the ground, so why my solution is not getting the correct answer by trying all the given heights?

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

Something unusual:

Why do these submissions not get TLE?

10386307, 10388227, 10386918

The problem statement currently clearly says "time limit per test: 2 seconds".

Submissions during the contest seem to have timed out at 3000ms, so maybe the time limit was changed? Also, anta must have a lot of courage to stick with a solution running in 2963ms on pretests!

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

wow , i just found out how slow reading with stream's are on problem C:

over 2 sec's (TLE) with streams

450 ms with scanf

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

Am i wrong or the problem A was so easy for only 10 people sent it in the contest? As you can see I am purple guy, and I had the basic ideia during the contest in 5~10 minutes and solve it after contest without help. I think i did not solve it correctly, because nobody was passing it. So, I thought i could not solve it. Was that the hardest problem in the contest?