結果
問題 |
No.670 log は定数
|
ユーザー |
![]() |
提出日時 | 2018-04-24 00:11:00 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 1,732 ms / 4,000 ms |
コード長 | 459 bytes |
コンパイル時間 | 2,144 ms |
コンパイル使用メモリ | 195,136 KB |
最終ジャッジ日時 | 2025-01-05 10:21:44 |
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
コンパイルメッセージ
main.cpp:9:1: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type] 9 | main(){ | ^~~~
ソースコード
#include<bits/stdc++.h> using namespace std; typedef unsigned long long ull; ull s; int X(){ return(((s^=s<<13)^=s>>7)^=s<<17)>>33; } int a[200000],b[1<<26]; main(){ int N,Q,d; cin>>N>>Q>>s; for(int i=0;i<10000;++i){ X(); } for(int i=0;i<N;++i){ ++b[((a[i]=X())>>5)+1]; } sort(a,a+N); for(int i=0;i<(1<<26)-1;++i){ b[i+1]+=b[i]; } ull z=0; for(ull i=0;i<Q;++i){ int x=X(); z^=(lower_bound(a+b[x>>5],a+b[(x>>5)+1],x)-a)*i; } cout<<z; }