Блог пользователя AkshajK

Автор AkshajK, история, 9 месяцев назад, По-английски

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 :)

  • Проголосовать: нравится
  • +6
  • Проголосовать: не нравится

»
9 месяцев назад, # |
  Проголосовать: нравится +6 Проголосовать: не нравится

It's a great initiative . Hope it will help to build logic before starting programming in a small age.

»
9 месяцев назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

Can you check part-5 input file ($$$n = 10^7$$$) link? It says "File is in owner's trash".