atcoder_official's blog

By atcoder_official, history, 18 months ago, In English

We will hold AtCoder Regular Contest 200 (Div. 2).

The point values will be 500-600-700-700-800.

We are looking forward to your participation!

  • Vote: I like it
  • +26
  • Vote: I do not like it

| Write comment?
»
17 months ago, hide # |
 
Vote: I like it +19 Vote: I do not like it

Managed to solve C just because I remembered of

,which I suffered for a long time trying to solve

»
17 months ago, hide # |
 
Vote: I like it +14 Vote: I do not like it

in A, I was trying to do this.

we can write the inequalities as

$$$ SUM_a + (x_i - 1).a_i + (x_j - 1).a_j \gt 0 $$$
$$$ SUM_b + (x_i - 1).b_i + (x_j - 1).b_j \lt 0 $$$

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

»
17 months ago, hide # |
← Rev. 3  
Vote: I like it +8 Vote: I do not like it
  • »
    »
    17 months ago, hide # ^ |
    ← Rev. 3  
    Vote: I like it 0 Vote: I do not like it

    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

»
17 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

In today's C, I mistakenly used topological sort as the solution TAT

»
17 months ago, hide # |
 
Vote: I like it +16 Vote: I do not like it

I think C can be solved in $$$O(N^2)$$$. Submission

»
17 months ago, hide # |
 
Vote: I like it +14 Vote: I do not like it

I think that problem A is significantly more difficult than problem B, even more than problem C.

»
17 months ago, hide # |
← Rev. 5  
Vote: I like it +13 Vote: I do not like it

Good contest

»
17 months ago, hide # |
 
Vote: I like it +19 Vote: I do not like it

C is almost the same as 825E.

»
17 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

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...

»
17 months ago, hide # |
← Rev. 2  
Vote: I like it +3 Vote: I do not like it

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

»
17 months ago, hide # |
 
Vote: I like it -8 Vote: I do not like it

Can someone explain B? The intuition etc...