When will the editorial for problem MAGA be up ?
I had been busy the whole day, so i didnât even solve the third problem, let alone writing editorial.
About official editorial, i donât know.
You just made 1718 people feel like genius with that xD
Yeah i was wondering how could so many people solve so fast
Ohh Sorry, I meant official editorial.
âAfter first three digits, only the pattern â2486â repeats till end of the numberâ.
This is not true. It can also be all 0, e. g. 2, 3, 5, 0, 0, 0 âŚ
I have already mentioned it
See edge case mentione above
Do they plan to release the official editorial for the MAGA problem? -_-
We will soon provide the official editorial. So sorry for the delays
For 18 out of 90 valid d_0, d_1 combinations d_4=0. Thatâs 20%. You call it âedge caseâ?
Yeah, i just called it Edge case.
My choice
The actual reason to mention it as edge case was, that i forgot to mention it earlier.
Got it bro thanks
@eugalt - The fact here is, the pattern followed by that case is different which cannot be handled by current algorithm. Plus, how many people were able to catch the case at first try? Not 20% I am sure
I followed a bit general approach for the second problem as I didnât have enough time to actually think of all the edge cases. So I saw in the test cases that after the 3rd element there is a pattern. So I stored that pattern in a vector and checked how many times it will get repeated in the final number.
And then I just added first three numbers+(sum of vector)*(number of times it is repeated in the final number) + remaining numbers.If this sum is divisible by 3, then the answer is YES otherwise,NO.
Here is the solution
Solution