atcoder_official's blog

By atcoder_official, history, 3 months ago, In English

We will hold AtCoder Beginner Contest 461.

We are looking forward to your participation!

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

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

looking forward to it

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

you can practice topic wise and difficulty wise sorting on this Atcoder Tags to get better in future.

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

looking forward! This will be my first at game!

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

I hope i can solve ABCDEF

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

If there's strings questions Im cooked

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

UP!BIG!SCORES!

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

My first competition at Atcoder!

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

Oh!E is too hard

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

It's very good.This will be the best match I have ever had.

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

Today is June 6(China time), 2026, Saturday, have four sixes 6,6666.

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

a very strange problem in C, if the statement was the chosen gems must have at most M distinct colors.

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

    solve greedly sort based on value u can take if u ever have seen that color or distinct count is less than m

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

      yeah sounds easy, but won't work like that, if you have gems for like {{1, 9}, {2, 8}, {2, 4}, {1, 2}}, k = 2, m = 1, by doing your approach the answer would be 9 + 2 = 11, but the optimal answer would be 8 + 4 = 12. with DP we can solve this easily, but in terms of big constraints like n = 1e5, it's far beyond my level

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

        you can sort based on the value(the whole pair) , then pick m different colours using a set or unordered_set and storing the values of the already taken ones, then pick the remaining (max(0,k-m) from the stored avail ones, works in n.logn

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

        The answer will be 17 for this case, not 12. Atleast 1 distinct value of colour is required, not excat.

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

D and E are so annoying

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

Problem G can be solved in O(n+m).submission

»
3 months ago, hide # |
 
Vote: I like it -13 Vote: I do not like it

This is my first competition at atcoder, i am able to solve only A. :(

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

Wtf is D? It lets an O(n⁴) brute-force solution pass but TLEs my O(n³) solution due to constant-factor optimization.

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

D can be passed with O(n^4), E and F have similar problems.Apart from that,quality is not bad

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

    Damn!! I didn't submitted O(n^4) because I thought it was going to get tle..

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

    how? can you please explain? isn't (500x500)^4 is an astronomically large number? same with 500^4 I don't think that is solvable in less than 4 seconds? what is the value of n?

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

    ?????????????????????? my n^3logn is also TLE

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

    This is a O(n^4) code from my classmate. And AI said it passed because:

    GCC auto-vectorization carries the load. The innermost loop body reduces to A[y2] — B[y2] == constant after hoisting, which GCC vectorizes via AVX2 (8 ints per op), slashing the effective iterations by 8×. That alone brings it under the 4s limit.

    Perfect branch prediction. For most subgrids sum ≠ k, so the if() branch is almost never taken. Cache-friendly. The prefix sum array is ~1MB and fits in L3; inner loop accesses are contiguous. 4-second time limit (not the usual 2s).

    Bottom line: it's not "weak test data alone" — the compiler genuinely chews through 15.7B operations via SIMD. The intended O(H²W) solution is still the "correct" approach, but GCC 15.2 + AVX2 made brute force surprisingly viable.

»
3 months ago, hide # |
 
Vote: I like it -13 Vote: I do not like it

Too much people use AI to solve problem.

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

Why can D pass O(n^4)???

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

Hello,@atcoder_official,it seems that the editorial of F's en-translated version make some a to e.

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

Can someone share the approach of D like the bruteforce one which got accepted ?

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

The most ridiculous cheater: Expert_Dream06 and Expert_Dream.

Evidences

It's obvious that Expert_Dream's code are entirely written by AI.

And Expert_Dream06's has the exactly same logic & implementation as Expert_Dream's. They only used some self-written templates (FastIO, Segtree, Dinic) to escape code similarity check.

I guess this two accounts belong to one person since the username similarity > 99% and they both set codeforces Id gsczl71 (or they won't have so similar code).

Fun fact: this Expert_Dream-er is only a specialist.

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

Is AtCoder worth trying and spending time in it, and what is the difference between atCoder and Codeforces ??

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

what'd the cf type rating range be for problem F?