結果

問題 No.870 無敵囲い
ユーザー ajiruajiruajiruajiru
提出日時 2020-02-05 06:59:22
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 300 ms
コード長 515 bytes
コンパイル時間 538 ms
コンパイル使用メモリ 68,996 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-11 16:29:37
合計ジャッジ時間 1,455 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <vector>
using namespace std;
int main(void) {
	int n, x1, y1, x2, y2;
	cin >> n;
	vector<pair<int, int> > abc = { {2,8},{3,9},{7,9} };
	for (int i = 0; i < n; ++i) {
		cin >> x1 >> y1 >> x2 >> y2;
		pair<int, int> a = { x1,y1 }, b = { x2,y2 };
		for (int j = 0; j < 3; ++j) {
			if (abc[j] == a) abc[j] = b;
		}
	}
	pair<int, int> a = { 5,8 }, b = { 4,8 }, c = { 6,8 };
	if (abc[0] == a && abc[1] == b && abc[2] == c)
		cout << "YES" << endl;
	else
		cout << "NO" << endl;
	return 0;
}
0