結果
| 問題 | No.24 数当てゲーム |
| コンテスト | |
| ユーザー |
saikatoto
|
| 提出日時 | 2020-08-10 16:13:40 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 5,000 ms |
| コード長 | 613 bytes |
| コンパイル時間 | 2,196 ms |
| コンパイル使用メモリ | 196,308 KB |
| 最終ジャッジ日時 | 2025-01-12 19:42:53 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<bool> ans(10, true);
for(int i = 0; i < n; i++){
vector<int> now(4);
for(int j = 0; j < 4; j++) cin >> now.at(j);
string r;
cin >> r;
if(r == "NO"){
for(int j = 0; j < 4; j++) ans.at(now.at(j)) = false;
continue;
}
for(int j = 0; j < 10; j++){
bool ok = false;
for(int k = 0; k < 4; k++){
if(j == now.at(k)) ok = true;
}
if(ok) continue;
ans.at(j) = false;
}
}
for(int i = 0; i < 10; i++){
if(ans.at(i)) cout << i << endl;
}
}
saikatoto