結果

問題 No.1317 月曜日の朝、WAを出した
ユーザー pointNpointN
提出日時 2022-05-18 23:58:45
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 33 ms / 1,500 ms
コード長 1,301 bytes
コンパイル時間 1,248 ms
コンパイル使用メモリ 131,840 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-17 05:30:29
合計ジャッジ時間 2,042 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,348 KB
testcase_01 AC 33 ms
4,348 KB
testcase_02 AC 33 ms
4,348 KB
testcase_03 AC 33 ms
4,348 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:46:7: warning: 'x' may be used uninitialized [-Wmaybe-uninitialized]
   46 |       if(x==i) continue;
      |       ^~
main.cpp:37:9: note: 'x' was declared here
   37 |     int x;
      |         ^

ソースコード

diff #

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <cmath>
#include <iomanip>
#include <stack>
#include <queue>
#include <numeric>
#include <map>
#include <unordered_map>
#include <set>
#include <fstream>
#include <chrono>
#include <random>
#include <bitset>
//#include <atcoder/all>
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define sz(x) ((int)(x).size())
#define pb push_back
using ll = long long;
using namespace std;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
ll gcd(ll a, ll b) {return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) {return a/gcd(a,b)*b;}

int main(){
  int Q; cin >> Q;
  while(Q--){
    vector<int> a(6),b(6);
    rep(i,6) cin >> a[i];
    rep(i,6) cin >> b[i];
    int x;
    string X; cin >> X;
    if(X=="WA") x=1;
    if(X=="TLE") x=2;
    if(X=="MLE") x=3;
    if(X=="OLE") x=4;
    if(X=="RE") x=5;
    int ok = 1;
    for(int i=1;i<6;i++){
      if(x==i) continue;
      if(b[i]!=0) ok=0;
    }
    if(a[0]<b[0]) ok=0;
    if(a[x]) ok=0;
    if(ok) cout << "Yes" << endl;
    else cout << "No" << endl;
  }
  return 0;
}
0