結果
| 問題 |
No.670 log は定数
|
| コンテスト | |
| ユーザー |
yosupot
|
| 提出日時 | 2017-09-10 03:41:39 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 1,091 bytes |
| コンパイル時間 | 1,370 ms |
| コンパイル使用メモリ | 113,396 KB |
| 実行使用メモリ | 10,912 KB |
| 最終ジャッジ日時 | 2024-11-07 12:43:36 |
| 合計ジャッジ時間 | 11,550 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | TLE * 1 -- * 9 |
ソースコード
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cassert>
#include <algorithm>
#include <numeric>
#include <random>
#include <vector>
#include <array>
#include <bitset>
#include <queue>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
using namespace std;
using uint = unsigned int;
using ll = long long;
using ull = unsigned long long;
constexpr ll TEN(int n) { return (n==0) ? 1 : 10*TEN(n-1); }
template<class T> using V = vector<T>;
template<class T> using VV = V<V<T>>;
ull seed;
int next() {
seed = seed ^ (seed << 13);
seed = seed ^ (seed >> 7);
seed = seed ^ (seed << 17);
return (seed >> 33);
}
int main() {
int n; uint q;
cin >> n >> q >> seed;
for (int i = 0; i < 10000; i++) next();
V<int> a(n);
for (int i = 0; i < n; i++) a[i] = next();
sort(begin(a), end(a));
ll sm = 0;
for (uint i = 0; i < q; i++) {
int x = next();
sm ^= (lower_bound(begin(a), end(a), x) - begin(a)) * i;
}
cout << sm << endl;
return 0;
}
yosupot