結果

問題 No.24 数当てゲーム
ユーザー umezo
提出日時 2022-07-22 07:13:46
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 522 bytes
コンパイル時間 2,044 ms
コンパイル使用メモリ 194,844 KB
最終ジャッジ日時 2025-01-30 11:34:48
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define ALL(v) v.begin(),v.end()
typedef long long ll;
 
#include<bits/stdc++.h>
using namespace std;
 
int main(){
  ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  
  int n;
  cin>>n;
  vector<int> A(10,1);
  rep(i,n){
    int a,b,c,d;
    string r;
    cin>>a>>b>>c>>d>>r;
    if(r[0]=='Y'){
      rep(j,10){
        if(j!=a && j!=b && j!=c && j!=d) A[j]=0;
      }
    }
    else A[a]=0,A[b]=0,A[c]=0,A[d]=0;
  }
  rep(i,10) if(A[i]) cout<<i<<endl;
  
  return 0;
}
0