結果

問題 No.24 数当てゲーム
ユーザー nnasen
提出日時 2017-08-28 04:51:35
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 427 bytes
コンパイル時間 1,569 ms
コンパイル使用メモリ 168,096 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-06 07:36:15
合計ジャッジ時間 2,085 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 7 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define FOR(i,a,b) for(int i = (a); i < (b); ++i)
using namespace std;

int main() {
	int n, a, b, c, d;
	string r;
	int x[10] = { 1 };
	cin >> n;
	FOR(i, 0, n) {
		cin >> a >> b >> c >> d >> r;
		if (r == "YES") {
			x[a]++; x[b]++; x[c]++; x[d]++;
		}
		else {
			x[a] = x[b] = x[c] = x[d] = -n;
		}
	}
	int ans = 0;
	FOR(i, 0, 10) {
		if (x[i] >= ans) ans = i;
	}
	cout << ans << endl;

	return 0;
}
0