結果
問題 | No.870 無敵囲い |
ユーザー |
![]() |
提出日時 | 2019-08-31 15:53:06 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 300 ms |
コード長 | 892 bytes |
コンパイル時間 | 634 ms |
コンパイル使用メモリ | 76,748 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-29 06:21:42 |
合計ジャッジ時間 | 1,154 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 |
ソースコード
#include <iostream>#include <string>#include <vector>#include <deque>#include <queue>#include <algorithm>#include <set>#include <map>#define vv(a, b, c, d) vector<vector<d> >(a, vector<d>(b, c))#define vvi std::vector<std::vector<int> >#define vvl std::vector<std::vector<ll> >#define MODs 1000000007;typedef long long int ll;using namespace std;int main(int argc, char const *argv[]) {int N, xb, yb, xa, ya;pair<int, int> A{2, 8}, B{3,9}, C{7,9};std::cin >> N;for(int i=0;i<N;i++) {std::cin >> xb >> yb >> xa >> ya;if(xb==A.first&&yb==A.second) A.first = xa, A.second=ya;if(xb==B.first&&yb==B.second) B.first = xa, B.second=ya;if(xb==C.first&&yb==C.second) C.first = xa, C.second=ya;}if(A.first==5&&A.second==8&&B.first==4&&B.second==8&&C.first==6&&C.second==8) std::cout << "YES" << '\n';else std::cout << "NO" << '\n';return 0;}