結果
| 問題 | 
                            No.1317 月曜日の朝、WAを出した
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2022-05-18 23:58:45 | 
| 言語 | C++17  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 42 ms / 1,500 ms | 
| コード長 | 1,301 bytes | 
| コンパイル時間 | 1,167 ms | 
| コンパイル使用メモリ | 128,120 KB | 
| 最終ジャッジ日時 | 2025-01-29 09:16:18 | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 4 | 
コンパイルメッセージ
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;
      |         ^
            
            ソースコード
#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;
}