Submission #629542

# Submission time Handle Problem Language Result Execution time Memory
629542 2022-08-14T15:22:58 Z DarkMatter Radio Towers (IOI22_towers) C++17
0 / 100
663 ms 1440 KB
#include<bits/stdc++.h>
#include "towers.h"
#include <vector>
using namespace std;
int idx = -1;
vector<int>v;
void init(int N, std::vector<int> H) {
	for (int i = 1; i < N - 1; i++)
		if (H[i] > H[i - 1] && H[i] > H[i + 1])
			idx = i;
	v = H;
}
int max_towers(int L, int R, int D) {
	if (R <= idx || L >= idx)
		return 0;
	if (v[idx] - v[L] < D || v[idx] - v[R] < D)
		return 0;
	return 2;
}
# Verdict Execution time Memory Grader output
1 Incorrect 312 ms 920 KB 1st lines differ - on the 1st token, expected: '1', found: '0'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 208 KB 1st lines differ - on the 1st token, expected: '13', found: '0'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 208 KB 1st lines differ - on the 1st token, expected: '13', found: '0'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 663 ms 1440 KB 1st lines differ - on the 1st token, expected: '11903', found: '0'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 172 ms 552 KB 1st lines differ - on the 1st token, expected: '7197', found: '2'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 208 KB 1st lines differ - on the 1st token, expected: '13', found: '0'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 312 ms 920 KB 1st lines differ - on the 1st token, expected: '1', found: '0'
2 Halted 0 ms 0 KB -