結果

問題 No.24 数当てゲーム
ユーザー aaaaaaiuaaaaaaiu
提出日時 2019-07-26 01:37:36
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 565 bytes
コンパイル時間 1,601 ms
コンパイル使用メモリ 166,976 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-02 06:21:35
合計ジャッジ時間 1,807 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main() {
    int n; cin >> n;
    bool poss[10];
    fill(poss, poss+10, true);
    while (n--) {
        int a, b, c, d; string s;
        cin>>a>>b>>c>>d>>s;
        if (s == "NO") {
            poss[a]=poss[b]=poss[c]=poss[d]=false;
        } else {
            for (int i=0; i<10; i++) {
                if (i==a||i==b||i==c||i==d)continue;
                poss[i]=false;
            }
        }
    }
    for(int i=0;i<10;i++){
        if(poss[i])cout << i << endl;
    }
    return 0;
}
0