結果

問題 No.1317 月曜日の朝、WAを出した
ユーザー milanis48663220milanis48663220
提出日時 2020-12-14 00:37:01
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 25 ms / 1,500 ms
コード長 1,456 bytes
コンパイル時間 848 ms
コンパイル使用メモリ 95,140 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-20 04:35:25
合計ジャッジ時間 1,363 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 24 ms
4,348 KB
testcase_02 AC 25 ms
4,348 KB
testcase_03 AC 24 ms
4,348 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function 'int to_idx(std::string)':
main.cpp:26:1: warning: control reaches end of non-void function [-Wreturn-type]
   26 | }
      | ^

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <cassert>

#define debug_value(x) cerr << "line" << __LINE__ << ":<" << __func__ << ">:" << #x << "=" << x << endl;
#define debug(x) cerr << "line" << __LINE__ << ":<" << __func__ << ">:" << x << endl;

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

using namespace std;
typedef long long ll;

int to_idx(string s){
    if(s == "AC") return 0;
    if(s == "WA") return 1;
    if(s == "TLE") return 2;
    if(s == "MLE") return 3;
    if(s == "OLE") return 4;
    if(s == "RE") return 5;
}

void solve(){
    int cnt[2][6];
    for(int i = 0; i < 2; i++){
        for(int j = 0; j < 6; j++){
            cin >> cnt[i][j];
        }
    }
    string x; cin >> x;
    int idx = to_idx(x);
    if(cnt[0][idx] != 0){
        cout << "No" << endl;
        return;
    }
    for(int i = 1; i <= 5; i++){
        if(i != idx && cnt[1][i] != 0){
            cout << "No" << endl;
            return;
        }
    }
    if(cnt[1][0] <= cnt[0][0]){
        cout << "Yes" << endl;
    }else{
        cout << "No" << endl;
    }
}

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout << setprecision(10) << fixed;
    int n; cin >> n;
    for(int i = 0; i < n; i++) solve();
}
0