結果
| 問題 | No.24 数当てゲーム | 
| コンテスト | |
| ユーザー |  Hissha_ | 
| 提出日時 | 2020-03-07 23:56:57 | 
| 言語 | C (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 1 ms / 5,000 ms | 
| コード長 | 844 bytes | 
| コンパイル時間 | 152 ms | 
| コンパイル使用メモリ | 30,208 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-10-15 14:31:19 | 
| 合計ジャッジ時間 | 669 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 10 | 
ソースコード
#include<stdio.h>
#include<stdbool.h>
int main(void)
{
	int turn;
	int a[6], b[6], c[6], d[6];
	char r[6][3];
	bool sel[10] = { true,true,true,true,true,true,true,true,true,true };
	scanf("%d", &turn);
	for (int idx = 0; idx < turn; idx++) {
		scanf("%d %d %d %d %s", &a[idx], &b[idx], &c[idx], &d[idx], r[idx]);
	}
	for (int idx = 0; idx < turn; idx++) {
		if (r[idx][0] == 'Y') {
			for (int isel = 0; isel < 10; isel++) {
				if (isel != a[idx] && isel != b[idx] && isel != c[idx] && isel != d[idx]) {
					sel[isel] = false;
				}
			}
		}
		else {
			for (int isel = 0; isel < 10; isel++) {
				if (isel == a[idx] || isel == b[idx] || isel == c[idx] || isel == d[idx]) {
					sel[isel] = false;
				}
			}
		}
	}
	for (int isel = 0; isel < 10; isel++) {
		if (sel[isel] == true) {
			printf("%d\n", isel);
		}
	}
	return 0;
}
            
            
            
        