結果

問題 No.24 数当てゲーム
ユーザー pto8913pto8913
提出日時 2020-02-20 21:17:24
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 593 bytes
コンパイル時間 494 ms
コンパイル使用メモリ 65,344 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-17 06:30:40
合計ジャッジ時間 995 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <string>

using namespace std;

#define rep(i, a, n) for(int i = a; i < (n); ++i)

int main(){
  int n;
  cin >> n;

  int a, b, c, d;
  string e;

  bool nums[9] = { false };
  rep(i, 0, n)
  {
    cin >> a >> b >> c >> d >> e;
    --a; --b; --c; --d;
    if (e == "YES")
    {
      nums[a] = true;
      nums[b] = true;
      nums[c] = true;
      nums[d] = true;
    }
    else
    {
      nums[a] = false;
      nums[b] = false;
      nums[c] = false;
      nums[d] = false;
    }
  }
  rep(i, 0, n)
  {
    if (nums[i] == true) cout << nums[i] << endl;
  }
}
0