結果
| 問題 | No.24 数当てゲーム |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-08-09 00:50:37 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 5,000 ms |
| + 270µs | |
| コード長 | 515 bytes |
| 記録 | |
| コンパイル時間 | 293 ms |
| コンパイル使用メモリ | 76,664 KB |
| 実行使用メモリ | 6,528 KB |
| 最終ジャッジ日時 | 2026-09-20 05:13:20 |
| 合計ジャッジ時間 | 1,604 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
#include <iostream>
#include <vector>
auto main() -> int {
int N;
std::cin >> N;
std::vector<int> scores(10);
std::vector<int> nums(4);
std::string R;
for (int i = 0; i < N; ++i) {
for (int &n : nums) {
std::cin >> n;
}
std::cin >> R;
for (int n : nums) {
switch (R[0]) {
case 'Y': scores[n]++; break;
case 'N': scores[n]--; break;
}
}
}
int max_n = 0;
for (int n = 1; n < 10; n++) {
if (scores[n] > scores[max_n]) {
max_n = n;
}
}
std::cout << max_n << std::endl;
}