8

Join the Leaderboard (Problem of the Day!) — Div 2, Div 3

 7 months ago
source link: https://codeforces.com/blog/entry/125666
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

By AkshajK, history, 32 minutes ago,

You are given a street of length n, where n is even. Each block on the street can hold one car.

In one move, you can move a car either forwards or backwards, as long as there is no car in the square to the left or to the right of the car.

There are n/2 total cars on the street, and your goal is to get the cars to be evenly spaced — meaning, there is exactly one open square between any two adjacent cars.

Cars on a Road

Full Problem Description, Submission Portal, and Leaderboard

The level is for Div 3 / Div 2 participants. Would encourage you all to try the question and see if you can make it onto the leaderboard :)


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK