Invitation to Alohomora 2021

Toggle the “Show all contest” icon. Above present coding contests.

1 Like

Oh thanks, I didn’t see that at all, my bad.

1 Like

Reminder : Contest starts in 2 hours. On the contests’ page, toggle the “show all contests” button to see the link or directly access it from here . GLHF!

The contest starts in 10 minutes. Good luck everyone.

How to solve JPUFF?
(in case the solution is based on flows, can anyone provide me with a neat implementation?)

I didn’t get time to implement but I think it’s just a bipartite matching problem on the divisors. I mean say we have 2 x N nodes,[1 → N and A_1 → A_n]. then we make edges from A_i to it’s diviors and then we’ll have to find any perfect matching.

1 Like

Find a bipartite matching. On left we keep the N numbers and add an edge between A_i and all of its divisors. Didn’t code but I guess it should work.

I thought of the same exact thing but I don’t know how to implement it :frowning:

Any ideas on the implementation?.
Instead I added divisors which are in the range 1 to N for each A[i].

Yes, I don’t see any problem with that. Didn’t that work ?

Ford Fulkerson Residual graphs. All edges with flow 1 are part of the answer.

I missed the case with disconnected component in my code and ran out of time to debug.

1 Like

Bro how did you solve the Poke Dice problem I thought it was a easy one, but it ate me up.

Would the solutions be made public?

Divisibility by 5 and lowerbound 5m and upperbound 55m

Please do share the editorial here itself @regex0754

General term for Die 1: 5i-3
General term for Die 2: 5j-2
So for any throw sum of both dice would be: 5(i+j)-5
Hence any valid X should be a multiple of 5 and also be between 5m & 55m

1 Like

How to do the Johto League poblem??? any hint

Brother I too did the same, can you once check my code
https://www.codechef.com/viewsolution/47746937

access denied