0% found this document useful (0 votes)
2 views5 pages

Level 3 Spaceship Movement Challenge

The document outlines a Level 3 challenge where participants must navigate a spaceship to various space stations within a given time limit. Movement is restricted to specific paces, starting and ending at pace 0, with gradual acceleration and deceleration allowed. Input consists of the number of cases and the position and time limit for each station, while output is a sequence of paces for each case.

Uploaded by

Bogdan Gabor
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views5 pages

Level 3 Spaceship Movement Challenge

The document outlines a Level 3 challenge where participants must navigate a spaceship to various space stations within a given time limit. Movement is restricted to specific paces, starting and ending at pace 0, with gradual acceleration and deceleration allowed. Input consists of the number of cases and the position and time limit for each station, while output is a sequence of paces for each case.

Uploaded by

Bogdan Gabor
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Level 3

u too? [Link]/career
#WeLoveSoftware

LEVEL 3

#WeLoveSoftware
u too? [Link]/career
LEVEL 3
It’s your turn to steer the spaceship
▪ You are given a list of space stations
▪ Steer your spaceship to each space station
▪ Space is 1-dimensional
▪ For each space station:
− Your spaceship starts at position 0
− Generate a movement sequence
− Your spaceship must reach the position of the station exactly
− A time limit is given
− The sequence must complete within the time limit
− The time limit is very generous; you don’t need a fast solution!
▪ Allowed paces are explained on the next slide

LEVEL 3

LEVEL 3
Paces
▪ There are limitations on how your spaceship can move
▪ Each sequence must start and end with pace 0
▪ The slowest pace is 5 or -5
▪ The fastest pace is 1 or -1
▪ Your spaceship can only gradually step up the pace as well as step down

-1 ⇆ -2 ⇆ -3 ⇆ -4 ⇆ -5 ⇆ 0 ⇄ 5 ⇄ 4 ⇄ 3 ⇄ 2 ⇄ 1

LEVEL 3

LEVEL 3
Input
Name Description Example

N Number of cases 3
2 25
Space station 5 39
and time limit The position of the space station and the time limit separated by a space -7 46
(repeated N times)

Output
Name Description Example

0 5 5 0
0 5 4 3 4 5 0
Sequence 0 -5 -4 -3 -2 -3 -4 -5 0
A list of integers separated by spaces, each representing a pace
(repeated N times)
Good Luck!

u too? [Link]/career
#WeLoveSoftware

#WeLoveSoftware
u too? [Link]/career

You might also like