結果
| 問題 | No.24 数当てゲーム |
| コンテスト | |
| ユーザー |
ajiruajiru
|
| 提出日時 | 2019-12-05 11:05:41 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 520 bytes |
| コンパイル時間 | 511 ms |
| コンパイル使用メモリ | 69,008 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-12-17 15:41:25 |
| 合計ジャッジ時間 | 1,098 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
#include <iostream>
#include <vector>
using namespace std;
int main(void) {
cin.tie(0);
ios::sync_with_stdio(false);
int n, a, b, c, d;
string r;
vector<int> ans(10, 1);
cin >> n;
for (int i = 0; i < n; ++i) {
cin >> a >> b >> c >> d >> r;
if (r == "YES") {
for (int j = 0; j <= 9; ++j) {
if (j != a && j != b && j != c && j != d)
ans[j] = 0;
}
}
if (r == "NO") {
ans[a] = 0; ans[b] = 0; ans[c] = 0; ans[d] = 0;
}
}
for (int i = 0; i < 10; ++i) if (ans[i]) cout << i;
return 0;
}
ajiruajiru