Submission #26759789
Source Code Expand
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
int main(){
long h, w;
cin >> h >> w;
long a[h][w];
for(int i = 0; i < h; i++){
for(int j = 0; j < w; j++) cin >> a[i][j];
}
string s = "Yes";
for(int i = 0; i < h; i++){
for(int j = i + 1; j < h; j++){
for(int k = 0; k < w; k++){
for(int l = k + 1; l < w; l++){
if(a[i][k] + a[j][l] > a[j][k] + a[i][l]){
s = "No";
break;
}
}
}
}
}
cout << s << endl;
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - Mongeness |
| User | Ysdr |
| Language | C++ (GCC 9.2.1) |
| Score | 200 |
| Code Size | 679 Byte |
| Status | AC |
| Exec Time | 13 ms |
| Memory | 3692 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | example0.txt, example1.txt |
| All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, 011.txt, 012.txt, 013.txt, 014.txt, 015.txt, 016.txt, 017.txt, 018.txt, 019.txt, 020.txt, 021.txt, 022.txt, 023.txt, 024.txt, 025.txt, 026.txt, 027.txt, example0.txt, example1.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 000.txt | AC | 8 ms | 3564 KiB |
| 001.txt | AC | 13 ms | 3616 KiB |
| 002.txt | AC | 7 ms | 3664 KiB |
| 003.txt | AC | 8 ms | 3616 KiB |
| 004.txt | AC | 11 ms | 3536 KiB |
| 005.txt | AC | 9 ms | 3688 KiB |
| 006.txt | AC | 5 ms | 3588 KiB |
| 007.txt | AC | 8 ms | 3476 KiB |
| 008.txt | AC | 10 ms | 3532 KiB |
| 009.txt | AC | 9 ms | 3616 KiB |
| 010.txt | AC | 7 ms | 3688 KiB |
| 011.txt | AC | 3 ms | 3572 KiB |
| 012.txt | AC | 2 ms | 3540 KiB |
| 013.txt | AC | 2 ms | 3536 KiB |
| 014.txt | AC | 4 ms | 3496 KiB |
| 015.txt | AC | 5 ms | 3548 KiB |
| 016.txt | AC | 6 ms | 3692 KiB |
| 017.txt | AC | 6 ms | 3616 KiB |
| 018.txt | AC | 7 ms | 3688 KiB |
| 019.txt | AC | 2 ms | 3672 KiB |
| 020.txt | AC | 3 ms | 3648 KiB |
| 021.txt | AC | 4 ms | 3648 KiB |
| 022.txt | AC | 3 ms | 3676 KiB |
| 023.txt | AC | 5 ms | 3652 KiB |
| 024.txt | AC | 4 ms | 3608 KiB |
| 025.txt | AC | 2 ms | 3544 KiB |
| 026.txt | AC | 6 ms | 3616 KiB |
| 027.txt | AC | 6 ms | 3620 KiB |
| example0.txt | AC | 3 ms | 3592 KiB |
| example1.txt | AC | 2 ms | 3620 KiB |