chokudai's blog

By chokudai, history, 6 years ago, In English

We will hold AtCoder Beginner Contest 194.

The point values will be 100-200-300-400-500-600.

We are looking forward to your participation!

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

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

This contest will be also hold on the old rating system, right?

Btw, when will the contests hold on the new rating system?

»
6 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Gentle reminder!

»
6 years ago, hide # |
 
Vote: I like it +4 Vote: I do not like it

How to solve D ??
Is D hard than E or its only for me :(

»
6 years ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

still can't solve F , how to represent the state?

»
6 years ago, hide # |
← Rev. 2  
Vote: I like it +9 Vote: I do not like it

How to do F ? Is it some sort of digit dp ?

»
6 years ago, hide # |
 
Vote: I like it +4 Vote: I do not like it

I didn't manage to solve D(I would be very grateful if someone could explain it), but I definitely learnt something new from this round, with problem E: https://codeforces.me/blog/entry/57934?#comment-416190.

»
6 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Why i am getting WA in just one test case in E? My code

»
6 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

For D, initially I misread and thought it meant "until the graph becomes fully connected".

»
6 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

My codes for anyone interested

D
E
  • »
    »
    6 years ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    What is the idea with E?

    • »
      »
      »
      6 years ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it

      https://atcoder.jp/contests/abc194/editorial/863

      This is what he did in his solution

      • »
        »
        »
        »
        6 years ago, hide # ^ |
        ← Rev. 2  
        Vote: I like it 0 Vote: I do not like it

        Sorry, I do not get that kind of language. What does it mean pos_i: an array of j such that A_j=i, in the increasing order?

        Edit: Ok, I think I understood.

        pos[0] is a list of positions of all 0 in A[]. Then we iterate pos starting at 0. Foreach list of positions of value i we check if there are two such positions with a difference bigger than M. Because if there is such difference, then this means that there is a subarray in A[] of size at least M without that i.

        • »
          »
          »
          »
          »
          6 years ago, hide # ^ |
           
          Vote: I like it +3 Vote: I do not like it

          In above solution, p[i] stores all positions at which i occurs in the given array. Now, let say i occurs at index j1 and j2(j1 < j2). j1 and j2 are consecutive indexes at which i occurs. so if j2-j1-1 >= m( occurs at distance greater than m) it can be our possible answer. As, he is traversing from 0 to n, first such number will be the answer (as we need minimum value).

          Hope it helps!!