Submission #74270395
Source Code Expand
n=int(input())
c=[[0]*(n+1) for _ in range(n+1)]
for i in range(1,n):
val=list(map(int,input().split()))
for j in range(i+1,n+1):
c[i][j]=val[j-i-1]
for k in range(1,n+1):
for m in range(k+1,n+1):
for l in range(m+1,n+1):
if c[k][m]+c[m][l]<c[k][l]:
print("Yes")
exit()
print("No")
Submission Info
| Submission Time | |
|---|---|
| Task | B - Split Ticketing |
| User | ffrazi |
| Language | Python (CPython 3.13.7) |
| Score | 200 |
| Code Size | 329 Byte |
| Status | AC |
| Exec Time | 26 ms |
| Memory | 9588 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 | 9 ms | 9116 KiB |
| 00_sample_02.txt | AC | 9 ms | 9152 KiB |
| 01_01.txt | AC | 10 ms | 9192 KiB |
| 01_02.txt | AC | 10 ms | 9284 KiB |
| 01_03.txt | AC | 10 ms | 9588 KiB |
| 02_01.txt | AC | 9 ms | 9120 KiB |
| 02_02.txt | AC | 15 ms | 9280 KiB |
| 02_03.txt | AC | 25 ms | 9364 KiB |
| 03_01.txt | AC | 9 ms | 9156 KiB |
| 03_02.txt | AC | 17 ms | 9408 KiB |
| 03_03.txt | AC | 15 ms | 9408 KiB |
| 04_01.txt | AC | 9 ms | 9120 KiB |
| 04_02.txt | AC | 9 ms | 9212 KiB |
| 04_03.txt | AC | 24 ms | 9248 KiB |
| 04_04.txt | AC | 26 ms | 9412 KiB |
| 04_05.txt | AC | 9 ms | 9160 KiB |
| 04_06.txt | AC | 9 ms | 9152 KiB |