Submission #805290

# Submission time Handle Problem Language Result Execution time Memory
805290 2023-08-03T14:52:00 Z Halym2007 Rice Hub (IOI11_ricehub) C++11
0 / 100
1000 ms 1236 KB
#include <bits/stdc++.h>
using namespace std;
#define ll long long
map <int, int> m;
int besthub(int R, int L, int X[], ll B) {
	for (int i = 0; i < R; ++i) {
		m[X[i]] = 1;
	}
	int jog = 0, op, ans;
	for (int i = 0; i <= L; ++i) {
		op = ans = 0;
		for (int j = i; j <= L; ++j) {
			op++;
			if (op > B) break;
			if (m.find (j) != m.end ()) {
				ans++;	
			}	
		}
		jog = max (jog, ans);
	}
	return jog;
}
//int main() {
//	 freopen("kk.txt", "r", stdin);
//	int R, L;
//	ll B;
//	cin >> R >> L >> B;
//	int X[R];
//	for (int i = 0; i < R; ++i) {
//		cin >> X[i];
//	}
//	cout << besthub (R, L, X, B);
//}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 1 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 0 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 335 ms 296 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1070 ms 1236 KB Time limit exceeded
2 Halted 0 ms 0 KB -