Submission #11274175


Source Code Expand

Copy
#!/usr/bin/ python3.8
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

K, N, *A = map(int, read().split())
A += [A[0] + K]
max_gap = max(y - x for x, y in zip(A, A[1:]))
print(K - max_gap)

Submission Info

Submission Time
Task C - Traveling Salesman around Lake
User maspy
Language Python3 (3.4.3)
Score 300
Code Size 267 Byte
Status
Exec Time 82 ms
Memory 20348 KB

Judge Result

Set Name Score / Max Score Test Cases
Sample 0 / 0 sample_01, sample_02
All 300 / 300 hand_01, random_01, random_02, random_03, random_04, random_05, random_06, random_07, random_08, random_09, random_10, random_11, random_12, random_13, random_14, random_15, random_16, random_17, random_18, random_19, random_20, sample_01, sample_02
Case Name Status Exec Time Memory
hand_01 80 ms 20320 KB
random_01 61 ms 15632 KB
random_02 80 ms 20348 KB
random_03 79 ms 20336 KB
random_04 30 ms 6540 KB
random_05 81 ms 20348 KB
random_06 80 ms 20328 KB
random_07 78 ms 19788 KB
random_08 80 ms 20348 KB
random_09 79 ms 20340 KB
random_10 50 ms 12424 KB
random_11 81 ms 20324 KB
random_12 82 ms 20324 KB
random_13 80 ms 20320 KB
random_14 81 ms 20320 KB
random_15 81 ms 20320 KB
random_16 81 ms 20320 KB
random_17 81 ms 20320 KB
random_18 81 ms 20320 KB
random_19 80 ms 20320 KB
random_20 80 ms 20316 KB
sample_01 17 ms 2940 KB
sample_02 17 ms 2940 KB