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

Автор atcoder_official, история, 18 месяцев назад, По-английски

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!

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

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

Managed to solve C just because I remembered of

,which I suffered for a long time trying to solve

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

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

»
18 месяцев назад, скрыть # |
← Rev. 3  
Проголосовать: нравится +8 Проголосовать: не нравится
»
18 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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

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

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

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

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

»
17 месяцев назад, скрыть # |
← Rev. 5  
Проголосовать: нравится +13 Проголосовать: не нравится

Good contest

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

C is almost the same as 825E.

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

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 месяцев назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +3 Проголосовать: не нравится

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 месяцев назад, скрыть # |
 
Проголосовать: нравится -8 Проголосовать: не нравится

Can someone explain B? The intuition etc...