結果
| 問題 | No.24 数当てゲーム | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2023-01-03 09:54:41 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                RE
                                 
                             | 
| 実行時間 | - | 
| コード長 | 611 bytes | 
| コンパイル時間 | 1,595 ms | 
| コンパイル使用メモリ | 167,684 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-11-27 01:45:31 | 
| 合計ジャッジ時間 | 3,241 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 2 RE * 8 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
 
int main(){
   int n,a,b,c,d; string text;
   vector<int> set(10,0);
   cin>>n;
   for(int i=0;i<n;i++){
       cin>>a>>b>>c>>d>>text;
       if(text=="YES"){
           set[a-1]++;
           set[b-1]++;
           set[c-1]++;
           set[d-1]++;
           
       }
       else if(text=="NO"){
           set[a-1]--;
           set[b-1]--;
           set[c-1]--;
           set[d-1]--;
       }
   }
       
   int m=-10000;
   for(int i=0;i<10;i++){
      m=max(m,set[i]);
   }
   for(int i=0;i<10;i++){
       if(set[i]==m) cout<<i+1<<endl;
   }
   
   
}
            
            
            
        