← CSES Better

Spaceship

USACO · 2020 · December · platinum-2

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

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

sample trace

Spaceship: sample trace

Trace this official sample for Spaceship: use the task rules to map the shown input to the expected output.

Published input6 3 8 010000 001000 000100 000010 000000 000001 1 1 1 1 3 3 1 1 1 1 3 3 1 1 1 5 2 1 1 5 1 1 2 5 3 1 3 5 2 6 2 6 6 4 6 001100 001110 101101 010111 110111 000111 3 2 4 3 3 1 4 4 3 4 4 1 3 3 4 3 3 6 4 3 3 1 4 2 6 10 5 110101 011001 001111 101111 111010 000001 2 5 2 5 6 1 5 2 3 4 8 3 9 3 3 5 5 1 3 4modelAlgorithm ideaApply the task rule to this published instance, preserving the relationships defined by the statement.task resultExpected output1 0 1 3 2 2 0 5 26 49 29 27 18 22 713313311 716721076 782223918 335511486 539247783
  1. 1

    Read the sample

    Use the official example for Spaceship as the concrete instance.
  2. 2

    Follow the task relation

    Apply the exact rule in the official statement to the displayed values.
  3. 3

    Check the result

    Verify that the final value matches the published expected output.
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.