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"
using namespace std;
#define sp <<" "
#define el <<"\n"
#define all(x) x.begin(), x.end()
#define pii pair<int,int>
#define pb push_back
int n;
int a,b;
int len;
void init(int N, int L, int X[])
{
len = L;
a = X[0]; b = X[1];
n = N;
}
int update(int i, int y)
{
if(i) a = y;
else b = y;
return (abs(a - b) > len ? 2 : 1);
}
# | 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... |