OK, guys, Hilbert's Hotel.
Now it's time to see the good.
Let's see what I did here.
So it's accepted.
All right.
So was I've seen as we've seen together.
I am reading the number of tests and for each and every test I am reading.
And the number of rooms.
And then I am initializing a vector of Borland's of size and plus one.
Right.
Only with force.
Right.
This is the frequency array.
The visited array are unrecorded then.
What I do is that I read of course the array.
And for each and every number which I will call X if this number is less than zero.
So as we've talked about, what we have to do is that this X is going to be increased by a number large
enough to make it positive.
Which I called infinite crossed and.
Right.
This is very important because you have to increase it.
We have a large number which also won't affect the final reminder modulo M of X.
Right.
So X becomes X plus infinite crossed and which is a multiple of N.
So this expression has the same reminder modulo N as X, which is good.
It doesn't affect that.
Right.
So this infinity is something like I don't know how many zeros I have here.
It looks like I have nine zero.
So then a power nine.
Right.
So yeah, you make sure that this is going to be a long, long superimportant, so infinite crust and
everything long, long increased by X and everything modulo M.
And this is the new X.
Instead it was negative.
And now because we know this X, we just go and take a look at the reminder of EI plus X modulo N,
and if it was already encountered, we just see out as we've talked about and break.
If not, we just make sure that we mark it as seen or urs encountered.
So rest of that expression equals true.
And then if this y loop terminates, there are two possible scenarios.
It either terminated organically when I.
Equals M.
So here if it did so then we see out.
Yes.
Because everything is valid or it ended with this break because we printed.
No.
So we already know the solution is bad.
So that's it.
Right.
So that all you have to do.
Simple as that.
Has seen that extend.