結果
問題 | No.24 数当てゲーム |
ユーザー | 313makoto0 |
提出日時 | 2014-12-17 00:06:02 |
言語 | C90 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 589 bytes |
コンパイル時間 | 500 ms |
コンパイル使用メモリ | 24,276 KB |
実行使用メモリ | 4,380 KB |
最終ジャッジ日時 | 2023-09-02 15:32:13 |
合計ジャッジ時間 | 1,661 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge11 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
4,376 KB |
testcase_01 | AC | 0 ms
4,376 KB |
testcase_02 | AC | 0 ms
4,380 KB |
testcase_03 | AC | 1 ms
4,376 KB |
testcase_04 | AC | 1 ms
4,376 KB |
testcase_05 | AC | 0 ms
4,376 KB |
testcase_06 | AC | 1 ms
4,376 KB |
testcase_07 | AC | 1 ms
4,376 KB |
testcase_08 | AC | 1 ms
4,380 KB |
testcase_09 | AC | 0 ms
4,376 KB |
ソースコード
#include<stdio.h> #include<string.h> int main() { int x[10],y[4]; int i,j,N,a,b,c,d; char r[4]; for (i=0;i<10;i++) { x[i]=0; } scanf("%d",&N); for (i=0;i<N;i++) { scanf("%d %d %d %d %s",&y[0],&y[1],&y[2],&y[3],r); if (strcmp(r,"YES")==0) { for (j=0;j<10;j++) { if (j!=y[0] && j!=y[1] && j!=y[2] && j!=y[3]) { x[j]=-1; } } } else if (strcmp(r,"NO")==0) { for (j=0;j<4;j++) { x[y[j]]=-1; } } } for (i=0;i<10;i++) { if (x[i]==0) break; } printf("%d\n",i); return 0; }