# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
471283 | prvocislo | Constellation 3 (JOI20_constellation3) | C++17 | 380 ms | 29112 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 <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
typedef long long ll;
using namespace std;
const int maxn = 1 << 18;
ll tree[maxn * 2];
void range_add(int l, int r, ll d)
{
for (l += maxn, r += maxn+1; l < r; l >>= 1, r >>= 1)
{
if (l & 1) tree[l++] += d;
if (r & 1) tree[--r] += d;
}
}
ll query(int i)
{
ll ans = 0;
for (i += maxn; i > 0; i >>= 1) ans += tree[i];
return ans;
}
struct star { int x, y, c; };
bool cmp(const star& a, const star& b) { return (a.y < b.y || (a.y == b.y && a.x < b.x)); }
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |