# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1157316 | InvMOD | Dancing Elephants (IOI11_elephants) | C++20 | 0 ms | 0 KiB |
#include<bits/stdc++.h>
#define all(v) (v).begin(), (v).end()
using namespace std;
const int N = 2e5 + 5;
int n, len, a[N];
void init(int N, int L, vector<int> X)
{
for(int i = 0; i < N; i++){
a[i + 1] = X[i];
}
n = N, len = L;
return;
}
int update(int ii, int y){
a[ii + 1] = y;
vector<int> pos(n + 1);
for(int i = 1; i <= n; i++)
pos[i] = a[i];
sort(1 + all(pos));