結果

問題 No.870 無敵囲い
ユーザー okkuukenkenokkuukenken
提出日時 2022-06-03 17:05:50
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 300 ms
コード長 356 bytes
コンパイル時間 689 ms
コンパイル使用メモリ 77,404 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-21 01:31:50
合計ジャッジ時間 2,050 ms
ジャッジサーバーID
(参考情報)
judge9 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include<iostream>
using namespace std;
int main(){
	int n,x1,y1,x2,y2;
	cin>>n;
	int ax=2,ay=8,bx=3,by=9,cx=7,cy=9;
	while(cin>>x1>>y1>>x2>>y2){
		if(ax==x1&&ay==y1){
			ax=x2;
			ay=y2;
		}
		if(bx==x1&&by==y1){
			bx=x2;
			by=y2;
		}
		if(cx==x1&&cy==y1){
			cx=x2;
			cy=y2;
		}
	}
	cout<<(ax==5&&ay==8&&bx==4&&by==8&&cx==6&&cy==8?"YES":"NO")<<endl;
}
0