We will hold AtCoder Beginner Contest 461.
- Contest URL: https://atcoder.jp/contests/abc461
- Start Time: http://www.timeanddate.com/worldclock/fixedtime.html?iso=20260606T2100&p1=248
- Duration: 100 minutes
- Writer: vwxyz0, evima, physics0523
- Tester: sounansya, physics0523, Nyaan
- Rated range: ~ 1999
- The point values: 100-200-300-425-475-500-625
We are looking forward to your participation!








looking forward to it
you can practice topic wise and difficulty wise sorting on this Atcoder Tags to get better in future.
what the hell????
wtf i am providing a resources for people to become better and people here are down voting it.....
W
looking forward! This will be my first at game!
I hope i can solve ABCDEF
If there's strings questions Im cooked
UP!BIG!SCORES!
My first competition at Atcoder!
mine also_
Oh!E is too hard
It's very good.This will be the best match I have ever had.
Today is June 6(China time), 2026, Saturday, have four sixes 6,6666.
This is an auspicious date.
a very strange problem in C, if the statement was the chosen gems must have at most M distinct colors.
solve greedly sort based on value u can take if u ever have seen that color or distinct count is less than m
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
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
The answer will be 17 for this case, not 12. Atleast 1 distinct value of colour is required, not excat.
I'm saying if the question is at most m (i.e 1 in this case)
Sorry, I misunderstood
D and E are so annoying
Problem G can be solved in O(n+m).submission
hacked: 5 6 1 3 1 4 1 5 2 3 2 4 2 5
This is my first competition at atcoder, i am able to solve only A. :(
Wtf is D? It lets an O(n⁴) brute-force solution pass but TLEs my O(n³) solution due to constant-factor optimization.
D can be passed with O(n^4), E and F have similar problems.Apart from that,quality is not bad
Damn!! I didn't submitted O(n^4) because I thought it was going to get tle..
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?
?????????????????????? my n^3logn is also TLE
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.
Too much people use AI to solve problem.
Why downvotes? It's truth, and many AI cheaters still haven't been banned till now.
Why can D pass O(n^4)???
my english is bad lol
Hello,@atcoder_official,it seems that the editorial of F's en-translated version make some a to e.
Can someone share the approach of D like the bruteforce one which got accepted ?
You can learn to use 2D prefix sum (translated by AI)
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.
Is AtCoder worth trying and spending time in it, and what is the difference between atCoder and Codeforces ??
what'd the cf type rating range be for problem F?