# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
875487 | Youssif_Elkadi | Volontiranje (COCI21_volontiranje) | C++17 | 108 ms | 4188 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;
const int N = 1e3 + 5;
pair<int, int> tree[N * 4];
int arr[N];
int vis[N];
int p[N];
int n;
void build(int node = 1, int l = 1, int r = n)
{
if (l == r)
{
tree[node] = {0, 0};
return;
}
int mid = (l + r) / 2;
build(node * 2, l, mid), build(node * 2 + 1, mid + 1, r);
tree[node] = {0, 0};
}
pair<int, int> comb(pair<int, int> x, pair<int, int> y)
{
if (x.first == y.first)
return (x.second > y.second ? y : x);
return (x.first < y.first ? y : x);
}
void update(int idx, int val, int node = 1, int l = 1, int r = n)
{
if (l == r)
{
tree[node] = {val, 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... |