Submission #74269572
Source Code Expand
#ifdef NACHIA
#define _GLIBCXX_DEBUG
#else
// disable assert
#define NDEBUG
#endif
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
using ll = long long;
const ll INF = 1ll << 60;
#define REP(i,n) for(ll i=0; i<ll(n); i++)
template <class T> using V = vector<T>;
template <class A, class B> void chmax(A& l, const B& r){ if(l < r) l = r; }
template <class A, class B> void chmin(A& l, const B& r){ if(r < l) l = r; }
void testcase(){
ll N; cin >> N;
V<V<ll>> C(N, V<ll>(N));
for(ll i=0; i<N; i++) for(ll j=i+1; j<N; j++) cin >> C[i][j];
bool ans = 0;
REP(c,N) REP(b,c) REP(a,b) if(C[a][c] > C[a][b] + C[b][c]) ans = 1;
cout << (ans ? "Yes\n" : "No\n");
}
int main(){
cin.tie(0)->sync_with_stdio(0);
testcase();
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - Split Ticketing |
| User | Nachia |
| Language | C++23 (GCC 15.2.0) |
| Score | 200 |
| Code Size | 824 Byte |
| Status | AC |
| Exec Time | 2 ms |
| Memory | 3788 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 | 3500 KiB |
| 00_sample_02.txt | AC | 1 ms | 3528 KiB |
| 01_01.txt | AC | 1 ms | 3416 KiB |
| 01_02.txt | AC | 1 ms | 3720 KiB |
| 01_03.txt | AC | 2 ms | 3544 KiB |
| 02_01.txt | AC | 1 ms | 3424 KiB |
| 02_02.txt | AC | 1 ms | 3672 KiB |
| 02_03.txt | AC | 2 ms | 3672 KiB |
| 03_01.txt | AC | 1 ms | 3660 KiB |
| 03_02.txt | AC | 2 ms | 3672 KiB |
| 03_03.txt | AC | 2 ms | 3636 KiB |
| 04_01.txt | AC | 1 ms | 3388 KiB |
| 04_02.txt | AC | 1 ms | 3508 KiB |
| 04_03.txt | AC | 1 ms | 3788 KiB |
| 04_04.txt | AC | 2 ms | 3672 KiB |
| 04_05.txt | AC | 1 ms | 3416 KiB |
| 04_06.txt | AC | 1 ms | 3560 KiB |