# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
886295 | boris_mihov | Simple game (IZhO17_game) | C++17 | 50 ms | 6984 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 <algorithm>
#include <iostream>
#include <numeric>
#include <cassert>
#include <bitset>
#include <vector>
typedef long long llong;
const int MAXN = 100000 + 10;
const int MAXT = 1000000 + 10;
int n, q;
struct Fenwick
{
int tree[MAXT];
void update(int pos, int val)
{
for (int idx = pos ; idx < MAXT ; idx += idx & (-idx))
{
tree[idx] += val;
}
}
int query(int t)
{
int res = 0;
for (int idx = t ; idx > 0 ; idx -= idx & (-idx))
{
res += tree[idx];
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |