RiseOJ는 solved.ac와 제휴 관계가 없습니다. 티어 아이콘 © solved.ac. solved.ac
포럼
USACO0626

Activating Robots

Diamond IV 다이아몬드 IV
난이도
2s
시간 제한
256MB
메모리 제한
0
맞았습니다!!
0
제출 수
0.0%
정답률
레이팅

의견: 0

설명

You and a single robot are initially at point \(0\) on a circle with perimeter \(L\)
(\(1 \le L \le 10^9\)). You can move either counterclockwise or clockwise along
the circle at \(1\) unit per second. All movement in this problem is continuous.

Your goal is to place exactly \(R-1\) robots such that at the end, every two
consecutive robots are spaced \(L/R\) away from each other (\(2\le R\le 20\), \(R\)
divides \(L\)). There are \(N\) (\(1\le N\le 10^5\)) activation points, the \(i\)th of
which is located \(a_i\) distance counterclockwise from \(0\) (\(0\le a_i). If you are
currently at an activation point, you can instantaneously place a robot at that
point. All robots (including the original) move counterclockwise at a rate of
\(1\) unit per \(K\) seconds (\(1\leq K\leq 10^6\)).

Compute the minimum time required to achieve the goal.

Problem credits: Benjamin Qi

제약

SCORING

  • Inputs 5-6: \(R=2\)
  • Inputs 7-12: \(R\le 10, N\le 80\)
  • Inputs 13-20: \(R\le 16\)
  • Inputs 21-24: No additional constraints.

Problem credits: Benjamin Qi

입력 형식

The first line contains \(L\), \(R\), \(N\), and \(K\).

The next line contains \(N\) space-separated integers \(a_1,a_2,\dots,a_N\).

출력 형식

The minimum time required to achieve the goal.

예제 1
입력
10 2 1 2
6
출력
22
설명

We can reach the activation point at \(6\) in \(4\) seconds by going clockwise. At
this time, the initial robot will be located at \(2\). Wait an additional \(18\)
seconds until the initial robot is located at \(1\). Now we can place a robot to
immediately win.

예제 2
입력
10 2 1 2
7
출력
4
설명

We can reach the activation point at \(7\) in \(3\) seconds by going clockwise. At
this time, the initial robot will be located at \(1.5\). Wait an additional second
until the initial robot is located at \(2\). Now we can place a robot to
immediately win.

예제 3
입력
32 4 5 2
0 23 12 5 11
출력
48
예제 4
입력
24 3 1 2
16
출력
48
문제 정보

riseoj 작성

출처 올림피아드 > USACO > 2023-2024 > US Open > Platinum

태그

평가 및 의견

Activating Robots

개요
출제자 난이도 Diamond IV 다이아몬드 IV 의견 0 / 50 공개 집계 (커뮤니티 난이도, 주요 주제, 품질)는 의견이 충분히 모이면 공개됩니다.

Log in to rate problems.

개별 의견

아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.

풀이 제출

Activating Robots

게스트로 둘러보고 있습니다. 로그인하면 풀이를 제출하고 진행 상황을 확인할 수 있습니다. 로그인하고 제출하기
공개
C++20 Tab 들여쓰기 · Ctrl+/ 주석 토글 · Enter 자동 들여쓰기
1 1 1 0 공백: 4 · UTF-8