結果

問題 No.1317 月曜日の朝、WAを出した
ユーザー forest3forest3
提出日時 2020-12-15 23:32:34
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 40 ms / 1,500 ms
コード長 616 bytes
コンパイル時間 1,928 ms
コンパイル使用メモリ 178,792 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-20 06:57:38
合計ジャッジ時間 2,566 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
 
int main()
{
	int N;
	cin >> N;

ifstream ifs("ans.txt");
	map<string, int> mp;
	mp["WA"] = 1;
	mp["TLE"] = 2;
	mp["MLE"] = 3;
	mp["OLE"] = 4;
	mp["RE"] = 5;
	for( int i = 0; i < N; i++ ) {
		int b = 0;
		int a[6];
		int bb[6];
		string X;

		for( int j = 0; j < 6; j++ ) {
			cin >> bb[j];
			if( j ) b += bb[j];
		}
		for( int j = 0; j < 6; j++ ) cin >> a[j];
		cin >> X;
		int x = mp[X];
		string ans = "Yes";
		for( int j = 1; j < 6; j++ ) {
			if( j == x ) continue;
			if( a[j] ) ans = "No";
		}
		if( a[x] < b || bb[x] ) ans = "No";
		cout << ans << endl;
	}
}
0