結果

問題 No.24 数当てゲーム
ユーザー fumi6328fumi6328
提出日時 2018-08-23 01:47:58
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 546 bytes
コンパイル時間 1,581 ms
コンパイル使用メモリ 51,932 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-26 21:35:15
合計ジャッジ時間 1,454 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 WA -
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 1 ms
4,380 KB
testcase_07 WA -
testcase_08 AC 2 ms
4,376 KB
testcase_09 AC 2 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
using namespace std;

int main()
{
    int n;
    cin >> n;

    int a,b,c,d,flag[10] = {};
    string r;
    for(int i = 0; i < n; i++){
        cin >> a >> b >> c >> d >> r;
        if(r == "YES"){
            flag[a,b,c,d]++;
        }else{
            flag[a,b,c,d]--;
        }
    }

    int jud = -1,ans = 0;
    for(int i = 0; i <= 9; i++){
        if(jud < flag[i]){
            jud = flag[i];
            ans = i;
        }
    }
    cout << ans <<endl;
    return 0;
}
0