結果
| 問題 |
No.670 log は定数
|
| コンテスト | |
| ユーザー |
sigma425
|
| 提出日時 | 2017-09-11 21:33:39 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 1,048 bytes |
| コンパイル時間 | 1,861 ms |
| コンパイル使用メモリ | 171,212 KB |
| 実行使用メモリ | 14,592 KB |
| 最終ジャッジ日時 | 2024-11-07 17:06:04 |
| 合計ジャッジ時間 | 12,263 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | TLE * 1 -- * 9 |
ソースコード
// naive
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
#define all(c) c.begin(),c.end()
#define pb push_back
#define fs first
#define sc second
#define show(x) cout << #x << " = " << x << endl
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)
using namespace std;
template<class S,class T> ostream& operator<<(ostream& o,const pair<S,T> &p){return o<<"("<<p.fs<<","<<p.sc<<")";}
template<class T> ostream& operator<<(ostream& o,const vector<T> &vc){o<<"sz = "<<vc.size()<<endl<<"[";for(const T& v:vc) o<<v<<",";o<<"]";return o;}
using ull = unsigned long long;
using ll = long long;
ull seed;
int next(){
seed = seed ^ (seed<<13);
seed = seed ^ (seed>>7);
seed = seed ^ (seed<<17);
return (seed>>33);
}
int main(){
int N,Q;
cin>>N>>Q>>seed;
rep(i,10000) next();
vector<int> a(N);
rep(i,N) a[i] = next();
sort(all(a));
ll res = 0;
rep(qt,Q){
int x = next();
int cnt = lower_bound(all(a),x) - a.begin();
res ^= ll(cnt)*qt;
}
cout<<res<<endl;
}
sigma425