結果

問題 No.870 無敵囲い
ユーザー chacoder1
提出日時 2020-12-20 22:45:58
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 13 ms / 300 ms
コード長 454 bytes
コンパイル時間 1,894 ms
コンパイル使用メモリ 193,132 KB
最終ジャッジ日時 2025-01-17 05:04:32
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

char koma[10][10];
        
int main(){
  koma[2][8]='A';
  koma[3][9]='B';
  koma[7][9]='C';
  int N;
  cin>>N;
  for(int i=0;i<N;i++){
    int a,b,c,d;
    char temp;
    cin>>a>>b>>c>>d;
    temp=koma[a][b];
    koma[a][b]='K';
    koma[c][d]=temp;
  }
  if(koma[5][8]=='A' && koma[4][8]=='B' && koma[6][8]=='C'){
    cout<<"YES"<<endl;
    return 0;
  }
  else{
    cout<<"NO"<<endl;
  }
  return 0;
}

0