vovuh's blog

By vovuh, history, 2 weeks ago, translation, In English

1674A - Number Transformation

Idea: BledDest

Tutorial
Solution (BledDest)

1674B - Dictionary

Idea: BledDest

Tutorial
Solution (BledDest)

1674C - Infinite Replacement

Idea: BledDest

Tutorial
Solution (awoo)

1674D - A-B-C Sort

Idea: BledDest

Tutorial
Solution (adedalic)

1674E - Breaking the Wall

Idea: BledDest

Tutorial
Solution (fcspartakm)

1674F - Desktop Rearrangement

Idea: vovuh

Tutorial
Solution (vovuh)

1674G - Remove Directed Edges

Idea: BledDest

Tutorial
Solution (awoo)
 
 
 
 
  • Vote: I like it
  • +85
  • Vote: I do not like it

»
2 weeks ago, # |
  Vote: I like it +6 Vote: I do not like it

Thank you codeforces for this Round, Good to see many Div-3, and the standard of questions was perfect for the level of div-3

»
2 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

In problem E, in the second case (where two sections have exactly one section between them), how is the the number of shots required to break these two sections coming as ceil(Ai + Ai+2)/2?

  • »
    »
    2 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    such as A,X,B,if A>B,we can shoot X for B times,then shoot A for ceil((A-B)/2) times,and vice versa.You can find the result IS ceil(Ai + Ai+2)/2.

»
2 weeks ago, # |
Rev. 3   Vote: I like it -7 Vote: I do not like it

I think problem F will be done with Fenwick tree,too.

»
13 days ago, # |
Rev. 2   Vote: I like it +3 Vote: I do not like it

For problem E: is there some binary search solution?

  • »
    »
    13 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    You'd still have to take care of the 3 cases. But you can use binary search to solve for them. I used binary search for one of the cases.

    155757986

»
13 days ago, # |
  Vote: I like it -10 Vote: I do not like it

It's interesting how none of the first three problems required loop.

»
13 days ago, # |
  Vote: I like it 0 Vote: I do not like it

How could problem E hacked so much!

»
13 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Can anyone tell why I'm getting runtime error: Exit code is 2147483647 for submission: 155822852 I tried a lot but not understanding what's wrong.

  • »
    »
    13 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Failing testcase: Ticket 6533

    • »
      »
      »
      12 days ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Thanks, but why does it not run as required?
      There something wrong at line 100 tree[node1].push_back(node2);. But I'm not able to understand why this is happening.

»
13 days ago, # |
Rev. 5   Vote: I like it 0 Vote: I do not like it

After the contest, I successfully hacked most people with this example

3
3 3453 5
»
13 days ago, # |
  Vote: I like it 0 Vote: I do not like it

In problem D, why does the parity of n determine i

  • »
    »
    12 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    n is length of the array "a", so if length of array "a" is even, you start checking adjacent elements from index 0, else if it's odd you start checking adjacent elements from index 1. This is because if you observe, if length is odd, then after all the operation the first element of "a" will remain at first position at "c".

»
13 days ago, # |
  Vote: I like it +3 Vote: I do not like it

If you prefer command line, checkout CF Doctor for more flexibility and faster feedback.

If you are/were getting a WA/RE verdict on problems from this contest, you can get the smallest possible counter example for your submission on cfstress.com. To do that, click on the relevant problem's link below, add your submission ID, and edit the table (or edit compressed parameters) to increase/decrease the constraints.

If you are not able to find a counter example even after changing the parameters, reply to this thread (only till the next 7 days), with links to your submission and ticket(s).

»
13 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Problem D is kinda sus

»
9 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Anyone overcame testcase 32 of Problem E after getting WA? Or, any equivalent short length testcase please?