結果

問題 No.1317 月曜日の朝、WAを出した
ユーザー kpinkcat
提出日時 2023-09-02 18:00:50
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 26 ms / 1,500 ms
コード長 923 bytes
コンパイル時間 1,096 ms
コンパイル使用メモリ 106,508 KB
最終ジャッジ日時 2025-02-16 18:12:57
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4
権限があれば一括ダウンロードができます

ソースコード

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 idx = -1;
    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]) idx = j;
    if (idx != 0 && a[idx] != 0) cout << "No" << endl;
    else {
        if (idx == 0) cout << ((b[0] == cnt) ? "Yes" : "No" ) << endl; 
        else cout << ((cnt - b[0] == b[idx]) ? "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