結果

問題 No.870 無敵囲い
ユーザー mmn15277198
提出日時 2020-06-03 21:53:20
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 554 bytes
コンパイル時間 573 ms
コンパイル使用メモリ 80,940 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-29 06:41:23
合計ジャッジ時間 1,178 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 13 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<math.h>
#include<string.h>
#include<vector>
#include<algorithm>
#include<iomanip>
#include<deque>
using namespace std;

int main(){
	char c[9][9];
	
	for(int i=0;i<9;i++){
		for(int j=0;j<9;j++){
			c[i][j]='o';
		}
	}
	
	c[1][7]='A';
	c[2][8]='B';
	c[6][8]='C';
	
	int n;
	cin >> n;
	for(int i=0;i<n;i++){
		int q,w,e,r;
		cin >> q >> w >> e >> r;
		q--;
		w--;
		e--;
		r--;
		c[e][r]=c[q][w];
	}
	if(c[4][7]=='A' && c[3][7]=='B' && c[5][7]=='C'){
		cout << "YES" << endl;
	}else{
		cout << "NO" << endl;
	}
		
	return 0;
}
0