結果

問題 No.1317 月曜日の朝、WAを出した
ユーザー kk
提出日時 2020-12-23 19:13:03
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 26 ms / 1,500 ms
コード長 647 bytes
コンパイル時間 2,167 ms
コンパイル使用メモリ 207,352 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-21 15:15:49
合計ジャッジ時間 2,714 ms
ジャッジサーバーID
(参考情報)
judge11 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

#define REP(i,n) for(int i=0; i<(int)(n); i++)

bool solve() {
  vector<int> b(6), a(6);

  REP (i, 6) cin >> b[i];
  REP (i, 6) cin >> a[i];

  string x;
  cin >> x;

  vector<string> s{"AC", "WA", "TLE", "MLE", "OLE", "RE"};
  int p = find(s.begin(), s.end(), x) - s.begin();

  if (b[p]) return false;
  for (int i = 1; i < 6; i++)
    if (i != p && a[i])
      return false;
  return true;
}

int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);

  int n;
  cin >> n;

  while (n--) {
    if (solve())
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
  
  return 0;
}
0