結果

問題 No.439 チワワのなる木
ユーザー tailstails
提出日時 2017-01-31 12:07:50
言語 C90
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 328 bytes
コンパイル時間 234 ms
コンパイル使用メモリ 23,980 KB
実行使用メモリ 5,328 KB
最終ジャッジ日時 2023-08-25 13:56:58
合計ジャッジ時間 1,961 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 1 ms
4,376 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 20 ms
4,380 KB
testcase_25 AC 19 ms
4,376 KB
testcase_26 WA -
testcase_27 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:1:8: warning: data definition has no type or storage class
 long r;j,n,u,v,x,y;char*q;s[200020];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+=!!p*z*(x-c)*(w-1);u=c;v=w;}f(a,b){g[++j]=t[a];h[t[a]=j]=b;}main(a,b){for(scanf("%d%s",&n,q=s);*q++-99?++y:++x,~scanf("%d%d",&a,&b);f(b,a))f(a,b);q=s;d(1j);r=!printf("%ld",r);}
        ^
main.c:1:8: warning: type defaults to ‘int’ in declaration of ‘j’ [-Wimplicit-int]
main.c:1:10: warning: type defaults to ‘int’ in declaration of ‘n’ [-Wimplicit-int]
 long r;j,n,u,v,x,y;char*q;s[200020];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+=!!p*z*(x-c)*(w-1);u=c;v=w;}f(a,b){g[++j]=t[a];h[t[a]=j]=b;}main(a,b){for(scanf("%d%s",&n,q=s);*q++-99?++y:++x,~scanf("%d%d",&a,&b);f(b,a))f(a,b);q=s;d(1j);r=!printf("%ld",r);}
          ^
main.c:1:12: warning: type defaults to ‘int’ in declaration of ‘u’ [-Wimplicit-int]
 long r;j,n,u,v,x,y;char*q;s[200020];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+=!!p*z*(x-c)*(w-1);u=c;v=w;}f(a,b){g[++j]=t[a];h[t[a]=j]=b;}main(a,b){for(scanf("%d%s",&n,q=s);*q++-99?++y:++x,~scanf("%d%d",&a,&b);f(b,a))f(a,b);q=s;d(1j);r=!printf("%ld",r);}
            ^
main.c:1:14: warning: type defaults to ‘int’ in declaration of ‘v’ [-Wimplicit-int]
 long r;j,n,u,v,x,y;char*q;s[200020];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+=!!p*z*(x-c)*(w-1);u=c;v=w;}f(a,b){g[++j]=t[a];h[t[a]=j]=b;}main(a,b){for(scanf("%d%s",&n,q=s);*q++-99?++y:++x,~scanf("%d%d",&a,&b);f(b,a))f(a,b);q=s;d(1j);r=!printf("%ld",r);}
              ^
main.c:1:16: warning: type defaults to ‘int’ in declaration of ‘x’ [-Wimplicit-int]
 long r;j,n,u,v,x,y;char*q;s[200020];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[

ソースコード

diff #

long r;j,n,u,v,x,y;char*q;s[200020];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+=!!p*z*(x-c)*(w-1);u=c;v=w;}f(a,b){g[++j]=t[a];h[t[a]=j]=b;}main(a,b){for(scanf("%d%s",&n,q=s);*q++-99?++y:++x,~scanf("%d%d",&a,&b);f(b,a))f(a,b);q=s;d(1j);r=!printf("%ld",r);}
0