Two contests AtCoder Regular Contest 072 and AtCoder Beginner Contest 059 will be held at the same time.
You can participate in whichever contest you want. (However, you can't register to both competitions.) The last two tasks in ABC are the same as the first two tasks in ARC.
Time: April 22nd (Saturday), 21:00 JST
Duration: 100 minutes
Number of Tasks: 4
writer: hogloid
Rating: 0-2799 for ARC, 0-1199 for ABC
The point value are:
ABC: 100 — 200 — 300 — 500
ARC: 300 — 500 — 900 — 900
We are looking forward to your participation!
How to Solve Problem D?
write stupid solution, and then you can notice that if abs(x — y) <= 1 answer is Brown else Alice
It seems that this way helps a lot.
Implementing a Brute Force Solution then trying to notice the Sequence.
Nice Job 300iq Thank You.
Can you post the stupid solution?
I could not even write that stupid solution correctly :(
I think this is enough.
Ohhhh,I put in the code powers of 2 ,not multiple of 2 :(
I think even only this is enough :D
can anybody give hint for C? Greedy solution was incorrect.
"For every i (1≤i≤n−1), the sign of the sum of the terms from the 1-st through i-th term, is different from the sign of the sum of the terms from the 1-st through (i+1)-th term."
From this we know that the sign of the prefix Sums of the Solution will be like that in the end
+Ve, -Ve, +Ve, -Ve, +Ve, ... or -Ve, +Ve, -Ve, +Ve, -Ve, ...
So just take the minimum of transforming the Original Sequence to Both Solutions.
If You are trying to transform the Sequence to one of the Solutions and the prefix sum of the first i elements should be positive but now it is negative you will need to make some operations to make the sum 1 (The least positive number), and If You are trying to transform the Sequence to one of the Solutions and the prefix sum of the first i elements should be negative but now it is positive you will need to make some operations to make the sum -1 (The biggest negative number).
Thank You! I tried for any one sequence. If first one is +ve than +ve unless negative. Nice Approach.
How to solve E?
for each index i find the smallest number which the suffix [i + 1 , n] cannot handle.
They have provided a very elegant solution in the editorial. You could refer to it for understanding.
Here is the link : https://arc072.contest.atcoder.jp/editorial