結果

問題 No.870 無敵囲い
コンテスト
ユーザー beet
提出日時 2019-08-30 21:23:23
言語 C++17
(gcc 15.3.0 + boost 1.92.0 + ACL)
コンパイル:
g++-15 -O2 -fplugin=/usr/lib/yukicoder/noavx512-gcc15.so -lm -std=c++17 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 1 ms / 300 ms
+ 691µs
コード長 614 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,287 ms
コンパイル使用メモリ 216,716 KB
実行使用メモリ 9,904 KB
最終ジャッジ日時 2026-10-24 01:57:51
合計ジャッジ時間 2,712 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#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;
    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;
}
0