Submission #607426

# Submission time Handle Problem Language Result Execution time Memory
607426 2022-07-26T17:08:48 Z gonzakia29 Dancing Elephants (IOI11_elephants) C++17
10 / 100
1 ms 340 KB
#include "elephants.h"
#include <bits/stdc++.h>
using namespace std;

int n;
long long l, mini, maxi;
vector <int> x;

void init(int N, int L, int X[]){
  n = N;
  l = L;
  mini = min(X[0],X[1]);
  maxi = max(X[0],X[1]);
  x.push_back(mini);
  x.push_back(maxi);
}

int update(int i, int y){
    x[i] = y;
    mini = min(x[0],x[1]);
    maxi = max(x[0],x[1]);
    return 1+(maxi-mini>l);
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 ms 212 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 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 ms 212 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 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 ms 212 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 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Incorrect 1 ms 340 KB Output isn't correct
5 Halted 0 ms 0 KB -