Submission #823735

# Submission time Handle Problem Language Result Execution time Memory
823735 2023-08-13T03:42:04 Z boyliguanhan Radio Towers (IOI22_towers) C++17
0 / 100
387 ms 1084 KB
#include "towers.h"
#include <bits/stdc++.h>
using namespace std;
int n, pre[200100], cnt[200100];
void init(int N, vector<int> H) {
  	for(int i = 1; i < n-1; i++)
		pre[i]=pre[i-1]+(H[i]>max(H[i-1],H[i+1]));
	pre[n-1] = pre[n-2];
}
int max_towers(int L, int R, int D) {
	if(R-L<2)
		return 1;
	return pre[R-1]-pre[L]+1;
}
# Verdict Execution time Memory Grader output
1 Incorrect 241 ms 720 KB 12th lines differ - on the 1st token, expected: '2', found: '1'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB 1st lines differ - on the 1st token, expected: '13', found: '1'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB 1st lines differ - on the 1st token, expected: '13', found: '1'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 387 ms 1084 KB 1st lines differ - on the 1st token, expected: '11903', found: '1'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 211 ms 464 KB 1st lines differ - on the 1st token, expected: '7197', found: '1'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB 1st lines differ - on the 1st token, expected: '13', found: '1'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 241 ms 720 KB 12th lines differ - on the 1st token, expected: '2', found: '1'
2 Halted 0 ms 0 KB -