atcoder_official's blog

By atcoder_official, history, 17 months ago, In English

We will hold AtCoder Beginner Contest 401.

We are looking forward to your participation!

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

| Write comment?
»
17 months ago, hide # |
Rev. 3  
Vote: I like it +32 Vote: I do not like it

The first Unrated ABC for me!

Today I'll start from G :)

UPD: G taught me a lesson: relative error is not the same as absolute error :(

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

Hope the 575 is the real 575.

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

kenkoooo's submission page was back!!! YESSS!!!

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

I can't understand this(at 20:03):

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

    What's your timezone? In JST the contest truly starts at 21:00.

    I don't believe you're true North Korean. (In your profile you set your country to be North Korea)

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

Was problem D pulled from the concentration camps in North Korea? Because it is pure torture.

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

**Hope my performance will be higher than ABC400.

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

The problem D is very interesting . Thank you , the question setter !

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

I'm a strange man that can see only the first AC time of each problem.

I'm curious, is D the hardest problem in this contest?

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

The contest is not good!A,B,C is very esay,but D……

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

Nice problems. Solved 5 without any penalties :)

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

Hi everyone!

I didn't manage to solve problem E within the contest duration

Can someone explain me the idea of it?

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

    To solve the problem for $$$1,2,3,\dots,k$$$, you need to solve the two subproblems:

    • Whether vertices $$$1,2,3,\dots,k$$$ form ONE connected component(CC). If not, the answer is $$$-1$$$.
    • Otherwise, the answer is how many other vertices (that is, $$$ \gt k$$$) the only CC connects to via one edge.
»
17 months ago, hide # |
 
Vote: I like it +10 Vote: I do not like it

So much cheating via generative AI ;(

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

I use FFT to solve $$$\sum\max(A+B,d)$$$ in F and totally forget what two pointers are.

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

Ouch! I has found the correct way to slove D for about $$$20$$$ minutes, but I have not made it till now.

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

Thanks for the Big sample 4 in E, it really matters

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

It seems I'm just too bad at this.

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

For those who solved Part — D , Can you say, whether have I used the right approach, and say why my code fails around 20 testcases

This is My code :

N,K = map(int,input().split())
S = input().strip()
arr = list(S)
currK = 0
fill = 0
if N == 1:
    if K == 1:
        print('o')
        exit()
    if K == 0:
        print('.')  
        exit()  
for val in arr:
    if val == 'o':
        currK += 1 
    if val == '?':
        fill += 1    
for ind in range(1,N-1):
    if arr[ind] == 'o' and arr[ind-1] == '?':
        arr[ind-1] =  '.'
        fill -= 1
    if arr[ind] == 'o' and arr[ind+1] == '?':
        arr[ind+1] =  '.'  
        fill -= 1  
if arr[0] == 'o' and arr[1] == '?':
    arr[1] = '.'
if arr[N-1] == 'o' and arr[N-2] == '?':
    arr[N-2] = '.'
if fill == K-currK:
    for ind in range(N):
        if arr[ind] == '?':
            arr[ind] = 'o'
            fill -= 1
if  K-currK==0:
    for ind in range(N):
        if arr[ind] == '?':
            arr[ind] = '.'
            fill -= 1
print("".join(arr))
»
17 months ago, hide # |
Rev. 2  
Vote: I like it 0 Vote: I do not like it

why this submission for C is wrong ? It's the same ediotrial soltuion typically The Submission

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

Please define the relative error in future problems requiring floating-point arithmetic, like codeforces does. I didn't submit a correct solution only because its error appeared to be too big.

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

G's Time Limit is so tight, and if I memset some __int128 array, I'll get TLE while I can AC if I don't use __int128 at some arrays. Very sad and can't enjoy :(

Crying, sobbing.

Maybe because I'm to lazy...

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

    I think there is no need to use __int128? everything works well under double.

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

    My solution that should perform about 3e9 long double operations passed comfortably, idk what you're using int128 for

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

why was D so hard

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

    Why?? We only need to handle some cases.64765782

    • before and after existing 'o' there will be '.'
    • (max possible places for 'o')> (remaining k them) they can be placed anywhere
    • else for every continues '?' even count there are 2 ways, and for the odd one.
    • if K=0 all '?' -> '.'
»
17 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

D was the hardest problem. E, F and G are pretty easy :/

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

Why is it that when I test the sample of G question, the 1e-2 level is different, but the submission is also ac