# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
671687 | Hacv16 | Dancing Elephants (IOI11_elephants) | C++17 | 0 ms | 0 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 "elephants.h"
#include<bits/stdc++.h>
typedef long long ll;
const int MAX = 2e6 + 15;
int n, l, x[MAX], ans;
void init(int n_, int l_, int x_[]){
n = n_, l = l_;
for(int i = 0; i < n; i++)
x[i] = x_[i];
return;
}
int update(int i, int y){
x[i] = y;
if(abs(x[0] - x[1]) > L) ans = 1;
else ans = 2;
return ans;
}