We will hold UNICORNProgramming Contest2026(AtCoder Beginner Contest 477).
- Contest URL: https://atcoder.jp/contests/abc477
- Start Time: http://www.timeanddate.com/worldclock/fixedtime.html?iso=20260926T2100&p1=248
- Duration: 100 minutes
- Writer: Nyaan, harurun4635, vwxyz0
- Tester: cn449, physics0523
- Rated range: ~ 1999
- The point values: 100-200-300-400-450-525-625
We are looking forward to your participation!








Hopefully I solve A-D this time, goodluck everyone
me toooo
No convolution problems plz
No trash round plz.
its clear now
Why are all scores "???" on Atcoder
Why are all the scores for this contest's problems '???'?
++
66, DMY Student?
?
There are no '???'s now.
That's a good question. '???' means that the score is not yet determined.
really want to solve E!!!!
I hope to answer questions ABCDE 5.
Good morning
wtf it's 11 pm here
hhh in fact it's 8 pm here that time
I can solve D but can't solve C?
1
Is the difficulty of this ABC test really the same as last time? I think it's much harder than the last one.
I don't think so.
Rating this contest is the worst choice I've ever made.
I didn't read C carefully so I try to use KMP to solve the problem.
D struck me 40min and I have no time to write F(a simple Nested Segment Tree).
Hope I can get any ratings.
Can you explain your idea for F?
By using a Nested Segment Tree(2D Segment Tree).
And then the problem turned to be a model problem.
what is even 2D segment tree I mean could you please explain on how it work in this setting of problem F I'm interest in the idea you share brother,
by what is even 2D segment tree please just give me short explanation, what I wonder was like how was it represent in such a big N*M grid ? or was it some form of not fully manifest 2D N*M memory but like pointer implementation or something? the one that you work with.
i took way too long for C :sob:
in D, what happens to the color of the square when a tile is placed on it. I mean what is the final color ? couldn't solve it.
Nothing will happen.
I solved it in a trash lazy-tag segment tree.
Is it normal to be able to do D but can't do C?
Easy E,Hard F,Confusing D
Can you please briefly explain your approach for E ? I was stuck :(
This is how I did it:
By the name of the problem you can see a wheel kind of graph being formed. Now you want to go from S to T. If we do not want to use N+1 node then we can simple calculate the cost using prefix sum of the circle, and see which is less the clockwise way or the anticlockwise way.
Now you want to use the N+1th node, most general form of path from S to T will look like S -> S+1 -> ... -> X -> N+1 -> Y -> ... -> T. The cost will be cost(S,N+1) + cost(N+1,T). To calculate cost(N+1,x) we can start a dijkstra from N+1, since cost(x,N+1) = cost(N+1,x). Just a point to remember while implementing dijkstra is that you can go both from u to u+1 and u-1.
So finally answer will be
If t==n+1, simply return d[s] else
Staying on the circle clockwise, ans = prefixA[t-1]-prefixA[s-1]
Staying on the circle anticlockwise, ans = total-(prefixA[t-1]-prefixA[s-1])
Using N+1th node, simply d[s]+d[t], ans = min(d[s]+d[t],case2,case3)
sort queries forces.
由中国的吗?
有的有的
我直接轻松绷住,E题思路比D题思路简单,轻松绷住(ac)ABCE题
Codeforces is a international platform, so speak English.
You can speak Chinese at Luogu or Qoj.
First NEGATIVE delta
Can someone explain how to solve D?
how to solve F?
where Query(x, y) is the counts of black cells from (0, 0) at top left -> to (x, y) at lower right,
this is very clear right I think the idea was somewhat simple in my eyes when we think about it in terms of culmulative sum function.
so now what is left is to how to know the Query(x, y) right ?
for each set of {A, B, C, D} we know we need to pre-cal {Query(B, D), Query(A-1, D), Query(B, C-1), Query(A-1, C-1)}
after considering all set of {A, B, C, D} given from queries we know what are all Query(i, j) we must pre-cal right?
for all Query(i, j) we need to pre-cal sort it in asending order from lower i to larger i.
then the process of calculating what Query(i, j) is equal to will be like the sum of all BLACK CELLS from column 1 to j in row 1 to i <--- important, I said in row 1 to i and we calculate i in asending order this means it like those sweep line thing people call, you can simply calculate this using segment tree with lazy propagation which has range addition update(+1 to range [L, R]) which is the most basic variation of it.
I hope this is clear and helpful enough, I have no more ability to simplify it to any simpler word this is the best I can answer to you.
Can someone tell me why my solution for D is WA? Here's my code:
oh maybe you should care about the extra case like this: The tile was uncovered, nothing happened, the tile was covered again.(or maybe the q operations ended.)
Would you mind providing me with a sample test case that would make my code output an incorrect answer?
3 3 1 1 2 b 1 1 The right answer: abb Your answer: bbb
Thanks!
Someone, if you solved F, please give me the approach, i have exhausted everything i had to solve that and couldn't progress a bit:(.
hey try to find prefix sum from point (0,0)
pref(x,y) = sigma i=1 to i=x (min(r[i],y) — min(l[i]-1,y))
after you understand why this formula works simply process all the required prefix sums offline by sorting wrt x in pref(x,y), you can simply use 4 fenwik trees to compute the expressions