結果
| 問題 |
No.870 無敵囲い
|
| コンテスト | |
| ユーザー |
beet
|
| 提出日時 | 2019-08-30 21:25:02 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 5 ms / 300 ms |
| コード長 | 648 bytes |
| コンパイル時間 | 2,192 ms |
| コンパイル使用メモリ | 196,476 KB |
| 最終ジャッジ日時 | 2025-01-07 15:43:40 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using Int = long long;
template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;}
template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;}
//INSERT ABOVE HERE
signed main(){
int n;
cin>>n;
vector<string> vs(11,string(11,'#'));
vs[2][8]='A';
vs[3][9]='B';
vs[7][9]='C';
for(int i=0;i<n;i++){
int x1,y1,x2,y2;
cin>>x1>>y1>>x2>>y2;
if(vs[x1][y1]=='#') continue;
swap(vs[x1][y1],vs[x2][y2]);
}
vector<string> ws(11,string(11,'#'));
ws[5][8]='A';
ws[4][8]='B';
ws[6][8]='C';
cout<<(vs==ws?"YES":"NO")<<endl;
return 0;
}
beet