結果

問題 No.1317 月曜日の朝、WAを出した
ユーザー kpinkcatkpinkcat
提出日時 2023-09-02 17:55:19
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 26 ms / 1,500 ms
コード長 954 bytes
コンパイル時間 1,295 ms
コンパイル使用メモリ 107,400 KB
実行使用メモリ 4,372 KB
最終ジャッジ日時 2023-09-02 17:55:21
合計ジャッジ時間 1,900 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,368 KB
testcase_01 AC 26 ms
4,368 KB
testcase_02 AC 25 ms
4,372 KB
testcase_03 AC 26 ms
4,372 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<map>
#include<vector>
#include <algorithm>
#include<math.h>
#include <iomanip>
#include<set>
#include <numeric>
#include<string>
using namespace std;

void solve(){
    vector<string> res = {"AC", "WA", "TLE", "MLE", "OLE", "RE"};
    vector<int> a(6), b(6);
    string s;
    int cnt = 0;
    for(int j = 0; j < 6; j++){
        cin >> a[j];
        cnt += a[j];
    }
    for(int j = 0; j < 6; j++) cin >> b[j];
    cin >> s;
    for(int j = 0; j < 6; j++){
        if (s == res[j]){
            if (j != 0 && a[j] != 0) cout << "No" << endl;
            else {
                if (j == 0) cout << ((b[0] == cnt) ? "Yes" : "No" ) << endl; 
                else cout << ((cnt - b[0] == b[j]) ? "Yes" : "No" ) << endl;
            }
        }
    }
}

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