結果
問題 | No.24 数当てゲーム |
ユーザー |
|
提出日時 | 2017-01-11 23:40:23 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 523 bytes |
コンパイル時間 | 501 ms |
コンパイル使用メモリ | 62,760 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-21 09:53:34 |
合計ジャッジ時間 | 1,124 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
#include <iostream>#include <vector>#include <string>#include <algorithm>int main(){int N; std::cin >> N;std::vector<int> a(10);for(auto &x : a) x = 0;for(int n=0; n<N; n++){int tmp[4];for(auto &x : tmp) std::cin >> x;std::string str; std::cin >> str;if(str=="YES"){for(const auto &x : tmp){a[x]++;}}else{for(const auto &x : tmp){a[x]--;}}}std::cout << std::distance(a.begin(), std::max_element(a.begin(), a.end())) << std::endl;return 0;}