1 SRS
2 0 1 Before any song is played, the positions are: $0$, $1$, $2$. When we say "person $i$", we mean "the person that was initially in position $i$". 1. After the first salsa, the positions are: $0$, $2$, $1$. 2. After the rumba, the positions are: $1$, $0$, $2$ (so, person $0$ is in position $1$, person $1$ is in position $0$ and person $2$ is in position $2$). 3. After the second salsa, the positions are $2$, $0$, $1$ (so, person $0$ is in position $2$, person $1$ is in position $0$ and person $2$ is in position $1$).
2 RRSRSSSSR
3 8 1 0 5 7 6 2 4
3 SRSRRSRRRSRRRR
23 9 22 8 3 7 20 24 19 5 18 4 17 12 16 2 6 1 14 0 13 26 21 25 11 15 10
{
"problem": {
"name": "Strange Dance",
"description": {
"content": "There are $3^N$ people dancing in circle. We denote with $0,1,\\dots, 3^{N}-1$ the positions in the circle, starting from an arbitrary position and going around clockwise. Initially each position in th",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "agc044_c"
},
"statements": [
{
"statement_type": "Markdown",
"content": "There are $3^N$ people dancing in circle. We denote with $0,1,\\dots, 3^{N}-1$ the positions in the circle, starting from an arbitrary position and going around clockwise. Initially each position in th...",
"is_translate": false,
"language": "English"
}
]
}