Submission #631047

# Submission time Handle Problem Language Result Execution time Memory
631047 2022-08-17T15:26:08 Z rainboy Radio Towers (IOI22_towers) C++17
4 / 100
881 ms 1432 KB
#include "towers.h"
#include <vector>

using namespace std;

const int N = 100000;

typedef vector<int> vi;

int aa[N], i;

void init(int n, vi aa_) {
	for (i = 0; i < n; i++)
		aa[i] = aa_[i];
	i = 0;
	while (i < n - 1 && aa[i] < aa[i + 1])
		i++;
}

int max_towers(int l, int r, int d) {
	return l < i && i < r && aa[i] - aa[l] >= d && aa[i] - aa[r] >= d ? 2 : 1;
}
# Verdict Execution time Memory Grader output
1 Correct 227 ms 920 KB Output is correct
2 Correct 854 ms 1332 KB Output is correct
3 Correct 719 ms 1320 KB Output is correct
4 Correct 826 ms 1324 KB Output is correct
5 Correct 542 ms 1352 KB Output is correct
6 Correct 851 ms 1360 KB Output is correct
7 Correct 881 ms 1420 KB Output is correct
8 Correct 1 ms 208 KB Output is correct
9 Correct 1 ms 208 KB Output is correct
10 Correct 0 ms 208 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 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 212 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 581 ms 1432 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 269 ms 544 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 212 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 Correct 227 ms 920 KB Output is correct
2 Correct 854 ms 1332 KB Output is correct
3 Correct 719 ms 1320 KB Output is correct
4 Correct 826 ms 1324 KB Output is correct
5 Correct 542 ms 1352 KB Output is correct
6 Correct 851 ms 1360 KB Output is correct
7 Correct 881 ms 1420 KB Output is correct
8 Correct 1 ms 208 KB Output is correct
9 Correct 1 ms 208 KB Output is correct
10 Correct 0 ms 208 KB Output is correct
11 Incorrect 1 ms 212 KB 1st lines differ - on the 1st token, expected: '13', found: '1'
12 Halted 0 ms 0 KB -