結果
| 問題 | No.870 無敵囲い | 
| コンテスト | |
| ユーザー |  kpinkcat | 
| 提出日時 | 2023-07-27 08:44:25 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 300 ms | 
| コード長 | 731 bytes | 
| コンパイル時間 | 1,240 ms | 
| コンパイル使用メモリ | 103,044 KB | 
| 最終ジャッジ日時 | 2025-02-15 19:27:15 | 
| ジャッジサーバーID (参考情報) | judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 18 | 
ソースコード
#include<iostream>
#include<string>
#include<algorithm>
#include<cctype>
#include<set>
#include<bitset>
#include<math.h>
#include<map>
#include<queue>
#include<iomanip>
using namespace std;
int main(){
    int ax=2 ,ay=8 ,bx=3, by=9, cx=7, cy=9, x1, y1, x2, y2, n;
    cin >> n;
    for (int i = 0; i < n; i++){
        cin >> x1 >> y1 >> x2 >> y2;
        if(ax == x1 && ay == y1){
            ax = x2;
            ay = y2;
        } else if (bx == x1 && by == y1){
            bx = x2;
            by = y2;
        } else if (cx == x1 && cy == y1){
            cx = x2;
            cy = y2;
        }
    }
    if (ax==5 && ay == 8 && bx ==4 && by ==8 && cx==6 && cy==8) cout << "YES" << endl;
    else cout << "NO" << endl;
}
            
            
            
        