結果
問題 | No.24 数当てゲーム |
ユーザー |
![]() |
提出日時 | 2017-08-05 00:22:51 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 726 bytes |
コンパイル時間 | 534 ms |
コンパイル使用メモリ | 66,556 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-11 20:57:57 |
合計ジャッジ時間 | 1,058 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
#include <iostream>#include <vector>#include <string>#include <algorithm>#include <math.h>using namespace std;int main() {int n;cin >> n;vector<bool> l(10,true);for(int i = 0;i < n;i++){int a,b,c,d;string r;cin >> a >> b >> c >> d >> r;if(r == "NO"){for(int j = 0;j < 10;j++){if(j == a || j == b || j == c || j == d)l[j] = false;}}if(r == "YES"){for(int j = 0;j < 10;j++){if(j == a || j == b || j == c || j == d)continue;l[j] = false;}}}for(int i = 0;i < 10;i++){if(l[i])cout << i << endl;}return 0;}