結果

問題 No.870 無敵囲い
ユーザー kpinkcatkpinkcat
提出日時 2023-07-27 08:44:25
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 300 ms
コード長 731 bytes
コンパイル時間 910 ms
コンパイル使用メモリ 105,292 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-14 21:31:44
合計ジャッジ時間 1,991 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,812 KB
testcase_01 AC 2 ms
6,944 KB
testcase_02 AC 2 ms
6,940 KB
testcase_03 AC 2 ms
6,940 KB
testcase_04 AC 2 ms
6,944 KB
testcase_05 AC 2 ms
6,940 KB
testcase_06 AC 2 ms
6,944 KB
testcase_07 AC 2 ms
6,940 KB
testcase_08 AC 2 ms
6,940 KB
testcase_09 AC 2 ms
6,940 KB
testcase_10 AC 2 ms
6,940 KB
testcase_11 AC 2 ms
6,940 KB
testcase_12 AC 2 ms
6,940 KB
testcase_13 AC 2 ms
6,940 KB
testcase_14 AC 2 ms
6,944 KB
testcase_15 AC 2 ms
6,944 KB
testcase_16 AC 2 ms
6,944 KB
testcase_17 AC 2 ms
6,944 KB
testcase_18 AC 2 ms
6,940 KB
testcase_19 AC 2 ms
6,940 KB
testcase_20 AC 2 ms
6,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
}
0