結果
問題 | No.870 無敵囲い |
ユーザー |
![]() |
提出日時 | 2020-02-05 06:59:22 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 300 ms |
コード長 | 515 bytes |
コンパイル時間 | 606 ms |
コンパイル使用メモリ | 70,728 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-29 06:37:15 |
合計ジャッジ時間 | 1,224 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 |
ソースコード
#include <iostream>#include <vector>using namespace std;int main(void) {int n, x1, y1, x2, y2;cin >> n;vector<pair<int, int> > abc = { {2,8},{3,9},{7,9} };for (int i = 0; i < n; ++i) {cin >> x1 >> y1 >> x2 >> y2;pair<int, int> a = { x1,y1 }, b = { x2,y2 };for (int j = 0; j < 3; ++j) {if (abc[j] == a) abc[j] = b;}}pair<int, int> a = { 5,8 }, b = { 4,8 }, c = { 6,8 };if (abc[0] == a && abc[1] == b && abc[2] == c)cout << "YES" << endl;elsecout << "NO" << endl;return 0;}