Kac Ring Dynamic System Simulation

Implement a Kac ring model with N points, each occupied by a white or black ball, and M of these points are marked. Each step, balls move one position clockwise, and if a ball leaves a marked point, i...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: