We will hold AtCoder Beginner Contest 407.
- Contest URL: https://atcoder.jp/contests/abc407
- Start Time: http://www.timeanddate.com/worldclock/fixedtime.html?iso=20250524T2100&p1=248
- Duration: 100 minutes
- Writer: sheyasutaka, MMNMM
- Tester: physics0523, kyopro_friends
- Rated range: ~ 1999
- The point values: 150-250-300-425-450-550-600
We are looking forward to your participation!









In the fourth problem ,I didn't get scores for two testing points. who can help me? i will subscrible you.
DON'T talk about the problems during the CONTEST!
Hello, I'm beginner. Could anyone tell me which test case in problem C I might have missed?
My code :
What if S only contains one character?
Can anyone please help me out? My solution is failing on 1 testcase.
My approach was:
xorvalue of uncovered cells and takemaxover all valid masks.WHICH CASE DID IT WRONG IN. IT PASSED 11 CASSES, 1 TLE 5 REs. Why is it wrong ? It worked for all cases given in problem description
Since $$$|S|\le 5\times 10^5$$$, and your function
transform_numberhas a time complexity of $$$O(n^2)$$$ (by string slicing) and you even call it more than once, it'll definitely TLE. Btw, the reason of your RE might be that the interpreter stored all the result strings produced by slicing operations.link to complete solution — https://atcoder.jp/contests/abc407/submissions/66133301
for 4th question I checked if the mask formed by a number can be a valid domino placement using this function
so if domino placement looks like
my mask should be
110011010001I thinkbasically I am checking last set bit of a mask and removing that bit and one of its neighbor (
posandp) and remaining mask will be smaller so that can be checked with a DPI suspect this logic might be wrong as other parts of my solution seem simple, but I am getting almost all WAs :P .. can someone help please
nothing wrong with my logic... i am reading 32-bit integers for array values .. but it should be 64-bit long long values ... yikes man !!!
I think F=MAXI.
It is. I use yuantiji and it gives me the same problem.
can someone please explain E?
I think i use a different procedure than edito.
Build the answer 2 char by 2 char, maintaining a heap of values on ")". Either append () or if there is a ) before and it gives more point to flip it to ( and append )) do that.
Can anyone please explain approach to problem D. I saw the constraints were very low and thought of recursion. I thought of generating all possible domino placements and finding the maximum answer. However I was unable to code it out.
Your idea is correct.
Can segtree work for F ? each node contains the answer for the segment, and a prefix max and suffix max of the segment.
I'm unsure of the time complexity.
I understand how to solve E, but still can't solve the D. any things please.
I made a mistake of not initializing one variable in G and got WA on samples. I lost my AK :(
Can someone explain E ?