結果
| 問題 | No.24 数当てゲーム | 
| コンテスト | |
| ユーザー |  piniky | 
| 提出日時 | 2015-09-03 00:23:05 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 5,000 ms | 
| コード長 | 652 bytes | 
| コンパイル時間 | 506 ms | 
| コンパイル使用メモリ | 63,236 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-07-18 21:49:39 | 
| 合計ジャッジ時間 | 1,029 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 10 | 
ソースコード
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#include <stack>
#define REP(i,n) for (int i=0;i<(n);i++)
using namespace std;
int main(){
	bool flag[10] = { true, true, true, true, true, true, true, true, true, true};
	int N, tmp[4];
	string tmp2;
	cin >> N;
	REP(i, N){
		REP(j, 4){ 
			cin >> tmp[j];
		}
		cin >> tmp2;
		if (tmp2 == "YES"){
			REP(j, 10){
				if (tmp[0] == j || tmp[1] == j || tmp[2] == j || tmp[3] == j){
					flag[j] = flag[j] && true;
				}
				else{
					flag[j] = false;
				}
			}
		}
		else{
			REP(j, 4) flag[tmp[j]] = false;
		}
	}
	REP(i, 10) if (flag[i]) cout << i << endl;
	return 0;
}
            
            
            
        