Submission #626006

# Submission time Handle Problem Language Result Execution time Memory
626006 2022-08-11T06:17:52 Z I_love_Hoang_Yen Radio Towers (IOI22_towers) C++17
0 / 100
528 ms 1436 KB
#include "bits/stdc++.h"
using namespace std;

// sub 1 {{{
int k = -1;
std::vector<int> a;

void init(int n, std::vector<int> _a) {
    assert((int) _a.size() == n);
    a = _a;
    k = max_element(a.begin(), a.end()) - a.begin();
}

int max_towers(int l, int r, int d) {
    if (k < l || r < k) return 0;
    if (a[l] <= a[k] - d && a[r] <= a[k] - d) return 2;
    return 0;
}
// }}}
# Verdict Execution time Memory Grader output
1 Incorrect 257 ms 976 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 528 ms 1436 KB 1st lines differ - on the 1st token, expected: '11903', found: '2'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 279 ms 464 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 257 ms 976 KB 1st lines differ - on the 1st token, expected: '1', found: '0'
2 Halted 0 ms 0 KB -