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

Автор Cirno_9baka, 7 лет назад, По-английски

Hello, Codeforces!

I'd like to invite you to take part in Codeforces Round 593 (Div. 2). It will held on Oct/17/2019 16:35 (Moscow time). The round will be rated for the participants with rating lower than 2100.

You will be given 6 problems and 2 hours to solve them.

Scoring distribution: 500—1000—1000—1750—2000—2500.

The problems of this round were developed by me. Thanks a lot to isaf27 for his excellent coordination, to Mike MikeMirzayanov Mirzayanov for Codeforces and Polygon platform, and to mnaeraxr, antontrygubO_o, NIWIS, win11905 for testing.

This is my first round ever. I hope everyone will enjoy it.

Good luck!

UPD: The round is over! Congratulations to the winners:

Div.1 + Div.2 participants:

  1. LayCurse
  2. nuip
  3. Geothermal
  4. liouzhou_101
  5. Pelmelnik2

Official participants:

  1. Pelmelnik2
  2. lrvideckis
  3. zml
  4. DAL_DAL_USHEL
  5. phosphoric

UPD: Now the Editorial is available.

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

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

It's the contest season again :D

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

PS. I hope anyone record the process of preparing one problem with commentary, will publish it on Youtube after the contest. It's useful.

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

Who else is going to make this contest a priority to gain back the rating points that we lost in Tourist's contest ?

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

Best of luck for your first contest

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

How short the announcement is!

However, hope your first round will be successful!

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

Request for This contest :: Please make large inputs downloadable

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

Hope for a great contest as it’s your first time !

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

i wish it be safe from any hacker attack .. Cirno_9baka

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

Do you think this round will be the strongest?

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

I will try to wake up on time to participate. Now, I have a challenge: For every rating point lost, I will do one pull-up. For every point won I will do three pushups. Everyone is welcome to join the fitness challenge. Write what you'll do if you lose or win rating.

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

A bus left the Scarlet Devil Mansion; $$$a$$$ people boarded at the start.

At Hakugyokurou, $$$b$$$ people left and $$$\frac{b}2$$$ people boarded. (It is guaranteed that $$$b$$$ is odd.)

At Yakumo-san's house, $$$d$$$ people left, where $$$d$$$ is the imaginary solution to $$$ad^2 + bd + \sin c\pi = 0$$$.

How many passengers remain? Print the answer modulo $$$993\ 244\ 853$$$.

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

According to the writer's name, I bet this round may include some Touhou-themed problems.

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

Good luck with your first contest!

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

I smell math problems O_o

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

UwU

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

I hope the round contains some basic graphs problems

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

Thanks for the contest :)

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

Oh, maybe I'll become green after this round.

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

[Deleted]

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

i hope statements wiil be without anime

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

wish short problem not hard code good pretests and high ratings :)

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

A speed typing test?

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

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

Speed Test :/

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

Was B meant to use OEIS???? How come B is on B? 1000???

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

How to solve F ????????????????????????????????????????????????????????????????

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

How to solve D?

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

    Seems like the doll's trajectory is a spiral from $$$(1,1)$$$ to the center, therefore the obstacles must only be in the end of the spiral (or form complete rows / columns on the bounds of the grid).

    If this is the case, I don't know how to code it neatly and concisely.

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

    The path must be a spiral... somehow. "Simply" check if one can run that way.

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

      Isn't that O(nm) which is 10^10?

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

        You don't actually visit each cell. On each row (or column), you just move to the end of the row, which means finding the first obstacle hit, or the last column not yet hit. This is O(lg k) time (binary search the obstacles on the row). So, each row or column is O(lg k) time, and each row/column is done only once, so total time is (m+n)(lg k).

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

        No. You run from (1,1) to (1,n-1), then to (m-1,n-1), then (m-1, 1)... And so on.

        It loops 1e5 * 2 times.

        One can use two sorted lists of the obstacles to optimze the search.

        Sort one list by colums, one by rows. Ie use vector<pair<int,int>>, onc sorted by first, one sorted by second, then first.

        To check if all fields where visited, count them. Fieldcount + k == n*m

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

How to solve D ?

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

    The first observation would be that if there is a solution, then the path will look like a clockwise spiral. The second observation would be that we don't have to simulate each step. Instead we should simulate all the steps in one direction in one move.

    Let's initialize the variables n1 = 1, n2 = n, m1 = 1, m2 = 2 the borders of submatrix we should be able to visit. Also let's keep sets on each line/ column in order to store the obstacles on those lines/ columns.

    Now let's say we're at position (i, j) and just changed direction to move to the right. If there is an obstacle in our way at position (i, k), with k from [j + 1, m2]), then we can only ever reach column k — 1. Thus m2 will become k — 1. Moreover, a solution exists only if the submatrix ((i, k), (n2, m2)) is filled with obstacles, else there is no solution. We can easily check this using our COLUMN sets (i.e. if a column k -> m2 has exactly n2 — n1 + 1 elements then it is filled with obstacles, else not). To be able to make correct checks in the future, we will remove all these obstacles found in the said submatrix from their corresponding LINE sets. Now we can update n1 to n1 + 1 (since we will never return to this line), update the doll's position from (i, j) to (i, k — 1) and change the direction to moving downwards. Everything works in a similar way for the other directions.

    We know we reached the end if the number of steps taken + the number of elements removed == n * m.

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

Perfectly imbalanced.

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

This was perfectly imbalanced round.

I really hope the problem D has some pretty and easy to implement solution.

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

Greedy solution for $$$D$$$:

Keep going in the direction you are facing until you have to change it. When you can't move anymore, see if you covered all squares, if you did, answer is yes otherwise answer is no.

Try to prove this.

Implementation: 62820909

Edit: Why the downvotes?

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

problem C feels like "dont know why does it work but gonna send it anyway"

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

    The problem C reminds me of printing snake print of a given matrix.

    If n is 3, then insert elements till n**2 (i.e. 9) in spiral order in a 2D matrix:

    1 6 7

    2 5 8

    3 4 9

    Finally, print it. As simple as that

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

    Yeah the problem was too wordy so I skipped straight to the example, figured out a weird pattern, coded it up super fast, and watched it get passed pretest with disbelief. I was fully expecting a WA but I got lucky o_o.

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

      So, i can prove it. Let's explore f(X,Y) and f(Y,X). Of course, f(X,Y)+f(Y,X)=n^2. so max value of min(f(X,Y),f(Y,X)) is (n^2)/2. So, (n^2)/2 is our top estimate.

      Let's try to reach it. Let's build an example, where min(f(X,Y),f(Y,X))=(n^2)/2. (for any X,Y) This way, I divided n^2 labs at n sequential sectors. Let every sector is a permutation of {1,2,3,4..n}. So we have sequence A, A.size = n^2. This sequence means that lab with index i has group number A[i].

      Let's take two random groups X,Y. Understand, that for each sector water can go from A[x] = X to every A[y] = Y where (sector of index y)<(sector of index x). So, f(X,Y)>=n*(n-1)/2 Likewise, f(Y,X)>=n*(n-1)/2. (observe that n*(n-1)/2 + n*(n-1)/2 = n^2-n, that is we lost n pairs).

      ok, we didn't explore such A[x]=X, A[y]=Y, where (sector of index y)=(sector of index x) Here is n pairs. And we need to distribute them roughly in half between f(X,Y) and f(Y,X) to maximize min(f(X,Y),f(Y,X)). So, in roughly half sectors $$$x \lt y$$$ and in other half is $$$x \gt y$$$. My solution is to make sectors such way: sector1 = {1,2,3,...n}. sector2 = {n,n-1,...,2,1}. sector3 = {1,2,3,...n}. sector4 = {n,n-1,...,2,1}. ...

      Easy to see that we reached our purpose: in roughly half sectors $$$x \lt y$$$ and in other half $$$x \gt y$$$, for every groups X,Y, where A[x]=X, A[y]=Y. After writing this solution you can see that it will be a number-snake in answer table.

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

How to solve B? I've used b*(2**a)+1 formula but getting TLE

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

I submitted my solution just before the contest ended and I got an idleness limit exceeded. What does this mean? Link 62815630

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

How to solve E?

I tried to solve it with DP, but my table dimensions were too big, which was something I couldn't reduce ...

Even though I agree the problems were not really balanced in terms of difficulty, I liked them a lot (especially D and E seem to be very interesting and I'm looking forward to read the editorials).

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

After a perfectly balanced round, comes a perfectly unbalanced round.

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

It took me 15min to undertand statements of Problem E...

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

I think this round is very imbalanced, because tester's team mainly consists of div1 persons

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

Me after solving A,B,C:This round doesn't seem to hard. Promblem D:I'm going to end this man whole carrer.

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

touhou round so hard q.q

What is test 7 in D?

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

D is a debugging nightmare...

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

Why is this code getting TLE in problem D? Code I used binary search for the current location and changed the location accordingly.

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

Can someone please explain how did you come up with (2^m -1 ) ^ n for B?

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

    Sum of binomial coefficients i.e. nC0 + nC1 + ... + nCn is equal to 2^n. This is a common property of binomial coefficients.

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

    From input explanation you can see that there is 2^m — 1 ways to divide one present to m people. All n presents have the same amount of combinations so from here answer is (2 ^ m — 1) ^ n

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

    consider present type x: you have 2 options for each box to put present in it or not. so in total you have 2^m options but one of the at least should not be empty so 2^m-1.

    and each of present types are independent from each other (do same procedure for all types) so (2^m-1)^n.

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

fot problem E it takes me almost 60 minutes to find the trap it turns out to be the situation that n=1.

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

didn't like problem c so tried to solve D. tried for 70 mins solved it 5 min after contest was already over smh . should have just sticked to C.

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

For E is it correct that for any x the pairs (x, y) that satisfy will be such that all the possible y's for that x will be continuous integers ? Like (3, 1), (3, 2), (3, 3) where x is 3 and y belongs to [1,3]?

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

    Yes, since after reaching a position y you can always stay there by moving right if ai = y, and moving back after the last one, stay there for the rest of the cases. However I got stuck on finding maximum and minimum y

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

      Ya, I realised my solution failed on pretest 15 since I didn't consider N = 1 case.

      Anyways here's the solution to find the maximum and minimum:

      The brute method is to increase/decrease whenever possible.

      Brute Code

      To optimise this we can create an array of size M that says for each position p if we have a number equal to A[p] at that point what's the max or min I can get at the end. This can be calculated in M log M. We can use the same array to find for each number what's the max/min I can get if i start with it.

      code that fails on pretest 15

      Update : Got AC by fixing N = 1 Link

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

Disgusting problem D

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

For everyone waiting for system tests:
there's a new twice mv out now
https://www.youtube.com/watch?v=zQELp93xxfo

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

Amazing Round .

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

Although deriving formula for B is not that hard (just in my opinion), I think it was not appropriate to put such problem in Div2B since it requires fast exponentiation.

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

I meet a strange bug when using m2.codeforces.com:

The statement of A says 'The statement is not available'.

So I think there're some technical issues and throw A away...

I didn't realize the problem until I looked at the standings after one hour!

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

Who else forgot n=1? :)

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

WHEN I SAW problem B ![ (https://images.app.goo.gl/H9q9HbBeTSCQTjVS8)]

WHEN I SAW PROBLEM C ![ (https://images.app.goo.gl/P7HnpmTw4LKifK2J8)]

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

Red coders should stop making Div2 only contest. Their contests are so inbalanced. :(

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

    In my opinion the imbalance matters because solving a harder problem differentiates the people who are skilled and not skilled. For example, tmwilliamlin168 is extremely skilled so he always solves more problems than me. tmw OFZ.

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

I missed the DDOS attack this round :(

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

Upvote if you got the solution to C from sample

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

If I get to 1400 rating I change colour right? OMG I might get there plz

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

Deleted

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

62815596

Can somebody explain (TASK D) why this is not correct?

First I remove full lines with block (right and bottom)

Next I check that all remaining blocks in tail of snake-filled array

for example if left 3x3 array and two blocks, I check that this blocks in 8 and 9?

Is it correct? Or idea was wrong

1 2 3

8 9 4

7 6 5

upd. I think I understand, I need to delete all left vertical lines with all blocks except 1 row...

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

Aaaaaaaannndddd.... WA218!

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

Congratulations with your first contest! Congratulations with your last contest too!

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

Поменьше бы таких раундов...

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

Can you explain your thought process for B?

Like from when you saw the problem

IMO C was easier than B

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

    I tested with examples, noticed that we needed to assign one present to someone for each type and listed out the ways for the rest.

    My kinda messy (not the smartest but i guess easy to understand) explanation https://pastebin.com/Qjr3h8Ui

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

    B is quite clearly a math problem (very large input parameters, O(n) fails, reads like combinatorics), so the idea would be to try and derive a formula to solve B.

    My solution used inclusion-exclusion and was very messy, but the expression simplifies quite nicely to the simple formula.

    Edit: So you count all the ways to distribute the gifts without considering whether every gift is used, to get 2^NM ways, and then you consider the case where at least one gift is not used, and then the case where at least two gifts are not used, et cetera. The result is a well-known expression (binomial theorem), so you can get (2 ^ M — 1) ^ N.

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

problems are very interesting. I really like it!

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

Can someone verify if the following logic is correct for D?

If we just consider all obstacles, they're also going to form a spiral path. We can fix one obstacle and break this path down into two spirals: — a clockwise spiral path and an anticlockwise spiral path. So, we start from this obstacle and simulate the moves, the clockwise starting from direction 1, while the anticlockwise starting from direction 3. If we can cover all the K obstacles in either of the 2 (disjoint) spiral paths, it's a valid input.

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

I guess that one Specialist tester wasn't enough.

But I have to say, that I like these problems.

F seems to be interesting.

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

Why problem creators make such problems as C? there is no any logic just like guess output and get AC. I think at least 95 percent of participants solve it so. I dont like this round for me the tasks were uninteresting and disbalanced.

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

Sorry for the difficult problem D.

I thought it may be just a simulate problem and may not so hard, but the fact isn't. It contains many details and not so easy to write.

Again I will say sorry. I will try to improve myself on controlling the difficulty of the problems.

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

Anyone got what pretest 4 is? Please share

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

How to solve E?

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

    Observe that the reachable points for each starting point form a continous interval.

    Say that for each starting point, we want to know the farthest point to the left it can reach, which can be done by each time make one move to the left if possible. We can simulate the process in $$$O(n)$$$ by maintaining the number of starting points at each current position.

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

      Is true, you just need to calculate the most away reachable point to the left and right of each position. But how can you make it in O(n) time. I think about using ST to simulate it, but it turns into a complicated implementation, can you explain me how to solve the problem using your idea?

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

If anyone is curious, I suspect test 218 for problem D is something along the lines of:

3 1 1 3 1

The correct answer is Yes, but many solutions are printing No, because on your first step you can't make any steps to the right. However, that's not an issue here because you can immediately turn right (so you're now facing down) and move down one step. I tested a few WA218 solutions on this case and found that they all printed No here.

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

Hard code for D and Good test 218

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

The absent of test case 218 in pretest seems to f**k participants up deliberately, right?

edit/ I didn't get that 218 was hack data. It seems that it was not deliberation, just failure to consider corner case

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

After the contest ended, I received an e-mail from noreply@codeforces.com saying that my solution for problem A 'significantly coincides' with a solution from other user. I entered his profile that was on the e-mail and checked his solution. It is quite similar, it uses the same idea, but this is a simple ad-hoc problem, and I'm pretty sure a lot of other people must have made similar solutions.

Anyway, the email said "If you have conclusive evidence that a coincidence has occurred due to the use of a common source published before the competition, write a comment to post about the round with all the details". Well, there obviously was no source published before the competition, and I just solved it by myself, and considering it was an easy problem I'd not be surprised that many similar solutions exists.

What can I do? I'm from Brazil and that profile is from a random guy in China, and as it was the easiest problem and most people solved it pretty quickly there's no way we would have gotten the same code on purpose.

The e-mail says "Such violation of the rules may be the reason for blocking your account or other penalties. In case of repeated violations, your account may be blocked.". But it wasn't a violation, obviously a problem that occured, what could I do to remove this violation?

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

The round was quite unbalanced. My friend has got only 72 points more than me, but he's 500 places higher. Guess the author should learn from tourist how to make BaLaNceD contests.

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

There is no test case against int overflow in D...

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

Can someone explain problem B pls?

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

    We can take every present into account separately. There are totally 2^m ways to place. Obviously, we can not take the way of "all the box is empty", so there are (2^m-1) reasonable ways. Every present is irrelevant. So we can get the answer : (2^m-1)^n

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

i solved B using,total ways — invalid ways, i calculated invalid ways using inclusion-exclusion principle, which is sum r=1 to n ( nCr * 2^((n-r)*m) — 1)* (-1)^(r+1) which reduces to (2^(m*n) — (2^m-1)^n — 1) also total ways = 2^(m*n) — 1 .......substracting 1 for empty sequence hence valid ways = total ways — invalid ways = (2^m-1)^n.

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

Hey, can any of you guys help me with problem C ?

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

Java BigInteger became useful for problem B. I used the same formula (2^m-1)^n. Here's my JAVA code: 62824862

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

Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

(found a mistake in D after 50 min debugging during the contest and 2 hours after the end)

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

Прошу прощения за беспокойство. Сегодня (вчера?) на контесте некто coder_aditya скопировал мои решения с открытого (каюсь, сам виноват) исходника в ideone. Так, этот недобросовестный пользователь полностью скопировал мои решения по задаче А (62787915 и 62785873) и по задача С (62803225 и 62803022). По неясной причине он сначала отослал полные копии (зачем???) а затем отредактировал оригинальный код с тривиальными изменениями, получив OK за задачи А (62813924) и C (62814398). К тому же задача B у него также засчитана как решенная, так что не удивлюсь если он и ее у кого-то украл. Прошу принять меры, так как я в итоге остался без рейтинга, а он после редактирования чужих решений поднялся.

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

Sorry to bother you. Today (yesterday?) At the contest, someone coder_aditya copied my decisions from the open (I confess, it's my fault) source in ideone. So, this unscrupulous user completely copied my decisions on Problem A (62787915 and 62785873) and on Problem C (62803225 and 62803022). For an unclear reason, he first sent out full copies (why ???) and then edited the original code with trivial changes, receiving OK for tasks A (62813924) and C (62814398). In addition, task B was also counted as accomplished from him, so I won’t be surprised if he stole it from someone. I ask you to take action, because in the end I was left without a rating, and after editing other people's decisions he got a little rating.

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

Finally back to purple!!!

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

I want to ask a question, why the testcase's answer is no?

4 7 8
2 2 
2 3
3 2
3 3 
2 5
2 6
3 5
3 6

It starts from (1,1) and turn right at (1,7).After walking across the big circle, it returns to the original point (1,1). then it goes on and turn right at (1,4) and end at (4,7).

All points has been visited. And at every point it turns right at most once.

Do I misunderstand the problem?

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

Congratulations to you and me both for our first contest.

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

Great conto

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

Hello MikeMirzayanov and Cirno_9baka. So my friend dewitast got an issue that her rating was changed when she participated in this contest. You can see that, she is not eligible for div 2 rated contest (she already master when joining this contest, of course you can check it by yourself in the last contest in her profile). She already contacted both of you and she haven't hear any good news from you. Well she is not a vocal person, so I'm here to help her. Thanks :)

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

I was checking the solution for problem D of some people and I found that one of the accepted solution fails the following input.

Input:

2 2 1

1 2

This input should give an output "No", as I have checked with some other accepted solutions. But the following AC submission gives "Yes" :|