結果
| 問題 | No.870 無敵囲い | 
| コンテスト | |
| ユーザー |  totori_nyaa | 
| 提出日時 | 2019-08-30 22:50:10 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 300 ms | 
| コード長 | 639 bytes | 
| コンパイル時間 | 1,537 ms | 
| コンパイル使用メモリ | 167,252 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-06-29 06:21:01 | 
| 合計ジャッジ時間 | 2,213 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 18 | 
ソースコード
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
signed main(){
    ios::sync_with_stdio(false);
	cin.tie(0);
    int n;
    cin>>n;
    pair<int,int> a,b,c;
    a = make_pair(2,8);
    b = make_pair(3,9);
    c = make_pair(7,9);
    for(int i=0;i<n;i++){
        int x,y;
        cin>>x>>y;
        pair<int,int> s = make_pair(x,y);
        cin>>x>>y;
        if(s==a) a = make_pair(x,y);
        if(s==b) b = make_pair(x,y);
        if(s==c) c = make_pair(x,y);
    }
    if(a==make_pair(5,8) && b == make_pair(4,8) && c == make_pair(6,8)){
        cout<<"YES"<<endl;
        return 0;
    }
    cout<<"NO"<<endl;
}
            
            
            
        