結果
| 問題 | No.870 無敵囲い | 
| コンテスト | |
| ユーザー |  mmn15277198 | 
| 提出日時 | 2020-06-03 22:17:30 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 300 ms | 
| コード長 | 573 bytes | 
| コンパイル時間 | 594 ms | 
| コンパイル使用メモリ | 80,820 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-06-29 06:41:24 | 
| 合計ジャッジ時間 | 1,209 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 18 | 
ソースコード
#include<iostream>
#include<math.h>
#include<string.h>
#include<vector>
#include<algorithm>
#include<iomanip>
#include<deque>
using namespace std;
int main(){
	
	char c[10][10];
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			c[i][j]=' ';
		}
	}
	
	c[2][8]='A';
	c[3][9]='B';
	c[7][9]='C';
	
	int n;
	cin >> n;
	for(int i=0;i<n;i++){
		int x1,y1,x2,y2;
		cin >> x1 >> y1 >> x2 >> y2;
		//c[x2][y2]=c[x1][y1];
		swap(c[x1][y1],c[x2][y2]);
	}
	if(c[5][8]=='A' && c[4][8]=='B' && c[6][8]=='C'){
		cout << "YES" << endl;
	}else{
		cout << "NO" << endl;
	}
		
	return 0;
}
            
            
            
        