結果
問題 | No.439 チワワのなる木 |
ユーザー |
![]() |
提出日時 | 2017-01-31 19:22:06 |
言語 | C90 (gcc 12.3.0) |
結果 |
RE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 312 bytes |
コンパイル時間 | 191 ms |
コンパイル使用メモリ | 20,480 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-12-23 23:00:44 |
合計ジャッジ時間 | 4,938 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | RE * 28 |
コンパイルメッセージ
main.c:1:8: warning: data definition has no type or storage class 1 | long r;u,v,x,y;char*q;s[1<<18];typeof(s)t,g,h;d(p,o,z,i){int w=z=q[o-1]>99,c=!z,l=t[o];for(;i=h[l];l=g[l])if(i-p)d(o,i),r+=z*u*(y+~v),c+=u,w+=v;r+=z*(x-c)*(w-1);u=c;v=w;}f(a,b){g[++u]=t[a];h[t[a]=u]=b;}main(u){for(gets(gets(q=s));*q++>99?++y:++x,~scanf("%d%d",&u,&v);f(v,u))f(u,v);q=s;d(0,1);r=!printf("%ld",r);} | ^ main.c:1:8: warning: type defaults to ‘int’ in declaration of ‘u’ [-Wimplicit-int] main.c:1:10: warning: type defaults to ‘int’ in declaration of ‘v’ [-Wimplicit-int] 1 | long r;u,v,x,y;char*q;s[1<<18];typeof(s)t,g,h;d(p,o,z,i){int w=z=q[o-1]>99,c=!z,l=t[o];for(;i=h[l];l=g[l])if(i-p)d(o,i),r+=z*u*(y+~v),c+=u,w+=v;r+=z*(x-c)*(w-1);u=c;v=w;}f(a,b){g[++u]=t[a];h[t[a]=u]=b;}main(u){for(gets(gets(q=s));*q++>99?++y:++x,~scanf("%d%d",&u,&v);f(v,u))f(u,v);q=s;d(0,1);r=!printf("%ld",r);} | ^ main.c:1:12: warning: type defaults to ‘int’ in declaration of ‘x’ [-Wimplicit-int] 1 | long r;u,v,x,y;char*q;s[1<<18];typeof(s)t,g,h;d(p,o,z,i){int w=z=q[o-1]>99,c=!z,l=t[o];for(;i=h[l];l=g[l])if(i-p)d(o,i),r+=z*u*(y+~v),c+=u,w+=v;r+=z*(x-c)*(w-1);u=c;v=w;}f(a,b){g[++u]=t[a];h[t[a]=u]=b;}main(u){for(gets(gets(q=s));*q++>99?++y:++x,~scanf("%d%d",&u,&v);f(v,u))f(u,v);q=s;d(0,1);r=!printf("%ld",r);} | ^ main.c:1:14: warning: type defaults to ‘int’ in declaration of ‘y’ [-Wimplicit-int] 1 | long r;u,v,x,y;char*q;s[1<<18];typeof(s)t,g,h;d(p,o,z,i){int w=z=q[o-1]>99,c=!z,l=t[o];for(;i=h[l];l=g[l])if(i-p)d(o,i),r+=z*u*(y+~v),c+=u,w+=v;r+=z*(x-c)*(w-1);u=c;v=w;}f(a,b){g[++u]=t[a];h[t[a]=u]=b;}main(u){for(gets(gets(q=s));*q++>99?++y:++x,~scanf("%d%d",&u,&v);f(v,u))f(u,v);q=s;d(0,1);r=!printf("%ld",r);} | ^ main.c:1:23: warning: data definition has no type or storage class 1 | long r;u,v,x,y;char*q;s[1<<18];typeof(s)t,g,h;d(p,o,z,i){int w=z=q[o-1]>99,c=!z,l=t[o];for(;i=h[l];l=g[l])if(i-p)d(o,i),r+=z*u*(
ソースコード
long r;u,v,x,y;char*q;s[1<<18];typeof(s)t,g,h;d(p,o,z,i){int w=z=q[o-1]>99,c=!z,l=t[o];for(;i=h[l];l=g[l])if(i-p)d(o,i),r+=z*u*(y+~v),c+=u,w+=v;r+=z*(x-c)*(w-1);u=c;v=w;}f(a,b){g[++u]=t[a];h[t[a]=u]=b;}main(u){for(gets(gets(q=s));*q++>99?++y:++x,~scanf("%d%d",&u,&v);f(v,u))f(u,v);q=s;d(0,1);r=!printf("%ld",r);}