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

Автор chokudai, история, 4 года назад, По-английски

We will hold UNICORN Programming Contest 2022(AtCoder Beginner Contest 269).

The point values will be 100-200-300-400-500-500-600-600.

We are looking forward to your participation!

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

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

Probably my first time solving 6 problems in abc and quite early.

It seemed easier than usual.

I'll refrain from further thoughts until the end the contest.

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

Even though it is one of the very few tims for me solving 6 problems in abc, I don't feel any sense of accomplishment. It felt boring tbh

A. Useless as always
B. Bruteforce, ok..
C. So standard that is googleable
D. Standard dfs/bfs problem. Adding hexagons to it changes nothing /:
E. It feels like the problem being interactive is the only dificulty here. Observation itself is on the level of typical D2B/D2C on codeforces
F. Here again the only challenge is not to get some off-by-one. But I guess it was fine
G. Was not able to solve. But feels like we should exploit the fact that most cards have be indistiguishable by (a- b) difference

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

Demolished by problem F. Maybe I just wasn't careful enough.

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

What's the observation on G? It looks like standard subset sum but bounds are linear:/

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

I made a mistake in E by querying the columns using the 'answer' for the row (where A==B). Instead I should use A=1 and B=N when querying the columns.

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

Was not able to implement E within aprox 10 submissions caused by stupid erorrs like no '?' in query output.

There should be some option to prevent this, it feels wrong to fail at something like this.

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

great problems F & E were cool

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

After reading editorials of problem G, I finally realize how many amazing tricks are involved there!

The first one is that: we compute S=a1+a2+...+an, and when flipping some card, it means S-(ai-bi). Thus, the problem is equivalent to: giving S, and d1=a1-b1, d2=a2-b2,..., we should find the minimum number of steps to reach some integer of S-di-dj-...

The second one is: we divide (d1,d2,...,dn) into several groups of (ni, vi), where ni denotes the number of values which are equal to vi among (d1,d2,...,dn).

The third one is: prove that there are at most O(M^(1/2)) distinct values of vi. I missed this observation though I guess that some kind of sqrt decomposition idea might be used during contest.

The final one is: decompose vi into "binary form" so that ni is reduced to log(ni). I really remember that I have seen this trick during my virtual participation, which is based on a knapsack problem, but, I am sorry that I have tried my best but still could not find out which problem it is. If someday I get it, I would like to share it with everybody.

Finally thanks to the problem writers for coming up with such clever problems.

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

How to solve Ex? Naive way is $$$dp[i] = \Pi_{u \in children[i]} dp[u]$$$ using NTT and then adding one to $$$dp[i][1]$$$ . How to optimise this?