
v0.40: Create exercises. Challenge the community.
Meet Studio →Confirm a launch only when the same sector lights up on two scans in a row.
September 26, 1983. Just after midnight, the Soviet early warning system tells Stanislav Petrov that the United States has launched. Five missiles, one after another, and his job that night was to pass it straight up the chain. He called it a false alarm instead, reasoning that a real first strike would not arrive in fives. Sunlight off high cloud had lined up with the satellite sensors. Confirm a track only when it holds.
confirm({0,1,0,0, 0,1,0,0}, 2, 4)Expected result
1For your own tracking. Tests grade your code.
confirm({1,0,0,0, 0,0,0,0, 0,0,0,0}, 3, 4)Expected result
-1confirm({1,1, 1,1}, 2, 2)Expected result
0Expected files
oko.cAllowed functions
None. Write every helper yourself.
