結果

問題 No.670 log は定数
ユーザー %20%20
提出日時 2018-03-24 00:08:47
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 401 bytes
コンパイル時間 2,610 ms
コンパイル使用メモリ 200,700 KB
実行使用メモリ 12,692 KB
最終ジャッジ日時 2023-09-07 05:42:53
合計ジャッジ時間 12,859 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 -- -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:12:1: 警告: ISO C++ では型の無い ‘main’ の宣言を禁止しています [-Wreturn-type]
   12 | main(){
      | ^~~~

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
ull seed;
int next(){
	seed^=seed<<13;
	seed^=seed>>7;
	seed^=seed<<17;
	return seed>>33;
}
int a[200000];
main(){
	int N,Q;
	cin>>N>>Q>>seed;
	for(int i=0;i<10000;++i){
		next();
	}
	for(int i=0;i<N;++i){
		a[i]=next();
	}
	sort(a,a+N);
	ull z=0;
	for(ull i=0;i<Q;++i){
		z^=(lower_bound(a,a+N,next())-a)*i;
	}
	cout<<z;
}
0