結果
問題 | No.870 無敵囲い |
ユーザー |
![]() |
提出日時 | 2020-08-19 05:18:28 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 300 ms |
コード長 | 631 bytes |
コンパイル時間 | 1,512 ms |
コンパイル使用メモリ | 169,380 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-29 06:43:30 |
合計ジャッジ時間 | 2,038 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 |
ソースコード
#include <bits/stdc++.h> #define int long long #define double long double using namespace std; const int MOD = 1000000007; const int INF = 1e14; using Graph = vector<vector<int>>; signed main(){ int N; cin >> N; vector<string> board(9); for( int i = 0; i < 9; i++ ) board[i] = "........."; board[1][7] = 'A'; board[2][8] = 'B'; board[6][8] = 'C'; for( int i = 0; i < N; i++ ){ int a, b, c, d; cin >> a >> b >> c >> d; a--; b--; c--; d--; swap(board[a][b], board[c][d]); } if( board[4][7] =='A' && board[3][7] == 'B' && board[5][7] == 'C' ) cout << "YES" << endl; else cout << "NO" << endl; }