← CSES Better

Dance Mooves

USACO · 2021 · January · gold-3

Open official problem ↗
Ask AI

Open a hint-first prompt in a new AI chat. Grok may ask you to confirm before sending.

Open Claude Desktop

simulation

The organizer’s problem statement is available at the official source link.

sample trace

Dance Mooves: simulation walkthrough

Dance Mooves: use the linked editorial?s simulation idea on the published sample, then verify the displayed output.

Published input6 4 7 1 2 2 3 3 4 4 5modelAlgorithm ideaRepresent the current situation as a state and apply each operation in the exact order given by the task.task resultExpected output5 4 3 3 3 1
  1. 1

    Initialize

    Record the starting values from the sample input.
  2. 2

    Apply

    Perform each required operation and update the state.
  3. 3

    Observe

    Read the final state or event count required by the task.
  4. 4

    Verify the sample

    Use the published sample output to check the result of this idea on the displayed input.
Tools
1
2
3
4
5
6
7
8
9
10
11
12
Draft saved locally
|12 lines, 156 chars

Run output

Run your code to see output.