結果
| 問題 | No.24 数当てゲーム | 
| コンテスト | |
| ユーザー |  commy | 
| 提出日時 | 2016-05-09 15:18:03 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 565 bytes | 
| コンパイル時間 | 682 ms | 
| コンパイル使用メモリ | 64,720 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-10-05 13:07:10 | 
| 合計ジャッジ時間 | 1,128 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 8 WA * 2 | 
ソースコード
#include<iostream>
#include<string>
using namespace std;
int yeslist[9];
int nolist[9];
int cnt;
int main(){
  int N;
  cin>>N;
  for(int i=0;i<N;i++){
    int a,b,c,d;
    string str;
    cin>>a>>b>>c>>d>>str;
    if(str == "YES"){
      cnt++;
      yeslist[a-1]++;
      yeslist[b-1]++;
      yeslist[c-1]++;
      yeslist[d-1]++;
    }else{
      nolist[a-1] |= 1;
      nolist[b-1] |= 1;
      nolist[c-1] |= 1;
      nolist[d-1] |= 1;
    }
  }
  for(int i=0;i<9;i++){
    if(yeslist[i] == cnt && !nolist[i]){
      cout<<i+1<<endl;
    }
  }
  return 0;
}
            
            
            
        