結果

問題 No.184 たのしい排他的論理和(HARD)
コンテスト
ユーザー 紙ぺーぱー
提出日時 2015-05-14 16:46:41
言語 C90(gcc12)
(gcc 12.4.0)
コンパイル:
gcc-12 -O2 -std=c90 -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
RE  
実行時間 -
コード長 135 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 120 ms
コンパイル使用メモリ 29,004 KB
最終ジャッジ日時 2026-02-23 18:22:59
ジャッジサーバーID
(参考情報)
judge4 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 3
other RE * 34
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:1:42: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch]
    1 | long long a[65],x,y;main(i){for(gets(i);~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){for(gets(i);~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:113: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
    1 | long long a[65],x,y;main(i){for(gets(i);~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:113: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
/usr/bin/ld: /tmp/ccV1Oycd.o: in function `main':
main.c:(.text.startup+0x20): 警告: the `gets' function is dangerous and should not be used.

ソースコード

diff #
raw source code

long long a[65],x,y;main(i){for(gets(i);~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