結果
問題 |
No.24 数当てゲーム
|
ユーザー |
|
提出日時 | 2023-01-03 09:53:05 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 605 bytes |
コンパイル時間 | 1,489 ms |
コンパイル使用メモリ | 167,716 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-27 01:45:28 |
合計ジャッジ時間 | 3,335 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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=0; for(int i=0;i<10;i++){ m=max(m,set[i]); } for(int i=0;i<9;i++){ if(set[i]==m) cout<<i+1<<endl; } }