atcoder_official's blog

By atcoder_official, history, 3 weeks ago, In English

We will hold AtCoder Beginner Contest 453.

We are looking forward to your participation!

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

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hope I can solve E.

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Neko~ Neko~

Hope I can solve E,F

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I hope to solve E.

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hope I can solve E,f and G.

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hope I solve A ad B.

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hope I can solve E

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hope I can solve C

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hope to solve E.

»
3 weeks ago, hide # |
 
Vote: I like it -10 Vote: I do not like it

Notice!!! long long!!!

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I will go insane before I finish D (I am already screaming in my room)

»
3 weeks ago, hide # |
 
Vote: I like it +3 Vote: I do not like it
»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

A<B<C<G<D<E<F

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Terrible Contest

»
3 weeks ago, hide # |
 
Vote: I like it +12 Vote: I do not like it

I can confirm this is yet another horrible contest since abc421.

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Can anyone help with D : submission

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Very easy G for this round, but F a bit tough.

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

What is A? I didn't get the statement language. Help me!

»
3 weeks ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

Terrible contest.

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

ABCDEG

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Wow, a shit G !!!

So basic that G<<<<<F.

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hardest F ever...

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

A<B<C<D<E<G<<<<<<<<<<<<<<F.I think this problem F can be a problem C in an ARC++ contest.

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

F maybe ARC++ problem B ~ C hard.

F is hardest in ABC?

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Why is greedy solution failing for C ??

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

咋整啊 我这个c的测试点总是过不了 哪位大佬来救救我TT (I can never pass the test point for c.Could any expert come to my rescue T^T) ~~~~~ //

include <bits/stdc++.h>

using namespace std;

int main() { ios::sync_with_stdio(false); cin.tie(nullptr);

int n;
cin >> n;
vector<int> step(n);
for(int i=0;i<n;i++)cin >> step[i];
double lct=0.5;
int cnt=0;
for(int i=0;i<n;i++)
{
    if(lct<0)
    {
       lct+=step[i];
       if(lct>=0)cnt++;
    }
    else
    {
       lct-=step[i];
       if(lct<=0)cnt++;
    }
}
cout << cnt << endl;

return 0;

} ~~~~~

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

    the greedy approach does not work (u can use bitmask in $$$O(2^n)$$$ to try every case)

    but i'll try to make a WA case:

    $$$a = [5, 2, 9, 6]$$$, your code outputs $$$2$$$ but optimal is $$$3$$$

    i think your code does: $$$0.5 \rightarrow -4.5 \rightarrow -2.5 \rightarrow 6.5 \rightarrow 0.5$$$

    but notice that moving left instead of right when you move $$$2$$$ steps

    $$$0.5 \rightarrow -4.5 \rightarrow -6.5 \rightarrow 2.5 \rightarrow -3.5$$$

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

Hi, could someone help me to find where is the mistake on my code in Problem F: 74900820

I believe I am doing the same thing with editorial, but my code gets WA on 4 cases.

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

    Your solution is almost perfect, but there is only one blind spot.

    The sum of $$$C_i$$$ isn't capped, and can go up to $$$9 \times 10^{10}$$$. This causes overflow in a 32-bit integer.

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

lol i was late 5mins for the contest i accidentally clicked unrated, but that was good because i wasn't able to solve D :D

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

the D is a 3d bfs????so hard to write.....

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

why don't they provide English editorial this time?and why don't they put the trivial problem G in the contest?it's the worst ABC I have ever participated.

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

very nice E imo

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

KumaTachiRen's Japanese editorial for problem F seems having a flaw.

For ABCDEF, a leaf sequence with $$$L=6$$$. Permuting them to $$$v$$$ with the "odd-first, even-second" fashion yields ADBECF, where $$$|v_i-v_{i-1}|+1$$$ can be $$$3$$$, which is exactly $$$\frac{L}{2}$$$. Therefore, the claim that $$$v_i$$$ and $$$v_{i+1}$$$ locate in different subtree of $$$x$$$ is incorrect.

A easy way to fix it is to employ a "even-first, odd-second" fashion, where ABCDEF is permuted as DAEBFC.