Submission #29106

# Submission time Handle Problem Language Result Execution time Memory
29106 2017-07-18T09:13:47 Z Nikefor Dancing Elephants (IOI11_elephants) C++
10 / 100
83 ms 16740 KB
#include "elephants.h"
#include<cmath>
//int n;
//bool s1 = false;
int p[3];
int l;
void init(int N, int L, int X[])
{
  //if(N==2) s1= true;
  p[0] = X[0];
  p[1] = X[1];
  //n = N;
  l = L;
}

int update(int i, int y)
{
  p[i] = y;
  if( (p[0]-p[1]) <=l and (p[0]-p[1]) >=-l ) return 1;
  return 2;
  //return n;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 16740 KB Output is correct
2 Correct 0 ms 16740 KB Output is correct
3 Correct 0 ms 16740 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 16740 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 16 ms 16740 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 26 ms 16740 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 83 ms 16740 KB Output isn't correct
2 Halted 0 ms 0 KB -