結果

問題 No.24 数当てゲーム
コンテスト
ユーザー himueu
提出日時 2026-10-17 14:09:38
言語 C++23(gcc16)
(gcc 16.2.0 + boost 1.92.0 + ACL)
コンパイル:
g++-16 -O2 -lm -std=c++23 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 1 ms / 5,000 ms
+ 836µs
コード長 565 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,949 ms
コンパイル使用メモリ 178,516 KB
実行使用メモリ 9,896 KB
最終ジャッジ日時 2026-10-17 14:09:54
合計ジャッジ時間 4,289 ms
ジャッジサーバーID
(参考情報)
judge5_0 / judge4_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <iostream>
#include <tuple>
#include <vector>

int main() {
    using namespace std;
    int n;
    cin >> n;
    vector<tuple<int, int, int, int, string>> res(n);
    for (auto &[a, b, c, d, r] : res) { cin >> a >> b >> c >> d >> r;}

    for (int x = 0; x < 10; x++) {
        bool ok = true;
        for (auto [a, b, c, d, r] : res) {
            if (x == a || x == b || x == c || x == d) {
                ok &= (r == "YES");
            } else {
                ok &= (r == "NO");
            }
        }
        if (ok) { cout << x << endl; }
    }
}
0