結果

問題 No.184 たのしい排他的論理和(HARD)
コンテスト
ユーザー 紙ぺーぱー
提出日時 2015-05-14 16:22:42
言語 C(gnu17)
(gcc 15.2.0)
コンパイル:
gcc-15 -O2 -std=gnu17 -Wno-error=implicit-function-declaration -Wno-error=implicit-int -Wno-error=incompatible-pointer-types -Wno-error=int-conversion -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
AC  
実行時間 50 ms / 5,000 ms
コード長 137 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 277 ms
コンパイル使用メモリ 38,292 KB
最終ジャッジ日時 2026-02-23 18:22:50
ジャッジサーバーID
(参考情報)
judge5 / judge5
純コード判定しない問題か言語
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 34
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:1:21: warning: return type defaults to 'int' [-Wimplicit-int]
    1 | long long a[65],x,y;main(i){gets(&i);while(~scanf("%lld",&x))for(i=0;x=x>>i&1?!a[i]&&++y|(a[i]=x)?0:a[i]^x:x;i++);printf("%lld",1ll<<y);}
      |                     ^~~~
main.c: In function 'main':
main.c:1:21: warning: type of 'i' defaults to 'int' [-Wimplicit-int]
main.c:1:29: warning: implicit declaration of function 'gets' [-Wimplicit-function-declaration]
    1 | long long a[65],x,y;main(i){gets(&i);while(~scanf("%lld",&x))for(i=0;x=x>>i&1?!a[i]&&++y|(a[i]=x)?0:a[i]^x:x;i++);printf("%lld",1ll<<y);}
      |                             ^~~~
main.c:1:45: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | long long a[65],x,y;main(i){gets(&i);while(~scanf("%lld",&x))for(i=0;x=x>>i&1?!a[i]&&++y|(a[i]=x)?0:a[i]^x:x;i++);printf("%lld",1ll<<y);}
      |                                             ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | long long a[65],x,y;main(i){gets(&i);while(~scanf("%lld",&x))for(i=0;x=x>>i&1?!a[i]&&++y|(a[i]=x)?0:a[i]^x:x;i++);printf("%lld",1ll<<y);}
main.c:1:45: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | long long a[65],x,y;main(i){gets(&i);while(~scanf("%lld",&x))for(i=0;x=x>>i&1?!a[i]&&++y|(a[i]=x)?0:a[i]^x:x;i++);printf("%lld",1ll<<y);}
      |                                             ^~~~~
main.c:1:45: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:115: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | long long a[65],x,y;main(i){gets(&i);while(~scanf("%lld",&x))for(i=0;x=x>>i&1?!a[i]&&++y|(a[i]=x)?0:a[i]^x:x;i++);printf("%lld",1ll<<y);}
      |                                                                                                                   ^~~~~~
main.c:1:115: note: include '<stdio.h>' or provide a 

ソースコード

diff #
raw source code

long long a[65],x,y;main(i){gets(&i);while(~scanf("%lld",&x))for(i=0;x=x>>i&1?!a[i]&&++y|(a[i]=x)?0:a[i]^x:x;i++);printf("%lld",1ll<<y);}
0