Submission #74283346
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define pii pair<int, int>
#define fi first
#define se second
const int N = 110, M = 1e4 + 10, mod = 998244353, INF = 0x3ffffffff, LOG = 23;
const double PI = M_PI;
int n;
int c[N][N];
signed main(){
ios::sync_with_stdio(false);
cin.tie(0), cout.tie(0);
cin >> n;
for(int i=1;i<n;i++){
for(int j=i+1;j<=n;j++){
cin >> c[i][j];
}
}
for(int k=1;k<=n-2;k++){
for(int i=k+1;i<n;i++){
for(int j=i+1;j<=n;j++){
if(c[k][j] > c[k][i] + c[i][j]){
cout << "Yes\n";
return 0;
}
}
}
}
cout << "No";
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - Split Ticketing |
| User | Queryme |
| Language | C++23 (GCC 15.2.0) |
| Score | 200 |
| Code Size | 779 Byte |
| Status | AC |
| Exec Time | 1 ms |
| Memory | 3800 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 | 3572 KiB |
| 00_sample_02.txt | AC | 1 ms | 3660 KiB |
| 01_01.txt | AC | 1 ms | 3676 KiB |
| 01_02.txt | AC | 1 ms | 3620 KiB |
| 01_03.txt | AC | 1 ms | 3776 KiB |
| 02_01.txt | AC | 1 ms | 3756 KiB |
| 02_02.txt | AC | 1 ms | 3620 KiB |
| 02_03.txt | AC | 1 ms | 3700 KiB |
| 03_01.txt | AC | 1 ms | 3472 KiB |
| 03_02.txt | AC | 1 ms | 3632 KiB |
| 03_03.txt | AC | 1 ms | 3720 KiB |
| 04_01.txt | AC | 1 ms | 3700 KiB |
| 04_02.txt | AC | 1 ms | 3700 KiB |
| 04_03.txt | AC | 1 ms | 3708 KiB |
| 04_04.txt | AC | 1 ms | 3800 KiB |
| 04_05.txt | AC | 1 ms | 3648 KiB |
| 04_06.txt | AC | 1 ms | 3688 KiB |