Submission #559354

# Submission time Handle Problem Language Result Execution time Memory
559354 2022-05-09T16:19:00 Z Mahmudul_Kabir Dancing Elephants (IOI11_elephants) C++14
0 / 100
1 ms 340 KB
#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
1 Incorrect 1 ms 340 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 340 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 340 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 340 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 340 KB Output isn't correct
2 Halted 0 ms 0 KB -