# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1174951 | Clan328 | Arranging Shoes (IOI19_shoes) | C++17 | 75 ms | 16812 KiB |
#include "shoes.h"
#include <bits/stdc++.h>
using namespace std;
struct SegmentTree {
vector<int> t;
SegmentTree(int n) {
t = vector<int>(4*n);
}
void update(int v, int tl, int tr, int pos, int x) {
if (tl == tr) {
t[v] = x;
} else {
int tm = (tl+tr)/2;
if (pos <= tm)
update(2*v, tl, tm, pos, x);
else
update(2*v+1, tm+1, tr, pos, x);
t[v] = (t[2*v] + t[2*v+1]);
}
}
int get(int v, int tl, int tr, int l, int r) {
if (l > r) return 0;
else if (tl == l && r == tr) return t[v];
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |