結果
| 問題 | No.870 無敵囲い | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2019-09-01 05:07:13 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 300 ms | 
| コード長 | 444 bytes | 
| コンパイル時間 | 486 ms | 
| コンパイル使用メモリ | 63,872 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-06-29 06:21:49 | 
| 合計ジャッジ時間 | 1,087 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 18 | 
コンパイルメッセージ
main.cpp:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    5 | main()
      | ^~~~
            
            ソースコード
#include<iostream>
using namespace std;
int x[10][10],y[10][10];
int N;
main()
{
	for(int i=1;i<=9;i++)for(int j=1;j<=9;j++)
	{
		x[i][j]=i;
		y[i][j]=j;
	}
	int N;cin>>N;
	for(;N--;)
	{
		int a,b,c,d;cin>>a>>b>>c>>d;
		for(int i=1;i<=9;i++)for(int j=1;j<=9;j++)
		{
			if(x[i][j]==a&&y[i][j]==b)
			{
				x[i][j]=c;
				y[i][j]=d;
			}
		}
	}
	cout<<(x[2][8]==5&&y[2][8]==8&&x[3][9]==4&&y[3][9]==8&&x[7][9]==6&&y[7][9]==8?"YES":"NO")<<endl;
}
            
            
            
        