結果

問題 No.24 数当てゲーム
ユーザー xuzijian629xuzijian629
提出日時 2018-09-13 22:08:34
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 1,198 bytes
コンパイル時間 694 ms
コンパイル使用メモリ 97,640 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-13 19:58:39
合計ジャッジ時間 1,328 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <unordered_map>
#include <chrono>
#include <random>
#include <functional>
#include <utility>
#include <cassert>
#pragma GCC optimize("O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma comment(linker, "STACK:36777216")
using namespace std;
using i64 = int64_t;
constexpr i64 MOD = 1e9 + 7;
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
using vi = vector<i64>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using ii = pair<i64, i64>;

int main() {
    int n;
    cin >> n;
    vi ans(10, 1);
    for (int i = 0; i < n; i++) {
        int a, b, c, d;
        cin >> a >> b >> c >> d;
        string s;
        cin >> s;
        if (s == "NO") {
            ans[a] &= 0;
            ans[b] &= 0;
            ans[c] &= 0;
            ans[d] &= 0;
        } else {
            ans[a] &= 1;
            ans[b] &= 1;
            ans[c] &= 1;
            ans[d] &= 1;
        }
    }
    for (int i = 1; i < 10; i++) {
        if (ans[i]) {
            cout << i << endl;
        }
    }
}
0