結果

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

テストケース

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

ソースコード

diff #

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

int main()
{
    int n;
    cin >> n;
    vector<string> res = {"AC", "WA", "TLE", "MLE", "OLE", "RE"};
    for (int i = 0; i < n; i++){
        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;
                }
            }
        }
    }
}
0