Submission #49767251
Source Code Expand
Copy
import numpy as npN,M=map(int,input().split())X=[int(x)-1 for x in input().split()]B=np.zeros(N)for x,y in zip(X,X[1:]):if y<x:x,y=y,xz=y-xB+=zB[x:y]+=N-z*2print(int(min(B)))
import numpy as np N,M=map(int,input().split()) X=[int(x)-1 for x in input().split()] B=np.zeros(N) for x,y in zip(X,X[1:]): if y<x:x,y=y,x z=y-x B+=z B[x:y]+=N-z*2 print(int(min(B)))
Submission Info
Submission Time | |
---|---|
Task | D - Island Tour |
User | jamad |
Language | Python (PyPy 3.10-v7.3.12) |
Score | 0 |
Code Size | 200 Byte |
Status | TLE |
Exec Time | 2221 ms |
Memory | 204920 KB |
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 425 | ||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt |
All | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 01_random_15.txt, 02_random2_00.txt, 02_random2_01.txt, 02_random2_02.txt, 02_random2_03.txt, 02_random2_04.txt, 02_random2_05.txt, 02_random2_06.txt, 02_random2_07.txt, 03_handmade_00.txt, 03_handmade_01.txt, 03_handmade_02.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_00.txt | AC | 508 ms | 136572 KB |
00_sample_01.txt | AC | 507 ms | 136804 KB |
00_sample_02.txt | AC | 584 ms | 160344 KB |
01_random_00.txt | TLE | 2020 ms | 189376 KB |
01_random_01.txt | TLE | 2217 ms | 172608 KB |
01_random_02.txt | TLE | 2219 ms | 159544 KB |
01_random_03.txt | TLE | 2219 ms | 196424 KB |
01_random_04.txt | TLE | 2216 ms | 157360 KB |
01_random_05.txt | TLE | 2216 ms | 159240 KB |
01_random_06.txt | TLE | 2216 ms | 159056 KB |
01_random_07.txt | TLE | 2221 ms | 204920 KB |
01_random_08.txt | TLE | 2219 ms | 158744 KB |
01_random_09.txt | TLE | 2219 ms | 159148 KB |
01_random_10.txt | TLE | 2219 ms | 159012 KB |
01_random_11.txt | TLE | 2218 ms | 195864 KB |
01_random_12.txt | TLE | 2216 ms | 153136 KB |
01_random_13.txt | TLE | 2218 ms | 200968 KB |
01_random_14.txt | TLE | 2216 ms | 159176 KB |
01_random_15.txt | TLE | 2216 ms | 154632 KB |
02_random2_00.txt | TLE | 2219 ms | 159336 KB |
02_random2_01.txt | AC | 1225 ms | 184240 KB |
02_random2_02.txt | TLE | 2219 ms | 204764 KB |
02_random2_03.txt | TLE | 2216 ms | 159552 KB |
02_random2_04.txt | AC | 1466 ms | 175492 KB |
02_random2_05.txt | TLE | 2215 ms | 152440 KB |
02_random2_06.txt | TLE | 2217 ms | 169652 KB |
02_random2_07.txt | TLE | 2216 ms | 159448 KB |
03_handmade_00.txt | TLE | 2216 ms | 159488 KB |
03_handmade_01.txt | TLE | 2216 ms | 159220 KB |
03_handmade_02.txt | AC | 488 ms | 136772 KB |