Submission #671689

# Submission time Handle Problem Language Result Execution time Memory
671689 2022-12-13T14:44:42 Z Hacv16 Dancing Elephants (IOI11_elephants) C++17
10 / 100
1 ms 340 KB
#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];
}

int update(int i, int y){
  x[i] = y;
  return 1 + (abs(x[0] - x[1]) > l);
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 340 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 1 ms 340 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 340 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 1 ms 340 KB Output is correct
4 Incorrect 1 ms 340 KB Output isn't correct
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 340 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 1 ms 340 KB Output is correct
4 Incorrect 1 ms 340 KB Output isn't correct
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 340 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 1 ms 340 KB Output is correct
4 Incorrect 1 ms 340 KB Output isn't correct
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 340 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 1 ms 340 KB Output is correct
4 Incorrect 1 ms 340 KB Output isn't correct
5 Halted 0 ms 0 KB -