We will hold AtCoder Regular Contest 152.
- Contest URL: https://atcoder.jp/contests/arc152
- Start Time: http://www.timeanddate.com/worldclock/fixedtime.html?iso=20221120T2100&p1=248
- Duration: 120 minutes
- Number of Tasks: 6
- Writer: riano_
- Tester: maspy, Nyaan
- Rated range: — 2799
The point values will be 400-500-600-700-800-1000.
We are looking forward to your participation!
Will participate. Give me 2 Dan.
May not get 2 Dan, but the problems are very interesting!!! Thank you, writer!!!
I'm so proud that I've solved ABD and I'm sure to get positive delta :)
What the hell are the samples? They're so weak
I'm so sad right now. Here is why.
Tried approaching A by constructing the worst case (every gap is one of size 1). Here is the result.
Sympathetic
Any hints for C?
+1
I think the idea behind problem C is quite inspiring, although I still can not understand the editorial. I have realized that selecting some value s means a mirror symmetry, but can't go further. Waiting for some other hints too.
What a weird contest. Difficulty to me was A<E<D=C<<<<B.... I did not prove B too, just convinced myself that its ARC B so guessed some lower bound and it worked.... was also very scared to submit E. Thought I misread but it is strangely that easy.
E is more of a statement parsing problem but in a good sense. I don't think it's an easy problem for most participants because you need good skills in constructing math models and understanding what is important.
B is quite easily solvable if you notice that if they need to pass each other twice, they might as well start at the point where they passed each other for the first time.
That was so hard that I only solved A. :(
and then 1233 -> 1216
for me 1256 -> 1206 :pain:
I were also able to make A only :pain:
What the hell was that ??? I'm 1667 Elo on codechef and 1132 Elo on codeforces and unable to solve problem A. It's ridiculous.
And Editorial provide no explanation of the formula.
I basically solve nothing and learn nothing.
I Will no more do Regular Contest for a long long time...
Go and do more ABC problems. They are much easier.
When you are likely to solve problem E~F in ABC, then back to ARC. I am sure you can enjoy the problems.
Can anyone explain what needed to be done in problem A? and why was it to be done this way!?
I don't understand the editorial to a good extent, maybe someone can help here.
Ordering of the group matters like they will come in the order given there so you just need to let the group sit like upcoming can't seat so here only two kind of group make exists (i.e. size of 1 and 2) so group of size 1 can sit anywhere, ans can be "NO" only when a group of size 2 arrives! with some condition.
So we just need to let groups sit so that it can occupy one or two more space than their own sizes which will lead to not make a sit for upcomers.
Remember group of 2 only will face difficulty always!
My Code
My approach is to simulate the worst case that each arrived group will pick a position one unit away from previous group if possible. i.e. x group1 x group2 x group3 ... where x is empty seats.
Thank you for your participation!
Can anyone prove the solution of B problem, I solved but I can't prove it.
Can someone explain C in detail? I can't understand the solution...
Consider a sorted sequence and arbitrary two operations with $$$s_1$$$ and $$$s_2$$$. The sequence changes by $$$+2(s_1-s_2)$$$, the order of elements is unchanged. Here $$$s_1 = a_p$$$ and $$$s_2 = 2s_1-a_r$$$ for some $$$p,r$$$, so $$$2(s_1-s_2) = 2(a_r-a_p)$$$. Obviously then, if $$$g$$$ is the GCD of all elements, then their remainders modulo $$$2g$$$ can't change. In an even number of operations, it's clear that the smallest possible value of the first element is $$$a_1$$$ modulo $$$2g$$$.
The remainders modulo $$$2g$$$ won't change in one operation either, since $$$2a_p-a_i = 2(a_p-a_i)+a_i \equiv a_i$$$ modulo $$$2g$$$. If the number of operations is odd, all that matters is that the order of elements in the sorted sequence is reversed, so the smallest possible value of the first element could be $$$a_N$$$ modulo $$$2g$$$ instead. (Since $$$g$$$ is the GCD of differences, each $$$a_i = b_i g + r$$$, only parities of $$$b_1, b_N$$$ matter.)
Finally, it's always possible to construct a sequence in which the smallest element is $$$a_1 \% 2g$$$ by first adding and then subtracting some 2*differences, see Bezout's identity. The rule on non-negative elements isn't broken then.
got it. thx.
Why this is wrong for B?
Why are you
--it2
? I think you should just leave it. AC code Linkk