結果
| 問題 | 
                            No.670 log は定数
                             | 
                    
| コンテスト | |
| ユーザー | 
                             %20
                         | 
                    
| 提出日時 | 2018-04-24 00:33:21 | 
| 言語 | C++17  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 1,423 ms / 4,000 ms | 
| コード長 | 459 bytes | 
| コンパイル時間 | 2,719 ms | 
| コンパイル使用メモリ | 196,460 KB | 
| 最終ジャッジ日時 | 2025-01-05 10:22:03 | 
| 
                            ジャッジサーバー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<<23];
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())>>8)+1];
	}
	sort(a,a+N);
	for(int i=0;i<(1<<23)-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>>8],a+b[(x>>8)+1],x)-a)*i;
	}
	cout<<z;
}
            
            
            
        
            
%20