結果
問題 | No.870 無敵囲い |
ユーザー |
|
提出日時 | 2021-09-03 18:09:00 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 300 ms |
コード長 | 607 bytes |
コンパイル時間 | 2,129 ms |
コンパイル使用メモリ | 194,628 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-29 06:47:45 |
合計ジャッジ時間 | 2,802 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 |
ソースコード
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<vector<int>> X(3, vector<int>(2)); X[0][0] = 2, X[0][1] = 8; X[1][0] = 3, X[1][1] = 9; X[2][0] = 7, X[2][1] = 9; for(int i = 0; i < N; i++){ int X1, Y1, X2, Y2; cin >> X1 >> Y1 >> X2 >> Y2; for(int j = 0; j < 3; j++){ if(X[j][0] == X1 and X[j][1] == Y1){ X[j][0] = X2; X[j][1] = Y2; } } } if(X[0][0] == 5 and X[0][1] == 8 and X[1][0] == 4 and X[1][1] == 8 and X[2][0] == 6 and X[2][1] == 8) cout << "YES" << endl; else cout << "NO" << endl; }