結果
問題 |
No.870 無敵囲い
|
ユーザー |
![]() |
提出日時 | 2020-08-18 16:19:05 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 300 ms |
コード長 | 1,029 bytes |
コンパイル時間 | 777 ms |
コンパイル使用メモリ | 97,376 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-29 06:43:54 |
合計ジャッジ時間 | 1,534 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <iomanip> #include <stack> #include <algorithm> #include <string> #include <map> #include <iterator> #include <set> #include <queue> #include <bitset> #include <cassert> using namespace std; int main() { vector<pair<int, int>> e = { {5, 8}, {4, 8}, {6, 8}, }; vector<pair<int, int>> ini = { {2, 8}, {3, 9}, {7, 9}, }; int N; cin >> N; for (int i = 0; i < N; ++i) { int xi, yi, xi2, yi2; cin >> xi >> yi >> xi2 >> yi2; for (int j = 0; j < 3; ++j) { if (ini[j].first == xi and ini[j].second == yi) { ini[j].first = xi2; ini[j].second = yi2; } } } bool ok = true; for (int i = 0; i < 3; ++i) { if (e[i] != ini[i]) { ok = false; break; } } cout << (ok ? "YES" : "NO") << endl; return 0; }