| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1345825 | SabaKharebava | Dancing Elephants (IOI11_elephants) | C++20 | 9089 ms | 1556 KiB |
#include<bits/stdc++.h>
using namespace std;
int n, l, x[150001];
set<int> st;
void init(int N, int L, int X[]) {
n = N;
l = L;
for (int i = 0; i < n; i++) {
st.insert(X[i]);
x[i] = X[i];
}
}
int update(int i, int y) {
st.erase(x[i]);
x[i] = y;
st.insert(y);
auto it = st.begin();
int cnt = 0;
while (true) {
cnt++;
auto next = upper_bound(it, st.end(), (int)(*it) + l);
if (next == st.end())
break;
it = next;
}
return cnt;
}
| # | 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... | ||||
