結果
問題 | No.355 数当てゲーム(2) |
ユーザー | 👑 testestest |
提出日時 | 2016-04-01 23:17:56 |
言語 | C90 (gcc 11.4.0) |
結果 |
TLE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 2,469 bytes |
コンパイル時間 | 276 ms |
コンパイル使用メモリ | 22,656 KB |
実行使用メモリ | 15,436 KB |
最終ジャッジ日時 | 2024-07-16 23:13:21 |
合計ジャッジ時間 | 6,724 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | TLE | - |
testcase_01 | -- | - |
testcase_02 | -- | - |
testcase_03 | -- | - |
testcase_04 | -- | - |
testcase_05 | -- | - |
testcase_06 | -- | - |
testcase_07 | -- | - |
testcase_08 | -- | - |
testcase_09 | -- | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
testcase_31 | -- | - |
testcase_32 | -- | - |
testcase_33 | -- | - |
testcase_34 | -- | - |
testcase_35 | -- | - |
testcase_36 | -- | - |
testcase_37 | -- | - |
testcase_38 | -- | - |
testcase_39 | -- | - |
testcase_40 | -- | - |
testcase_41 | -- | - |
testcase_42 | -- | - |
testcase_43 | -- | - |
testcase_44 | -- | - |
testcase_45 | -- | - |
testcase_46 | -- | - |
testcase_47 | -- | - |
testcase_48 | -- | - |
testcase_49 | -- | - |
testcase_50 | -- | - |
testcase_51 | -- | - |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class 1 | a[10],H,B,s,t,i,j; | ^ main.c:1:1: warning: type defaults to ‘int’ in declaration of ‘a’ [-Wimplicit-int] main.c:1:7: warning: type defaults to ‘int’ in declaration of ‘H’ [-Wimplicit-int] 1 | a[10],H,B,s,t,i,j; | ^ main.c:1:9: warning: type defaults to ‘int’ in declaration of ‘B’ [-Wimplicit-int] 1 | a[10],H,B,s,t,i,j; | ^ main.c:1:11: warning: type defaults to ‘int’ in declaration of ‘s’ [-Wimplicit-int] 1 | a[10],H,B,s,t,i,j; | ^ main.c:1:13: warning: type defaults to ‘int’ in declaration of ‘t’ [-Wimplicit-int] 1 | a[10],H,B,s,t,i,j; | ^ main.c:1:15: warning: type defaults to ‘int’ in declaration of ‘i’ [-Wimplicit-int] 1 | a[10],H,B,s,t,i,j; | ^ main.c:1:17: warning: type defaults to ‘int’ in declaration of ‘j’ [-Wimplicit-int] 1 | a[10],H,B,s,t,i,j; | ^ main.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int] 2 | main(){ | ^~~~ main.c: In function ‘main’: main.c:4:17: warning: implicit declaration of function ‘fflush’ [-Wimplicit-function-declaration] 4 | fflush(!printf("0 1 2 %d\n",i)); | ^~~~~~ main.c:4:25: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration] 4 | fflush(!printf("0 1 2 %d\n",i)); | ^~~~~~ main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ +++ |+#include <stdio.h> 1 | a[10],H,B,s,t,i,j; main.c:4:25: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] 4 | fflush(!printf("0 1 2 %d\n",i)); | ^~~~~~ main.c:4:25: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ main.c:
ソースコード
a[10],H,B,s,t,i,j; main(){ for(i=3;i<10;i++){ fflush(!printf("0 1 2 %d\n",i)); scanf("%d%d",&H,&B); a[i]=H+B; } for(i=4;i<10;i++)s|=(a[i]>a[3])<<i; if(s==0)for(s=8,i=4;i<10;i++)s|=(a[i]==a[3])<<i; for(i=s,t=1;i&=i-1;t++); if(t!=4){ for(i=4;i<10&&s&(1<<i);i++); for(j=i+1;j<10&&s&(1<<j);j++); printf("0 1 %d %d\n",i,j);scanf("%d%d",&H,&B);s|=(H+B<a[i])<<2; printf("0 %d 2 %d\n",i,j);scanf("%d%d",&H,&B);s|=(H+B<a[i])<<1; printf("%d 1 2 %d\n",i,j);scanf("%d%d",&H,&B);s|=(H+B<a[i]); } for(t=i=0;i<10;i++)if(s&(1<<i))a[t++]=i; printf("%d %d %d %d\n",a[0],a[1],a[2],a[3]);scanf("%d%*d",&H);if(H==4)exit(0); printf("%d %d %d %d\n",a[0],a[1],a[3],a[2]);scanf("%d%*d",&H);if(H==4)exit(0); printf("%d %d %d %d\n",a[0],a[2],a[1],a[3]);scanf("%d%*d",&H);if(H==4)exit(0); printf("%d %d %d %d\n",a[0],a[2],a[3],a[1]);scanf("%d%*d",&H);if(H==4)exit(0); printf("%d %d %d %d\n",a[0],a[3],a[1],a[2]);scanf("%d%*d",&H);if(H==4)exit(0); printf("%d %d %d %d\n",a[0],a[3],a[2],a[1]);scanf("%d%*d",&H);if(H==4)exit(0); printf("%d %d %d %d\n",a[1],a[0],a[2],a[3]);scanf("%d%*d",&H);if(H==4)exit(0); printf("%d %d %d %d\n",a[1],a[0],a[3],a[2]);scanf("%d%*d",&H);if(H==4)exit(0); printf("%d %d %d %d\n",a[1],a[2],a[0],a[3]);scanf("%d%*d",&H);if(H==4)exit(0); printf("%d %d %d %d\n",a[1],a[2],a[3],a[0]);scanf("%d%*d",&H);if(H==4)exit(0); printf("%d %d %d %d\n",a[1],a[3],a[0],a[2]);scanf("%d%*d",&H);if(H==4)exit(0); printf("%d %d %d %d\n",a[1],a[3],a[2],a[0]);scanf("%d%*d",&H);if(H==4)exit(0); printf("%d %d %d %d\n",a[2],a[0],a[1],a[3]);scanf("%d%*d",&H);if(H==4)exit(0); printf("%d %d %d %d\n",a[2],a[0],a[3],a[1]);scanf("%d%*d",&H);if(H==4)exit(0); printf("%d %d %d %d\n",a[2],a[1],a[0],a[2]);scanf("%d%*d",&H);if(H==4)exit(0); printf("%d %d %d %d\n",a[2],a[1],a[2],a[0]);scanf("%d%*d",&H);if(H==4)exit(0); printf("%d %d %d %d\n",a[2],a[3],a[0],a[1]);scanf("%d%*d",&H);if(H==4)exit(0); printf("%d %d %d %d\n",a[2],a[3],a[1],a[0]);scanf("%d%*d",&H);if(H==4)exit(0); printf("%d %d %d %d\n",a[3],a[0],a[1],a[2]);scanf("%d%*d",&H);if(H==4)exit(0); printf("%d %d %d %d\n",a[3],a[0],a[2],a[1]);scanf("%d%*d",&H);if(H==4)exit(0); printf("%d %d %d %d\n",a[3],a[1],a[0],a[2]);scanf("%d%*d",&H);if(H==4)exit(0); printf("%d %d %d %d\n",a[3],a[1],a[2],a[0]);scanf("%d%*d",&H);if(H==4)exit(0); printf("%d %d %d %d\n",a[3],a[2],a[0],a[1]);scanf("%d%*d",&H);if(H==4)exit(0); printf("%d %d %d %d\n",a[3],a[2],a[1],a[0]);scanf("%d%*d",&H);if(H==4)exit(0); }