結果
| 問題 | No.24 数当てゲーム | 
| コンテスト | |
| ユーザー |  Zu_rin | 
| 提出日時 | 2019-04-01 22:10:06 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 625 bytes | 
| コンパイル時間 | 690 ms | 
| コンパイル使用メモリ | 74,704 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-11-27 03:01:08 | 
| 合計ジャッジ時間 | 1,265 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 7 WA * 3 | 
ソースコード
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
int main(void) {
	int num, i = 0, j, k;
	cin >> num;
	string s;
	vector<int> ans(10, 1), qs(5, 16);
	for (; i < num; i++) {
		scanf("%d%d%d%d", &qs[0], &qs[1], &qs[2], &qs[3]);
		cin >> s;
		sort(qs.begin(), qs.end());
		if (s == "YES") {
			for (j = 0, k = 0; j < 10; j++) {
				if (ans[j] == 2)
					continue;
				if (j == qs[k]) 
					k++;
				else
					ans[j] = 2;
			}
		}
		else {
			for (j = 0; j < 4; j++)
				ans[qs[j]] = 2;
		}
	}
	for (i = 0; i < 10; i++) {
		if (ans[i] == 1)
			cout << i << "\n";
	}
	return 0;
}
            
            
            
        