結果
| 問題 |
No.870 無敵囲い
|
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2023-10-21 11:34:26 |
| 言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 4 ms / 300 ms |
| コード長 | 854 bytes |
| コンパイル時間 | 786 ms |
| コンパイル使用メモリ | 76,636 KB |
| 最終ジャッジ日時 | 2025-02-17 12:23:26 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 |
ソースコード
#include <iostream>
#include <list>
#include <vector>
#include <string>
#include <stdio.h>
#include <stdint.h>
#include <iomanip>
using namespace std;
using uint = unsigned int;
using ll = long long;
#define CIN( LL , A ) LL A; cin >> A
#define GETLINE( A ) string A; getline( cin , A )
#define FOR_ITR( ARRAY , ITR , END ) for( auto ITR = ARRAY .begin() , END = ARRAY .end() ; ITR != END ; ITR ++ )
int main()
{
CIN( ll , N );
ll C[10][10] = {};
C[2][8] = 1;
C[3][9] = 2;
C[7][9] = 3;
ll x;
ll y;
for( ll i = 0 ; i < N ; i++ ){
cin >> x >> y;
ll& c = C[x][y];
cin >> x >> y;
if( c != 0 ){
C[x][y] = c;
c = 0;
}
}
string answer;
if( C[5][8] == 1 && C[4][8] == 2 && C[6][8] == 3 ){
answer = "YES";
} else {
answer = "NO";
}
cout << answer << endl;
return 0;
}