結果

問題 No.1317 月曜日の朝、WAを出した
コンテスト
ユーザー k
提出日時 2020-12-23 19:13:03
言語 C++17
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=c++17 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 14 ms / 1,500 ms
コード長 647 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,164 ms
コンパイル使用メモリ 218,936 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2026-06-16 05:11:57
合計ジャッジ時間 2,057 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#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