# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
635149 | kawaii | 즐거운 채소 기르기 (JOI14_growing) | C++17 | 15 ms | 9508 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.
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define fi first
#define se second
int t, n, m, k, ans = 1e18, a[1000005], pfx[1000005], sfx[1000005], tree[1000005], mod = 1e9 + 7;
set<int> s;
map<int, int> mp;
mt19937_64 rng;
int mul(int x, int y){
if(y == 0) return 1;
int ans = mul(x, y / 2);
if(y % 2 == 0) return (ans * ans) % mod;
else return (((ans * ans) % mod) * x) % mod;
}
void update(int x, int y){
while(x){
tree[x] += y; x -= (x & -x);
}
}
int get(int x){
int res = 0;
while(x <= n){
res += tree[x]; x += (x & -x);
}
return res;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |