Submission #74293758
Source Code Expand
#include <iostream>
#include <vector>
using namespace std;
int main(){
int n;
cin>>n;
vector<vector<long long>>c(n+1,vector<long long>(n+1,0));
for(int i=1;i<n;++i)
for(int j=i+1;j<=n;++j)
cin>>c[i][j];
bool f=0;
for(int a=1;a<=n-2;++a)
for(int b=a+1;b<=n-1;++b)
for(int c_=b+1;c_<=n;++c_){
if(c[a][b]+c[b][c_]<c[a][c_]){
f=1;
goto e;
}
}
e:
cout<<(f?"Yes":"No")<<endl;
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - Split Ticketing |
| User | liminghan |
| Language | C++ IOI-Style(GNU++20) (GCC 14.2.0) |
| Score | 200 |
| Code Size | 559 Byte |
| Status | AC |
| Exec Time | 2 ms |
| Memory | 1832 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 | 0 ms | 1704 KiB |
| 00_sample_02.txt | AC | 0 ms | 1704 KiB |
| 01_01.txt | AC | 0 ms | 1704 KiB |
| 01_02.txt | AC | 1 ms | 1704 KiB |
| 01_03.txt | AC | 2 ms | 1832 KiB |
| 02_01.txt | AC | 0 ms | 1704 KiB |
| 02_02.txt | AC | 1 ms | 1704 KiB |
| 02_03.txt | AC | 1 ms | 1832 KiB |
| 03_01.txt | AC | 0 ms | 1704 KiB |
| 03_02.txt | AC | 1 ms | 1832 KiB |
| 03_03.txt | AC | 1 ms | 1832 KiB |
| 04_01.txt | AC | 0 ms | 1704 KiB |
| 04_02.txt | AC | 0 ms | 1704 KiB |
| 04_03.txt | AC | 1 ms | 1832 KiB |
| 04_04.txt | AC | 2 ms | 1832 KiB |
| 04_05.txt | AC | 0 ms | 1704 KiB |
| 04_06.txt | AC | 0 ms | 1704 KiB |