Submission #37215259
Source Code Expand
R=range(4) (n,),*A=[sorted(map(int,s.split()))for s in open(0)] I=[0]*4 d=1e9 while max(I)<n: m=min(T:=[A[i][I[i]]for i in R]);d=min(d,max(T)-m) for i in R:I[i]+=A[i][I[i]]==m print(d)
Submission Info
| Submission Time | |
|---|---|
| Task | B - ジョイ四人組 (JOI04) |
| User | Pandruant |
| Language | Python (3.8.2) |
| Score | 100 |
| Code Size | 186 Byte |
| Status | AC |
| Exec Time | 776 ms |
| Memory | 27676 KiB |
Judge Result
| Set Name | Sample | Subtask1 | Subtask2 | Subtask3 | Subtask4 | Subtask5 | Subtask6 | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 7 / 7 | 23 / 23 | 14 / 14 | 20 / 20 | 13 / 13 | 23 / 23 | ||||||||||||||
| Status |
|
|
|
|
|
|
|
| Set Name | Test Cases |
|---|---|
| Sample | sample-01.txt, sample-02.txt, sample-03.txt, sample-04.txt, sample-05.txt |
| Subtask1 | 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, sample-01.txt |
| Subtask2 | 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 02-01.txt, 02-02.txt, 02-03.txt, 02-04.txt, 02-05.txt, 02-06.txt, sample-01.txt, sample-02.txt, sample-03.txt, sample-04.txt, sample-05.txt |
| Subtask3 | 03-01.txt, 03-02.txt, 03-03.txt, 03-04.txt, 03-05.txt, 03-06.txt, 03-07.txt, 03-08.txt, 03-09.txt, 03-10.txt, 03-11.txt, 03-12.txt, 03-13.txt, 03-14.txt, sample-02.txt, sample-03.txt, 02-06.txt |
| Subtask4 | 03-01.txt, 03-02.txt, 03-03.txt, 03-04.txt, 03-05.txt, 03-06.txt, 03-07.txt, 03-08.txt, 03-09.txt, 03-10.txt, 03-11.txt, 03-12.txt, 03-13.txt, 03-14.txt, 04-01.txt, 04-02.txt, 04-03.txt, 04-04.txt, 04-05.txt, 04-06.txt, 04-07.txt, 04-08.txt, 04-09.txt, 04-10.txt, 04-11.txt, 04-12.txt, 04-13.txt, sample-01.txt, sample-02.txt, sample-03.txt, sample-04.txt, 02-06.txt |
| Subtask5 | 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 02-01.txt, 02-02.txt, 02-03.txt, 02-04.txt, 02-05.txt, 02-06.txt, 03-01.txt, 03-02.txt, 03-03.txt, 03-04.txt, 03-05.txt, 03-06.txt, 03-07.txt, 03-08.txt, 03-09.txt, 03-10.txt, 03-11.txt, 03-12.txt, 03-13.txt, 03-14.txt, 04-01.txt, 04-02.txt, 04-03.txt, 04-04.txt, 04-05.txt, 04-06.txt, 04-07.txt, 04-08.txt, 04-09.txt, 04-10.txt, 04-11.txt, 04-12.txt, 04-13.txt, 05-01.txt, 05-02.txt, 05-03.txt, 05-04.txt, 05-05.txt, 05-06.txt, 05-07.txt, 05-08.txt, 05-09.txt, 05-10.txt, 05-11.txt, 05-12.txt, sample-01.txt, sample-02.txt, sample-03.txt, sample-04.txt, sample-05.txt |
| Subtask6 | 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 02-01.txt, 02-02.txt, 02-03.txt, 02-04.txt, 02-05.txt, 02-06.txt, 03-01.txt, 03-02.txt, 03-03.txt, 03-04.txt, 03-05.txt, 03-06.txt, 03-07.txt, 03-08.txt, 03-09.txt, 03-10.txt, 03-11.txt, 03-12.txt, 03-13.txt, 03-14.txt, 04-01.txt, 04-02.txt, 04-03.txt, 04-04.txt, 04-05.txt, 04-06.txt, 04-07.txt, 04-08.txt, 04-09.txt, 04-10.txt, 04-11.txt, 04-12.txt, 04-13.txt, 05-01.txt, 05-02.txt, 05-03.txt, 05-04.txt, 05-05.txt, 05-06.txt, 05-07.txt, 05-08.txt, 05-09.txt, 05-10.txt, 05-11.txt, 05-12.txt, 06-01.txt, 06-02.txt, 06-03.txt, 06-04.txt, 06-05.txt, 06-06.txt, 06-07.txt, sample-01.txt, sample-02.txt, sample-03.txt, sample-04.txt, sample-05.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 01-01.txt | AC | 24 ms | 8908 KiB |
| 01-02.txt | AC | 19 ms | 8908 KiB |
| 01-03.txt | AC | 22 ms | 8900 KiB |
| 01-04.txt | AC | 23 ms | 8900 KiB |
| 01-05.txt | AC | 17 ms | 9204 KiB |
| 02-01.txt | AC | 17 ms | 9016 KiB |
| 02-02.txt | AC | 17 ms | 9076 KiB |
| 02-03.txt | AC | 25 ms | 9200 KiB |
| 02-04.txt | AC | 20 ms | 8908 KiB |
| 02-05.txt | AC | 20 ms | 9200 KiB |
| 02-06.txt | AC | 21 ms | 8904 KiB |
| 03-01.txt | AC | 25 ms | 9260 KiB |
| 03-02.txt | AC | 33 ms | 9132 KiB |
| 03-03.txt | AC | 24 ms | 9100 KiB |
| 03-04.txt | AC | 29 ms | 9312 KiB |
| 03-05.txt | AC | 26 ms | 9172 KiB |
| 03-06.txt | AC | 29 ms | 9132 KiB |
| 03-07.txt | AC | 32 ms | 9028 KiB |
| 03-08.txt | AC | 33 ms | 9232 KiB |
| 03-09.txt | AC | 26 ms | 9280 KiB |
| 03-10.txt | AC | 24 ms | 9164 KiB |
| 03-11.txt | AC | 40 ms | 9296 KiB |
| 03-12.txt | AC | 33 ms | 9112 KiB |
| 03-13.txt | AC | 31 ms | 9116 KiB |
| 03-14.txt | AC | 25 ms | 9292 KiB |
| 04-01.txt | AC | 36 ms | 9540 KiB |
| 04-02.txt | AC | 23 ms | 9140 KiB |
| 04-03.txt | AC | 38 ms | 9456 KiB |
| 04-04.txt | AC | 36 ms | 9264 KiB |
| 04-05.txt | AC | 39 ms | 9404 KiB |
| 04-06.txt | AC | 36 ms | 9228 KiB |
| 04-07.txt | AC | 42 ms | 9328 KiB |
| 04-08.txt | AC | 42 ms | 9228 KiB |
| 04-09.txt | AC | 38 ms | 9220 KiB |
| 04-10.txt | AC | 22 ms | 9388 KiB |
| 04-11.txt | AC | 36 ms | 9296 KiB |
| 04-12.txt | AC | 38 ms | 9376 KiB |
| 04-13.txt | AC | 28 ms | 9544 KiB |
| 05-01.txt | AC | 35 ms | 9116 KiB |
| 05-02.txt | AC | 37 ms | 9348 KiB |
| 05-03.txt | AC | 40 ms | 9264 KiB |
| 05-04.txt | AC | 28 ms | 9352 KiB |
| 05-05.txt | AC | 33 ms | 9412 KiB |
| 05-06.txt | AC | 44 ms | 9400 KiB |
| 05-07.txt | AC | 43 ms | 9396 KiB |
| 05-08.txt | AC | 43 ms | 9404 KiB |
| 05-09.txt | AC | 37 ms | 9404 KiB |
| 05-10.txt | AC | 33 ms | 9420 KiB |
| 05-11.txt | AC | 42 ms | 9228 KiB |
| 05-12.txt | AC | 40 ms | 9356 KiB |
| 06-01.txt | AC | 776 ms | 27672 KiB |
| 06-02.txt | AC | 713 ms | 27676 KiB |
| 06-03.txt | AC | 728 ms | 27100 KiB |
| 06-04.txt | AC | 513 ms | 27356 KiB |
| 06-05.txt | AC | 426 ms | 27608 KiB |
| 06-06.txt | AC | 735 ms | 27284 KiB |
| 06-07.txt | AC | 763 ms | 27500 KiB |
| sample-01.txt | AC | 21 ms | 8896 KiB |
| sample-02.txt | AC | 20 ms | 9012 KiB |
| sample-03.txt | AC | 18 ms | 9068 KiB |
| sample-04.txt | AC | 18 ms | 8904 KiB |
| sample-05.txt | AC | 18 ms | 9012 KiB |