結果
| 問題 | No.870 無敵囲い | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2019-09-05 22:23:53 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 300 ms | 
| コード長 | 559 bytes | 
| コンパイル時間 | 612 ms | 
| コンパイル使用メモリ | 72,320 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-06-29 06:22:42 | 
| 合計ジャッジ時間 | 1,316 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 18 | 
ソースコード
#include <algorithm>
#include <iostream>
#include <utility>
#include <vector>
using namespace std;
int main() {
	int N;
	cin >> N;
	vector<pair<int, int>> a{ { 2, 8 }, { 3, 9 }, { 7, 9 } };
	for (int i = 0; i < N; ++i) {
		pair<int, int> x1y1, x2y2;
		cin >> x1y1.first >> x1y1.second >> x2y2.first >> x2y2.second;
		vector<pair<int, int>>::iterator b = find(a.begin(), a.end(), x1y1);
		if (a.end() != b) *b = x2y2;
	}
	if (a[0] == make_pair(5, 8) && a[1] == make_pair(4, 8) && a[2] == make_pair(6, 8)) cout << "YES";
	else cout << "NO";
}
            
            
            
        