結果
| 問題 |
No.870 無敵囲い
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-04-08 10:09:10 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 300 ms |
| コード長 | 575 bytes |
| コンパイル時間 | 1,775 ms |
| コンパイル使用メモリ | 73,192 KB |
| 最終ジャッジ日時 | 2025-01-09 15:06:17 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 |
ソースコード
#include <iostream>
#include <vector>
void solve() {
std::vector<std::pair<int, int>>
ps{{2, 8}, {3, 9}, {7, 9}},
qs{{5, 8}, {4, 8}, {6, 8}};
int n;
std::cin >> n;
while (n--) {
std::pair<int, int> p, q;
std::cin >> p.first >> p.second >> q.first >> q.second;
for (int i = 0; i < 3; ++i) {
if (ps[i] == p) ps[i] = q;
}
}
std::cout << (ps == qs ? "YES" : "NO") << std::endl;
}
int main() {
std::cin.tie(nullptr);
std::ios::sync_with_stdio(false);
solve();
return 0;
}