We will hold AtCoder Regular Contest 200 (Div. 2).
- Contest URL: https://atcoder.jp/contests/arc200
- Start Time: http://www.timeanddate.com/worldclock/fixedtime.html?iso=20250615T2100&p1=248
- Duration: 120 minutes
- Number of Tasks: 5
- Writer: sounansya
- Tester: Nyaan, maspy
- Rated range: 1200 ~ 2399
The point values will be 500-600-700-700-800.
We are looking forward to your participation!








Managed to solve C just because I remembered of
Course Schedule II
,which I suffered for a long time trying to solve
in A, I was trying to do this.
we can write the inequalities as
for the sake of simplicity, let $$$ s_a = SUM_a , s_b = SUM_b , x_i = x , x_j = y $$$. now solving for y will give
$$$ y \gt \frac{C_1 - x.a_i}{a_j} $$$ where $$$ C_1 = a_i + a_j - s_a $$$
$$$ y \lt \frac{C_2 - x.b_i}{b_j}$$$ where $$$C_2 = b_i + b_j - s_b $$$
Let $$$ x_i = 1 $$$ so the inequalities become
$$$ y \gt \frac{a_j - s_a}{a_j} $$$ and $$$ y \lt \frac{b_j - s_b}{b_j} $$$
Combining these would give
$$$ \frac{a_j - s_a}{a_j} \lt \frac{b_j - s_b}{b_j} \Rightarrow 1 - \frac{s_a}{a_j} \lt 1 - \frac{s_b}{b_j} $$$
So the necessary condition becomes
$$$ \frac{s_a}{a_j} \gt \frac{s_b}{b_j} $$$ which can be easily checked in $$$ O(n) $$$. Also once we know this condition satisfies our $$$ y $$$ which was $$$ x_j $$$ lies in the range $$$ (1 - \frac{s_a}{a_j}, 1 - \frac{s_b}{b_j})$$$ [Note the half open interval]
With these we can have all $$$ x_i = 1 $$$ except for one. In theory, this should work but I'm getting wrong answer and I don't really know what's going wrong. Some help would be appreciated!
Submission
Why topo sort got WA on C???
https://atcoder.jp/contests/arc200/submissions/66812236?
Try to understand this counterexample, this helped me.
1 4
1 6
7 8
2 3
4 5
Expected : 3 4 1 2, your code : 4 1 2 3
Basically you need to push "1" in the priority queue as soon as possible and so do 2, 3, ... ,n
OK, got it!
Sad, I can never do the best choice using topo sort.
In today's C, I mistakenly used topological sort as the solution TAT
Haha, here same, the sample is too weak :(
I think C can be solved in $$$O(N^2)$$$. Submission
I think that problem A is significantly more difficult than problem B, even more than problem C.
Good contest
C is almost the same as 825E.
A's editorial uses signed area of parallelograms with cross product logic if I'm not wrong and I can't get the intuition. someone help please...
Good D! However my MO classmate (doesn't know how to write code; just solves it on the paper) solves ABD, and solves E after given some hints.
OI<<<MO :D
Can someone explain B? The intuition etc...