結果

問題 No.3 ビットすごろく
ユーザー 👑 testestest
提出日時 2016-04-05 00:33:45
言語 C90
(gcc 12.3.0)
結果
AC  
実行時間 270 ms / 5,000 ms
コード長 181 bytes
コンパイル時間 140 ms
コンパイル使用メモリ 20,480 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-01 07:48:36
合計ジャッジ時間 5,033 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 33
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:1:3: warning: multi-character character constant [-Wmultichar]
    1 | a['~~'],*p=a,s=2e3,n,k;main(j){for(*a=scanf("%d",&n);!(k&=k-1)?j=!*p||(!p[j]|p[j]>*p?p[j]=1+*p:0,!p[-j]|p[-j]>*p?p[-j]=1+*p:1),++p-a>n?p=a,s--:(k=p-a):++j;);n=!printf("%d",a[n]-1);}
      |   ^~~~
main.c:1:1: warning: data definition has no type or storage class
    1 | a['~~'],*p=a,s=2e3,n,k;main(j){for(*a=scanf("%d",&n);!(k&=k-1)?j=!*p||(!p[j]|p[j]>*p?p[j]=1+*p:0,!p[-j]|p[-j]>*p?p[-j]=1+*p:1),++p-a>n?p=a,s--:(k=p-a):++j;);n=!printf("%d",a[n]-1);}
      | ^
main.c:1:1: warning: type defaults to ‘int’ in declaration of ‘a’ [-Wimplicit-int]
main.c:1:10: warning: type defaults to ‘int’ in declaration of ‘p’ [-Wimplicit-int]
    1 | a['~~'],*p=a,s=2e3,n,k;main(j){for(*a=scanf("%d",&n);!(k&=k-1)?j=!*p||(!p[j]|p[j]>*p?p[j]=1+*p:0,!p[-j]|p[-j]>*p?p[-j]=1+*p:1),++p-a>n?p=a,s--:(k=p-a):++j;);n=!printf("%d",a[n]-1);}
      |          ^
main.c:1:14: warning: type defaults to ‘int’ in declaration of ‘s’ [-Wimplicit-int]
    1 | a['~~'],*p=a,s=2e3,n,k;main(j){for(*a=scanf("%d",&n);!(k&=k-1)?j=!*p||(!p[j]|p[j]>*p?p[j]=1+*p:0,!p[-j]|p[-j]>*p?p[-j]=1+*p:1),++p-a>n?p=a,s--:(k=p-a):++j;);n=!printf("%d",a[n]-1);}
      |              ^
main.c:1:20: warning: type defaults to ‘int’ in declaration of ‘n’ [-Wimplicit-int]
    1 | a['~~'],*p=a,s=2e3,n,k;main(j){for(*a=scanf("%d",&n);!(k&=k-1)?j=!*p||(!p[j]|p[j]>*p?p[j]=1+*p:0,!p[-j]|p[-j]>*p?p[-j]=1+*p:1),++p-a>n?p=a,s--:(k=p-a):++j;);n=!printf("%d",a[n]-1);}
      |                    ^
main.c:1:22: warning: type defaults to ‘int’ in declaration of ‘k’ [-Wimplicit-int]
    1 | a['~~'],*p=a,s=2e3,n,k;main(j){for(*a=scanf("%d",&n);!(k&=k-1)?j=!*p||(!p[j]|p[j]>*p?p[j]=1+*p:0,!p[-j]|p[-j]>*p?p[-j]=1+*p:1),++p-a>n?p=a,s--:(k=p-a):++j;);n=!printf("%d",a[n]-1);}
      |                      ^
main.c:1:24: warning: return type defaults to ‘int’ [-Wimplicit-int]
    1 | a['~~'],*p=a,s=2e3,n,k;main(j){for(*a=scanf("%d",&n);!(k&

ソースコード

diff #

a['~~'],*p=a,s=2e3,n,k;main(j){for(*a=scanf("%d",&n);!(k&=k-1)?j=!*p||(!p[j]|p[j]>*p?p[j]=1+*p:0,!p[-j]|p[-j]>*p?p[-j]=1+*p:1),++p-a>n?p=a,s--:(k=p-a):++j;);n=!printf("%d",a[n]-1);}
0