結果
問題 | No.870 無敵囲い |
ユーザー |
![]() |
提出日時 | 2019-08-30 21:51:48 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 300 ms |
コード長 | 510 bytes |
コンパイル時間 | 1,534 ms |
コンパイル使用メモリ | 168,320 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-29 06:17:35 |
合計ジャッジ時間 | 2,130 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 |
ソースコード
#include <bits/stdc++.h>using namespace std;using lint = long long;template<class T = int> using V = vector<T>;template<class T = int> using VV = V< V<T> >;int main() {cin.tie(nullptr); ios::sync_with_stdio(false);int n; cin >> n;V<> x{2, 3, 7}, y{8, 9, 9};while (n--) {int a, b, c, d; cin >> a >> b >> c >> d;for (int i = 0; i < 3; ++i) if (x[i] == a and y[i] == b) {x[i] = c, y[i] = d;}}cout << (x == V<>{5, 4, 6} and y == V<>{8, 8, 8} ? "YES" : "NO") << '\n';}