We will hold AtCoder Beginner Contest 387.
- Contest URL: https://atcoder.jp/contests/abc387
- Start Time: http://www.timeanddate.com/worldclock/fixedtime.html?iso=20250104T2100&p1=248
- Duration: 100 minutes
- Writer: Nyaan, yuto1115
- Tester: MtSaka, sounansya
- Rated range: ~ 1999
- The point values: 100-150-350-400-500-550-675
We are looking forward to your participation!
kool
Wow! Looking forward to solve 5 problems.
Okay I hate C , gutted
yesssss :(((((
Wow! Looking forward to solve 4+ problems.
I am Chinese.
I am Chinese too
I am Chinese too.
I am Chinese too
I am Chinese too
I am Chinese too
Hope to solved 5 problems!
But...
The problems this time are so strange, that solving C,D is harder than usual.
Wow! Looking forward to solve 4+ problems.
I Hope I Can Go To Brown Name
Hope to solve 4 or more problems!
Hope to accept the problem D!
I love the cuteness of the first 3 problems in ABC contests how submissive and obedient they are, I love the feelings of domination.
I sloved 2 problems.a&b
i too, c sucks
a and b were very easy. but c ? i could not find any technique.
There is a general approach to deal with this kind of problems called digit dp.
why so hard on c
im hard too
For me, the D is hard.
E is so hard, even harder than F
In my opinion, the order of the problems isn't quite right. $$$D$$$ and $$$F$$$ are classic problems, while $$$C$$$ and $$$E$$$ require more thinking. The results show that fewer contestants solved $$$C$$$ than $$$D$$$, and fewer solved $$$E$$$ than $$$F$$$. The difference is almost double.
People needs to think but they don't like thinking so you must push them to think, now a lot of contestants got a change to actually exercise problem-solving by struggling with problem C.
Atcoder needs to use more testers!
That's how I thought during this contest:
why there are so many 2025?
why 2025 is in every problem?
why 2025 is so special?
wait
ac-predictor tells that I could get a new rating of 2025?
2025 is so magical!
ok pro
which extension you are using to predict the ratings on Atcoder?
avalible on GreasyFork.
Unfortunately, your rating became 2026 instead of 2025.
very educational contest for me. learned that pow doesnt give good precision + dijkstra is god damn slow.
I solved every problem except C today LOL
What is the intended solution of C? And any hint for E please?
ans = count of snake numbers in [10, R] — count of snake numbers in [10, L — 1]
Submission
I meant how to find answer in [10, R]. I solved it using digit DP, is there an easier way of solving it?
brute force for all possible no. of digits
For E, try to think about the divisibility properties of two consecutive numbers. I tried first 10 and 11, 9 and 10 and so on... The good thing I figure out is that if you find some number with sum of digits 8 and divisible by 8, then the next number will have sum of digits 9 and be divisible by 9.
Brute force below n = 10^5.
Consider divisibility rules under 10. Which ones are nice to work with?
Numbers with sum of digits 1,3,9 are always good, due to the rules for 3 and 9 considering the sum of digits.
Try a sum of 2 for the first number and 3 for the second, or 8 for the first and 9 for the second. See if you can construct values that cover an entire order of magnitude (e.g. values from 1500-15000), such that you use 4 or less digits for the lower bound.
Extend your values from Hint 4 to any arbitrary length number.
now i need to learn about functional graph, it has been haunting me in every contest
Didn't like C and E :(
Me too.I solved D but didn't solve C
only able to solve first 2 question.. I'm doomed!!
Forgot to MOD the ans in F ,realised after contest ended :(
For problem G, the composition of formal power series is not needed.
The editorial calculated $$$F\circ G$$$ where $$$F=\sum_{i\leq 0}\frac{x^in^{i-2}}{i!}$$$. Distribute the $$$n^{i-2}$$$ factor into $$$G$$$, i.e., replace $$$G$$$ with $$$\frac{G}{n}$$$, and the problem becomes calculating the exponent of the formal power series.
May I ask what editorial are you referring to? I don't see any mention of $$$n^{i-2}$$$ in this editorial:
https://atcoder.jp/contests/abc387/editorial/11875
ok, I assume it is this one: https://atcoder.jp/contests/abc387/editorial/11873
(and I also assume $$$i>0$$$, not $$$i\le 0$$$)
why is this failing for problem D: code ?
i cant seem to figure out whats wrong here
The minimum distance travelled to reach a node need not be the same from both directions (as explained in the diagram).
It is also possible that a node is reachable only from 1 direction.
So it is possible, for a node $$$(i, j)$$$, that the distance to $$$(i, j)$$$ is less when reached after a horizontal step, but the destination can only be reachable when $$$(i, j)$$$ is reached after a vertical step.
thank you so much! i cant believe i missed this.
Problem C was really cool! Took a lot of time but felt very satisfied after solving it.
After I got stuck in C for 50 minutes:
Me while doing A-B : I can solve every problem in the world!!
Me at C : I think this is not the right world..
E is just testcases , D is garbage implementation ,score distribution is random,this contest sucks.
If you don't feel good solving a problem and the problem is not valuable, then refrain from solving it.
So, you should have refrained from solving at least problem D, no matter how that affects the rating. Do you agree?
Problem C surprised me.It was my first time to use Digital DP to solve problem C in ABC.
Personally surprised everyone found E hard; I personally found E to be surprisingly easy when considering that you can extend values by inserting 0 in the middle of the number and then working with "easy" divisibility rules that don't care about that (1,2,3,4,5,6,8,9, but especially 2,3 and 8,9 since they're consecutive and 1 and 5 can immediately be shown to be impossible to manipulate this way under the constraints, though pairing 3 and 4 can work as an alternate construction, specifically by extending (111,112) to (1011,1012), (10011, 10012), etc.).
Was only able to solve A,B,D, Wasted a lot of time on C
For problem E, I solved it case by case, by using one of the following patterns:
starting with 11, 80, 62, 53, 35, 26, 17, while ending with all zeros. A really impressive constructive problem!
An explanation for problem C will be appreciated... I don't even understand how I can approach this problem.
please tell me why I got wrong on D, I had wasted a lot of time and I am upset
I am confused about why I got wrong…… help me plz
You should consider if it is the same when arriving at a point from left/right and up/down.
I had considered it, but I cant construct a sample to prove that my code is wrong.....
can anyone explain whats mistake in this code for que D
you should consider the way your start, first bfs starts horizontally,and bfs again vertically, you can try this sample 5 5 ..S.. ..... ..... ...G. .....
Ok got it thanks
(This is from Atcoder Editorial for Problem C) Can anyone explain this with an example: If d1 ≤ di for some i (2≤i≤k), then there are none. Otherwise, the (k+1)-th digit should be less than d1 and d_k+1, and the (k+2)-th and succeeding digits should be less than d1, so there are min{d1,d_k+1} × d1^(n−(k+1)) of them.
For suppose take example 8695 there is a digit 9 which is greater than 8 so it is not a snake number largest snake number less than 8695 is 8677 (if u find any digit>=first digit) from that position make all digits after that position first digit-1
calucuate snake numbers less than that number.8677. <8000 it is easy to calculate using combinatorics 7^3+6^3+...1^3+dp[2] dp[2] is no of snake numbers less than 10**2 .
For 8000-8677 867_ for last digit 7 possibilities
86__ 0-6 digits possible for 3rd digit and for 4th digit 7 possibilities 7*6=42 ...so on
I'm sorry I didn't quite get editorial of E. So they just throw some constructions, then there are some dots implying that there are some more constructions? And why there won't be other twin numbers?