Unofficial Editorials January Cook Off

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.

Including you @vijju123 :stuck_out_tongue:

You just made 1718 people feel like genius with that xD

2 Likes

Yeah i was wondering how could so many people solve so fast

1 Like

Nice one :smiley: @abdullah768

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 :slight_smile:

Do they plan to release the official editorial for the MAGA problem? -_-

We will soon provide the official editorial. So sorry for the delays :frowning:

1 Like

For 18 out of 90 valid d_0, d_1 combinations d_4=0. That’s 20%. You call it “edge case”? :slight_smile:

Yeah, i just called it Edge case. :stuck_out_tongue:

My choice :wink:

The actual reason to mention it as edge case was, that i forgot to mention it earlier.

Got it bro thanks :slight_smile:

@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 :slight_smile:

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