Submission #74316011
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int tmp = 0;
vector<vector<int>> c(N - 1,vector<int>(N));
int a=1;
for (int i=0; i < N - 1; i++) {
for (int j=0; j < N - a; j++) {
cin >> c.at(i).at(j+a);
}
a++;
}
bool cost = false;
for(int i = 0;i < N-2;i++){
for(int j= 2;j < N-1;j++){
for(int b=1;b<j;b++){
if(c.at(i).at(j) > c.at(i).at(i+b) + c.at(i+b).at(j)){
cost = true;
//break;
}
}
}
}
if(cost){
cout << "Yes" <<endl;
}else{
cout << "No" <<endl;
}
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - Split Ticketing |
| User | YH_Ti_Super |
| Language | C++23 (GCC 15.2.0) |
| Score | 0 |
| Code Size | 623 Byte |
| Status | RE |
| Exec Time | 96 ms |
| Memory | 3948 KiB |
Compile Error
./Main.cpp: In function 'int main()':
./Main.cpp:8:7: warning: unused variable 'tmp' [-Wunused-variable]
8 | int tmp = 0;
| ^~~
Judge Result
| Set Name | Sample | All | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 0 / 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 | WA | 1 ms | 3596 KiB |
| 00_sample_02.txt | AC | 1 ms | 3444 KiB |
| 01_01.txt | AC | 1 ms | 3488 KiB |
| 01_02.txt | RE | 96 ms | 3688 KiB |
| 01_03.txt | RE | 92 ms | 3744 KiB |
| 02_01.txt | AC | 1 ms | 3408 KiB |
| 02_02.txt | RE | 92 ms | 3636 KiB |
| 02_03.txt | RE | 95 ms | 3788 KiB |
| 03_01.txt | WA | 1 ms | 3600 KiB |
| 03_02.txt | RE | 92 ms | 3948 KiB |
| 03_03.txt | RE | 92 ms | 3752 KiB |
| 04_01.txt | AC | 1 ms | 3600 KiB |
| 04_02.txt | AC | 1 ms | 3480 KiB |
| 04_03.txt | RE | 93 ms | 3948 KiB |
| 04_04.txt | RE | 92 ms | 3848 KiB |
| 04_05.txt | WA | 1 ms | 3576 KiB |
| 04_06.txt | AC | 1 ms | 3420 KiB |