結果

問題 No.24 数当てゲーム
ユーザー motimoti
提出日時 2015-11-16 20:56:29
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 1,212 bytes
コンパイル時間 776 ms
コンパイル使用メモリ 103,932 KB
実行使用メモリ 4,352 KB
最終ジャッジ日時 2023-10-11 17:01:46
合計ジャッジ時間 1,413 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <complex>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <iomanip>
#include <assert.h>
#include <array>
#include <cstdio>
#include <cstring>
#include <random>
#include <functional>
#include <numeric>
#include <bitset>

using namespace std;

#define REP(i,a,b) for(int i=a;i<(int)b;i++)
#define rep(i,n) REP(i,0,n)
#define all(c) (c).begin(), (c).end()
#define zero(a) memset(a, 0, sizeof a)
#define minus(a) memset(a, -1, sizeof a)
#define minimize(a, x) a = std::min(a, x)
#define maximize(a, x) a = std::max(a, x)

using ll  = long long;
int const inf = 1<<29;

int main() {

  int n; cin >> n;
  set<int> st, ust;
  rep(i, n) {
    int a, b, c, d; cin >> a >> b >> c >> d;
    string s; cin >> s;
    if(s == "NO") {
      ust.insert(a);
      ust.insert(b);
      ust.insert(c);
      ust.insert(d);
    }
    else {
      st.insert(a);
      st.insert(b);
      st.insert(c);
      st.insert(d);
    }
  }

  REP(i, 0, 10) {
    if(ust.count(i)) { continue; }
    if(st.count(i)) {
      cout << i << endl;
      exit(0);
    }
  }

  return 0;
}
0