結果
問題 | No.870 無敵囲い |
ユーザー |
|
提出日時 | 2019-08-30 21:30:02 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 300 ms |
コード長 | 454 bytes |
コンパイル時間 | 1,916 ms |
コンパイル使用メモリ | 192,156 KB |
最終ジャッジ日時 | 2025-01-07 15:45:11 |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int a[]={28,39,79}; int aa[]={58,48,68}; int n; cin>>n; while (n--) { int b,c,d,e; cin>>b>>c>>d>>e; for (int i=0;i<3;i++) if (10*b+c==a[i]) a[i]=10*d+e; } for (int i=0;i<3;i++) if (a[i]!=aa[i]) { puts("NO"); return 0; } puts("YES"); return 0; }