Submission #686385

# Submission time Handle Problem Language Result Execution time Memory
686385 2023-01-25T08:45:16 Z pere_gil Radio Towers (IOI22_towers) C++17
0 / 100
12 ms 1352 KB
#include "towers.h"
#include "bits/stdc++.h"
using namespace std;

int n,k;
vector<int> h;

void init(int N, vector<int> H) {
	n=N; h=H;
	for(int i=1;i<n-1;i++)
		if(h[i-1]<h[i] && h[i]<h[i+1]) k=i;
}

int max_towers(int l, int r, int d){
	if(l<k && k<r) printf("2\n");
	else if(l==r) printf("1\n");
	else printf("0\n");
	
	return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 8 ms 936 KB Possible tampering with the output or unexpected termination of the program
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB Possible tampering with the output or unexpected termination of the program
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB Possible tampering with the output or unexpected termination of the program
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 12 ms 1352 KB Possible tampering with the output or unexpected termination of the program
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 464 KB Possible tampering with the output or unexpected termination of the program
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB Possible tampering with the output or unexpected termination of the program
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 8 ms 936 KB Possible tampering with the output or unexpected termination of the program
2 Halted 0 ms 0 KB -