Submission #12609


ソースコード

ステータス

項目 データ
問題 0010 - クッキー
ユーザー名 kotatsugame
投稿日時 2017-02-04 02:33:06
言語 C
状態 Compile Error
得点 0
ソースコード長 374 Byte
最大実行時間 -
最大メモリ使用量

コンパイルメッセージ

./Main.c:2:1: warning: data definition has no type or storage class
 d[11][11],s,p[2049][11],M=1<<28,i,j,k,a,t;main(n){for(scanf("%d%*d%d",&n,&s);i++<1<<n;)f(j)d[i][j]=p[i][j]=M;for(p[1<<s-1][s]=0;~scanf("%d%d%d",&i,&j,&k);)d[i][j]=d[j][i]=k;f(k)f(i)f(j)d[i][j]=(a=d[i][j])<(t=d[i][k]+d[k][j])?a:tfor(i=1;i<1<<n;i++)f(j)f(k)p[i|1<<k-1][k]=(a=p[i|1<<k-1][k])<(t=p[i][j]+d[j][k])?a:t;printf("%d\n",p[(1<<n)-1][s]);}
 ^
./Main.c:2:1: warning: type defaults to ‘int’ in declaration of ‘d’ [-Wimplicit-int]
./Main.c:2:11: warning: type defaults to ‘int’ in declaration of ‘s’ [-Wimplicit-int]
 d[11][11],s,p[2049][11],M=1<<28,i,j,k,a,t;main(n){for(scanf("%d%*d%d",&n,&s);i++<1<<n;)f(j)d[i][j]=p[i][j]=M;for(p[1<<s-1][s]=0;~scanf("%d%d%d",&i,&j,&k);)d[i][j]=d[j][i]=k;f(k)f(i)f(j)d[i][j]=(a=d[i][j])<(t=d[i][k]+d[k][j])?a:tfor(i=1;i<1<<n;i++)f(j)f(k)p[i|1<<k-1][k]=(a=p[i|1<<k-1][k])<(t=p[i][j]+d[j][k])?a:t;printf("%d\n",p[(1<<n)-1][s]);}
           ^
./Main.c:2:13: warning: type defaults to ‘int’ in declaration of ‘p’ [-Wimplicit-int]
 d[11][11],s,p[2049][11],M=1<<28,i,j,k,a,t;main(n){for(scanf("%d%*d%d",&n,&s);i++<1<<n;)f(j)d[i][j]=p[i][j]=M;for(p[1<<s-1][s]=0;~scanf("%d%d%d",&i,&j,&k);)d[i][j]=d[j][i]=k;f(k)f(i)f(j)d[i][j]=(a=d[i][j])<(t=d[i][k]+d[k][j])?a:tfor(i=1;i<1<<n;i++)f(j)f(k)p[i|1<<k-1][k]=(a=p[i|1<<k-1][k])<(t=p[i][j]+d[j][k])?a:t;printf("%d\n",p[(1<<n)-1][s]);}
             ^
./Main.c:2:25: warning: type defaults to ‘int’ in declaration of ‘M’ [-Wimplicit-int]
 d[11][11],s,p[2049][11],M=1<<28,i,j,k,a,t;main(n){for(scanf("%d%*d%d",&n,&s);i++<1<<n;)f(j)d[i][j]=p[i][j]=M;for(p[1<<s-1][s]=0;~scanf("%d%d%d",&i,&j,&k);)d[i][j]=d[j][i]=k;f(k)f(i)f(j)d[i][j]=(a=d[i][j])<(t=d[i][k]+d[k][j])?a:tfor(i=1;i<1<<n;i++)f(j)f(k)p[i|1<<k-1][k]=(a=p[i|1<<k-1][k])<(t=p[i][j]+d[j][k])?a:t;printf("%d\n",p[(1<<n)-1][s]);}
                         ^
./Main.c:2:33: warning: type defaults to ‘int’ in declaration of ‘i’ [-Wimplicit-int]
 d[11][11],s,p[2049][11],M=1<<28,i,j,k,a,t;main(n){for(scanf("%d%*d%d",&n,&s);i++<1<<n;)f(j)d[i][j]=p[i][j]=M;for(p[1<<s-1][s]=0;~scanf("%d%d%d",&i,&j,&k);)d[i][j]=d[j][i]=k;f(k)f(i)f(j)d[i][j]=(a=d[i][j])<(t=d[i][k]+d[k][j])?a:tfor(i=1;i<1<<n;i++)f(j)f(k)p[i|1<<k-1][k]=(a=p[i|1<<k-1][k])<(t=p[i][j]+d[j][k])?a:t;printf("%d\n",p[(1<<n)-1][s]);}
                                 ^
./Main.c:2:35: warning: type defaults to ‘int’ in declaration of ‘j’ [-Wimplicit-int]
 d[11][11],s,p[2049][11],M=1<<28,i,j,k,a,t;main(n){for(scanf("%d%*d%d",&n,&s);i++<1<<n;)f(j)d[i][j]=p[i][j]=M;for(p[1<<s-1][s]=0;~scanf("%d%d%d",&i,&j,&k);)d[i][j]=d[j][i]=k;f(k)f(i)f(j)d[i][j]=(a=d[i][j])<(t=d[i][k]+d[k][j])?a:tfor(i=1;i<1<<n;i++)f(j)f(k)p[i|1<<k-1][k]=(a=p[i|1<<k-1][k])<(t=p[i][j]+d[j][k])?a:t;printf("%d\n",p[(1<<n)-1][s]);}
                                   ^
./Main.c:2:37: warning: type defaults to ‘int’ in declaration of ‘k’ [-Wimplicit-int]
 d[11][11],s,p[2049][11],M=1<<28,i,j,k,a,t;main(n){for(scanf("%d%*d%d",&n,&s);i++<1<<n;)f(j)d[i][j]=p[i][j]=M;for(p[1<<s-1][s]=0;~scanf("%d%d%d",&i,&j,&k);)d[i][j]=d[j][i]=k;f(k)f(i)f(j)d[i][j]=(a=d[i][j])<(t=d[i][k]+d[k][j])?a:tfor(i=1;i<1<<n;i++)f(j)f(k)p[i|1<<k-1][k]=(a=p[i|1<<k-1][k])<(t=p[i][j]+d[j][k])?a:t;printf("%d\n",p[(1<<n)-1][s]);}
                                     ^
./Main.c:2:39: warning: type defaults to ‘int’ in declaration of ‘a’ [-Wimplicit-int]
 d[11][11],s,p[2049][11],M=1<<28,i,j,k,a,t;main(n){for(scanf("%d%*d%d",&n,&s);i++<1<<n;)f(j)d[i][j]=p[i][j]=M;for(p[1<<s-1][s]=0;~scanf("%d%d%d",&i,&j,&k);)d[i][j]=d[j][i]=k;f(k)f(i)f(j)d[i][j]=(a=d[i][j])<(t=d[i][k]+d[k][j])?a:tfor(i=1;i<1<<n;i++)f(j)f(k)p[i|1<<k-1][k]=(a=p[i|1<<k-1][k])<(t=p[i][j]+d[j][k])?a:t;printf("%d\n",p[(1<<n)-1][s]);}
                                       ^
./Main.c:2:41: warning: type defaults to ‘int’ in declaration of ‘t’ [-Wimplicit-int]
 d[11][11],s,p[2049][11],M=1<<28,i,j,k,a,t;main(n){for(scanf("%d%*d%d",&n,&s);i++<1<<n;)f(j)d[i][j]=p[i][j]=M;for(p[1<<s-1][s]=0;~scanf("%d%d%d",&i,&j,&k);)d[i][j]=d[j][i]=k;f(k)f(i)f(j)d[i][j]=(a=d[i][j])<(t=d[i][k]+d[k][j])?a:tfor(i=1;i<1<<n;i++)f(j)f(k)p[i|1<<k-1][k]=(a=p[i|1<<k-1][k])<(t=p[i][j]+d[j][k])?a:t;printf("%d\n",p[(1<<n)-1][s]);}
                                         ^
./Main.c:2:43: warning: return type defaults to ‘int’ [-Wimplicit-int]
 d[11][11],s,p[2049][11],M=1<<28,i,j,k,a,t;main(n){for(scanf("%d%*d%d",&n,&s);i++<1<<n;)f(j)d[i][j]=p[i][j]=M;for(p[1<<s-1][s]=0;~scanf("%d%d%d",&i,&j,&k);)d[i][j]=d[j][i]=k;f(k)f(i)f(j)d[i][j]=(a=d[i][j])<(t=d[i][k]+d[k][j])?a:tfor(i=1;i<1<<n;i++)f(j)f(k)p[i|1<<k-1][k]=(a=p[i|1<<k-1][k])<(t=p[i][j]+d[j][k])?a:t;printf("%d\n",p[(1<<n)-1][s]);}
                                           ^
./Main.c: In function ‘main’:
./Main.c:2:43: warning: type of ‘n’ defaults to ‘int’ [-Wimplicit-int]
./Main.c:2:55: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration]
 d[11][11],s,p[2049][11],M=1<<28,i,j,k,a,t;main(n){for(scanf("%d%*d%d",&n,&s);i++<1<<n;)f(j)d[i][j]=p[i][j]=M;for(p[1<<s-1][s]=0;~scanf("%d%d%d",&i,&j,&k);)d[i][j]=d[j][i]=k;f(k)f(i)f(j)d[i][j]=(a=d[i][j])<(t=d[i][k]+d[k][j])?a:tfor(i=1;i<1<<n;i++)f(j)f(k)p[i|1<<k-1][k]=(a=p[i|1<<k-1][k])<(t=p[i][j]+d[j][k])?a:t;printf("%d\n",p[(1<<n)-1][s]);}
                                                       ^
./Main.c:2:55: warning: incompatible implicit declaration of built-in function ‘scanf’
./Main.c:2:55: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
./Main.c:2:130: warning: incompatible implicit declaration of built-in function ‘scanf’
 d[11][11],s,p[2049][11],M=1<<28,i,j,k,a,t;main(n){for(scanf("%d%*d%d",&n,&s);i++<1<<n;)f(j)d[i][j]=p[i][j]=M;for(p[1<<s-1][s]=0;~scanf("%d%d%d",&i,&j,&k);)d[i][j]=d[j][i]=k;f(k)f(i)f(j)d[i][j]=(a=d[i][j])<(t=d[i][k]+d[k][j])?a:tfor(i=1;i<1<<n;i++)f(j)f(k)p[i|1<<k-1][k]=(a=p[i|1<<k-1][k])<(t=p[i][j]+d[j][k])?a:t;printf("%d\n",p[(1<<n)-1][s]);}
                                                                                                                                  ^
./Main.c:2:130: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
./Main.c:2:228: warning: implicit declaration of function ‘tfor’ [-Wimplicit-function-declaration]
 d[11][11],s,p[2049][11],M=1<<28,i,j,k,a,t;main(n){for(scanf("%d%*d%d",&n,&s);i++<1<<n;)f(j)d[i][j]=p[i][j]=M;for(p[1<<s-1][s]=0;~scanf("%d%d%d",&i,&j,&k);)d[i][j]=d[j][i]=k;f(k)f(i)f(j)d[i][j]=(a=d[i][j])<(t=d[i][k]+d[k][j])?a:tfor(i=1;i<1<<n;i++)f(j)f(k)p[i|1<<k-1][k]=(a=p[i|1<<k-1][k])<(t=p[i][j]+d[j][k])?a:t;printf("%d\n",p[(1<<n)-1][s]);}
                                                                                                                                                                                                                                    ^
./Main.c:2:236: error: expected ‘)’ before ‘;’ token
 d[11][11],s,p[2049][11],M=1<<28,i,j,k,a,t;main(n){for(scanf("%d%*d%d",&n,&s);i++<1<<n;)f(j)d[i][j]=p[i][j]=M;for(p[1<<s-1][s]=0;~scanf("%d%d%d",&i,&j,&k);)d[i][j]=d[j][i]=k;f(k)f(i)f(j)d[i][j]=(a=d[i][j])<(t=d[i][k]+d[k][j])?a:tfor(i=1;i<1<<n;i++)f(j)f(k)p[i|1<<k-1][k]=(a=p[i|1<<k-1][k])<(t=p[i][j]+d[j][k])?a:t;printf("%d\n",p[(1<<n)-1][s]);}
                                                                                                                                                                                                                                            ^
./Main.c:1:14: error: expected ‘;’ before ‘for’
 #define f(a) for(a=0;a++<n;)
              ^
./Main.c:2:248: note: in expansion of macro ‘f’
 d[11][11],s,p[2049][11],M=1<<28,i,j,k,a,t;main(n){for(scanf("%d%*d%d",&n,&s);i++<1<<n;)f(j)d[i][j]=p[i][j]=M;for(p[1<<s-1][s]=0;~scanf("%d%d%d",&i,&j,&k);)d[i][j]=d[j][i]=k;f(k)f(i)f(j)d[i][j]=(a=d[i][j])<(t=d[i][k]+d[k][j])?a:tfor(i=1;i<1<<n;i++)f(j)f(k)p[i|1<<k-1][k]=(a=p[i|1<<k-1][k])<(t=p[i][j]+d[j][k])?a:t;printf("%d\n",p[(1<<n)-1][s]);}
                                                                                                                                                                                                                                                        ^
./Main.c:2:314: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
 d[11][11],s,p[2049][11],M=1<<28,i,j,k,a,t;main(n){for(scanf("%d%*d%d",&n,&s);i++<1<<n;)f(j)d[i][j]=p[i][j]=M;for(p[1<<s-1][s]=0;~scanf("%d%d%d",&i,&j,&k);)d[i][j]=d[j][i]=k;f(k)f(i)f(j)d[i][j]=(a=d[i][j])<(t=d[i][k]+d[k][j])?a:tfor(i=1;i<1<<n;i++)f(j)f(k)p[i|1<<k-1][k]=(a=p[i|1<<k-1][k])<(t=p[i][j]+d[j][k])?a:t;printf("%d\n",p[(1<<n)-1][s]);}
                                                                                                                                                                                                                                                                                                                          ^
./Main.c:2:314: warning: incompatible implicit declaration of built-in function ‘printf’
./Main.c:2:314: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’

セット

セット 得点 Cases

テストケース

ファイル名 状態 実行時間 メモリ使用量 #