You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Online Judge Helps
I got AC on this problem!
I tried it in josephus but could not match it exactly. Josephus
recurrence relation is:
josephus(n, k) = (josephus(n-1, k) + k ) % n;
In this problem next kth person can be calculated with this relation.
That's correct. But then doesn't it require to modify the array or
vector to occupy the killed person's position by the kth person?
Then I simply implemented the simulation and got AC. But got WA when I
tried to make it more efficient pre-calculating the position of
buriers before executing(removing) the current kth person.