# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
938426 | Mohammadamin__Sh | Fortune Telling 2 (JOI14_fortune_telling2) | C++17 | 1723 ms | 45496 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
//In His Name
#include <bits/stdc++.h>
//#pragma GCC optimize("O3,unroll-loops")
//#pragma GCC target("avx2")
using namespace std;
#define ll long long
//#define int ll
typedef pair<int, int> pii;
#define F first
#define S second
#define pb push_back
#define bug(x) cout << "Ah shit , here we go again : " << x <<endl
#define all(x) x.begin() , x.end()
const int maxn = 2e5 , MOD = 1e9 + 7;
const ll INF = 1e18 + 100;
int n , k , q[maxn];
ll ans;
pii c[maxn];
vector<int> tree[4*maxn];
void Build(int id = 1, int L = 1 , int R = k+1){
if(L+1 == R){
tree[id].pb(q[L]);
return;
}
int mid = (L+R) >> 1 , lc = id << 1 , rc = lc | 1;
Build(lc , L , mid) , Build(rc , mid , R);
for(int i : tree[lc]) tree[id].pb(i);
for(int i : tree[rc]) tree[id].pb(i);
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |