結果
| 問題 | No.24 数当てゲーム |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-04-26 05:53:07 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 496 bytes |
| コンパイル時間 | 1,293 ms |
| コンパイル使用メモリ | 159,732 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-05 02:40:49 |
| 合計ジャッジ時間 | 1,757 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
#include "bits/stdc++.h"
using namespace std;
typedef long long Int;
#define REP(i,n) for(int (i)=0;(i)<(int)(n);++(i))
int main() {
int N; cin >> N;
int a[6][4];
string s[6];
REP(i, N) {
REP(j, 4) cin >> a[i][j];
cin >> s[i];
}
for (int ans = 0; ans <= 9; ans++) {
bool ok = true;
REP(t, N) {
bool isin = a[t][0] == ans || a[t][1] == ans || a[t][2] == ans || a[t][3] == ans;
ok = ok && isin == (s[t] == "YES");
}
if (ok) {
cout << ans << endl;
break;
}
}
}