Submission #380309

# Submission time Handle Problem Language Result Execution time Memory
380309 2021-03-21T01:06:10 Z MilosMilutinovic Dancing Elephants (IOI11_elephants) C++14
0 / 100
1 ms 364 KB
#include <bits/stdc++.h>
using namespace std;

const int mxN=1.5e5;
int n, l, a[mxN], b[mxN];

int update(int j, int y) {
	a[j]=y;
	for(int i=0; i<n; ++i)
		b[i]=a[i];
	sort(b,b+n);
	int ans=1, l=0;
	for(int i=0; i<n; ++i) {
		if(b[i]-b[l]>l)
			l=i, ++ans;
	}
	return ans;
}

void init(int N, int L, int* X) {
	n=N, l=N;
	for(int i=0; i<n; ++i)
		a[i]=X[i];
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -