結果

問題 No.24 数当てゲーム
ユーザー トミートミー
提出日時 2024-01-15 21:20:56
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 612 bytes
コンパイル時間 2,118 ms
コンパイル使用メモリ 202,296 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2024-01-15 21:20:59
合計ジャッジ時間 3,109 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

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

int main(){
    int n;
    vector<int> f(10,0);
    cin>>n;
    for(int i=1;i<=n;i++){
        int a,b,c,d;
        string s;
        cin>>a>>b>>c>>d>>s;
        if(s=="YES"){
            for(int j=0;j<10;j++){
                if(j!=a&&j!=b&&j!=c&&j!=d){
                    f[j]=-1;
                }
            }
        }
        else{
            f[a]=-1;
            f[b]=-1;
            f[c]=-1;
            f[d]=-1;
        }

    }
    for(int i=0;i<=10;i++){
        if(f[i]==0){
            cout<<i<<endl;
        }
    }
    


    //system("pause");
} 
0