結果

問題 No.24 数当てゲーム
ユーザー shimashima_kshimashima_k
提出日時 2015-04-25 14:09:46
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 699 bytes
コンパイル時間 969 ms
コンパイル使用メモリ 52,388 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-18 11:10:44
合計ジャッジ時間 1,029 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include "iostream"
using namespace std;

int main(){
    int n;
    int a,b,c,d;
    int list[] = {0,0,0,0,0,0,0,0,0,0};
    string truth;
    cin>>n;
    while (n--) {
        cin >>a>>b>>c>>d>>truth;

        if (truth == "NO") {
            for (int i=0; i < 10; i++) {

                if (i==a or i==b or i==c or i==d){
                    list[i] =-1;
                }
            }
        } else{
            for (int i=0; i < 10; i++) {
                if (i!=a and i!=b and i!=c and i!=d){
                    list[i] =-1;
                }
            }
        }
    }
    for (int i=0; i < 10; i++) {
        if (list[i]==0){
            cout<<i<<endl;
        }
    }
    return 0;
}
0