結果

問題 No.2977 Kth Xor Pair
ユーザー 👑 p-adic
提出日時 2024-11-25 20:20:23
言語 cLay
(20241019-1)
結果
AC  
実行時間 2,041 ms / 3,000 ms
コード長 159 bytes
コンパイル時間 2,013 ms
コンパイル使用メモリ 180,212 KB
実行使用メモリ 18,560 KB
最終ジャッジ日時 2024-11-30 23:58:35
合計ジャッジ時間 39,683 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 34
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:122:14: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’
  122 |     for(auto&[x,y]:h){
      |              ^

ソースコード

diff #

ll@N,@K,@A[N],a=0,c=0,s;rrep(d,30){a*=2;map<ll,ll>h;rep[A](x,N)++h[x>>d];s=0;for(auto&[x,y]:h)s+=a?h.count(x^a)?y*h[x^a]:0:y*y-y;(s=c+s/2)<K?a|=1,c=s:a;}wt(a);
0