Submission #740467

# Submission time Handle Problem Language Result Execution time Memory
740467 2023-05-12T14:02:43 Z alex_2008 Radio Towers (IOI22_towers) C++17
0 / 100
625 ms 1056 KB
#include "towers.h"
#include <iostream>
#include <vector>
#include <cmath>
using namespace std;
int ind = -1;
vector <int> h;
void init(int n, vector<int> a) {
	for (int i = 0; i < n - 1; ++i)
	{
		if (a[i] > a[i+1]) {
			ind = i;
			break;
		}
	}
}
int max_towers(int L, int R, int D) {
	if (R < ind || L > ind) return 1;
	if (h[ind] >= (max(h[L], h[R]) + D)) return 2;
	return 1;
}
# Verdict Execution time Memory Grader output
1 Runtime error 8 ms 816 KB Execution killed with signal 11
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 625 ms 1056 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 Runtime error 4 ms 720 KB Execution killed with signal 11
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 Runtime error 8 ms 816 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -