結果
| 問題 |
No.870 無敵囲い
|
| コンテスト | |
| ユーザー |
sprng_wl
|
| 提出日時 | 2019-08-30 21:27:49 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 300 ms |
| コード長 | 495 bytes |
| コンパイル時間 | 1,327 ms |
| コンパイル使用メモリ | 161,624 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-29 06:14:04 |
| 合計ジャッジ時間 | 1,786 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 |
ソースコード
#include <bits/stdc++.h>
#define Int int64_t
using namespace std;
int main() {
int N;
cin >> N;
vector<vector<int>> grid(10, vector<int>(10, 0));
grid[2][8] = 1;
grid[3][9] = 2;
grid[7][9] = 3;
for (int i = 0; i < N; ++i) {
int x, y, s, t;
cin >> x >> y >> s >> t;
if (grid[x][y] > 0) {
grid[s][t] = grid[x][y];
grid[x][y] = 0;
}
}
if (grid[5][8] == 1 && grid[4][8] == 2 && grid[6][8] == 3) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
return 0;
}
sprng_wl