Submission #74266396
Source Code Expand
#include<bits/stdc++.h>
using namespace std;
#define int long long
const int N=100+5;
bool st;
int n,a[N][N];
bool ed;
signed main() {
ios::sync_with_stdio(false);
cin.tie(0),cout.tie(0);
cerr<<(double)(&st-&ed)/1024/1024<<'\n';
cin>>n;
for(int i=1;i<=n;i++) {
for(int j=i+1;j<=n;j++) cin>>a[i][j];
}
for(int i=1;i<=n;i++) {
for(int j=i+1;j<=n;j++) {
for(int k=j+1;k<=n;k++) {
if(a[i][j]+a[j][k]<a[i][k]) {
cout<<"Yes\n";
return 0;
}
}
}
}cout<<"No\n";
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - Split Ticketing |
| User | wallacewan |
| Language | C++23 (GCC 15.2.0) |
| Score | 200 |
| Code Size | 538 Byte |
| Status | AC |
| Exec Time | 1 ms |
| Memory | 4072 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 | 1 ms | 3824 KiB |
| 00_sample_02.txt | AC | 1 ms | 3764 KiB |
| 01_01.txt | AC | 1 ms | 3804 KiB |
| 01_02.txt | AC | 1 ms | 3872 KiB |
| 01_03.txt | AC | 1 ms | 3888 KiB |
| 02_01.txt | AC | 1 ms | 3944 KiB |
| 02_02.txt | AC | 1 ms | 3988 KiB |
| 02_03.txt | AC | 1 ms | 3872 KiB |
| 03_01.txt | AC | 1 ms | 4008 KiB |
| 03_02.txt | AC | 1 ms | 4072 KiB |
| 03_03.txt | AC | 1 ms | 3848 KiB |
| 04_01.txt | AC | 1 ms | 3768 KiB |
| 04_02.txt | AC | 1 ms | 3744 KiB |
| 04_03.txt | AC | 1 ms | 3872 KiB |
| 04_04.txt | AC | 1 ms | 3916 KiB |
| 04_05.txt | AC | 1 ms | 3752 KiB |
| 04_06.txt | AC | 1 ms | 3884 KiB |