結果

問題 No.1317 月曜日の朝、WAを出した
ユーザー kk
提出日時 2020-12-23 19:13:03
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 28 ms / 1,500 ms
コード長 647 bytes
コンパイル時間 2,041 ms
コンパイル使用メモリ 198,804 KB
最終ジャッジ日時 2025-01-17 06:28:39
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4
権限があれば一括ダウンロードができます

ソースコード

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