Please sign in first.
Submission #74271639
Source Code Expand
from itertools import combinations
N = int(input())
C = []
for i in range(N-1):
C.append(list(map(int, input().split())))
flag = False
for i, j, k in combinations(range(N), 3):
if C[i][k-i-1] > C[i][j-i-1] + C[j][k-j-1]:
flag = True
break
if flag:
print("Yes")
else:
print("No")
Submission Info
| Submission Time | |
|---|---|
| Task | B - Split Ticketing |
| User | satomshr |
| Language | Python (PyPy 3.11-v7.3.20) |
| Score | 200 |
| Code Size | 335 Byte |
| Status | AC |
| Exec Time | 56 ms |
| Memory | 97200 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 00_sample_01.txt, 00_sample_02.txt |
| All | 00_sample_01.txt, 00_sample_02.txt, 01_01.txt, 01_02.txt, 01_03.txt, 02_01.txt, 02_02.txt, 02_03.txt, 03_01.txt, 03_02.txt, 03_03.txt, 04_01.txt, 04_02.txt, 04_03.txt, 04_04.txt, 04_05.txt, 04_06.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 00_sample_01.txt | AC | 47 ms | 79824 KiB |
| 00_sample_02.txt | AC | 46 ms | 79792 KiB |
| 01_01.txt | AC | 45 ms | 79712 KiB |
| 01_02.txt | AC | 48 ms | 86204 KiB |
| 01_03.txt | AC | 48 ms | 86940 KiB |
| 02_01.txt | AC | 45 ms | 79896 KiB |
| 02_02.txt | AC | 51 ms | 90276 KiB |
| 02_03.txt | AC | 55 ms | 96900 KiB |
| 03_01.txt | AC | 45 ms | 79792 KiB |
| 03_02.txt | AC | 52 ms | 92764 KiB |
| 03_03.txt | AC | 50 ms | 90884 KiB |
| 04_01.txt | AC | 44 ms | 79868 KiB |
| 04_02.txt | AC | 44 ms | 79872 KiB |
| 04_03.txt | AC | 54 ms | 97128 KiB |
| 04_04.txt | AC | 56 ms | 97200 KiB |
| 04_05.txt | AC | 45 ms | 79648 KiB |
| 04_06.txt | AC | 44 ms | 79752 KiB |