Submission #625455

# Submission time Handle Problem Language Result Execution time Memory
625455 2022-08-10T12:05:13 Z model_code Radio Towers (IOI22_towers) C++17
4 / 100
1178 ms 1516 KB
// incorrect/solution-bitonic.cpp
#include "towers.h"

#include <bits/stdc++.h>
using namespace std;

int N;
vector<int> H;
int peak_index;

void init(int _N, std::vector<int> _H) {
  N = _N;
  H = _H;
  peak_index = N - 1;
  for (int i = 0; i < N - 1; ++i) {
    if (H[i] > H[i + 1]) {
      peak_index = i;
      break;
    }
  }
}

int max_towers(int L, int R, int D) {
  if (L <= peak_index && peak_index <= R) {
    return 1 + (max(H[L], H[R]) <= (H[peak_index] - D) ? 1 : 0);
  }
  return 1;
}
# Verdict Execution time Memory Grader output
1 Correct 525 ms 920 KB Output is correct
2 Correct 1093 ms 1456 KB Output is correct
3 Correct 1074 ms 1448 KB Output is correct
4 Correct 1063 ms 1492 KB Output is correct
5 Correct 1178 ms 1488 KB Output is correct
6 Correct 1032 ms 1516 KB Output is correct
7 Correct 719 ms 1440 KB Output is correct
8 Correct 1 ms 208 KB Output is correct
9 Correct 1 ms 256 KB Output is correct
10 Correct 1 ms 208 KB Output is correct
# 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 862 ms 1440 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 306 ms 560 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 Correct 525 ms 920 KB Output is correct
2 Correct 1093 ms 1456 KB Output is correct
3 Correct 1074 ms 1448 KB Output is correct
4 Correct 1063 ms 1492 KB Output is correct
5 Correct 1178 ms 1488 KB Output is correct
6 Correct 1032 ms 1516 KB Output is correct
7 Correct 719 ms 1440 KB Output is correct
8 Correct 1 ms 208 KB Output is correct
9 Correct 1 ms 256 KB Output is correct
10 Correct 1 ms 208 KB Output is correct
11 Incorrect 1 ms 208 KB 1st lines differ - on the 1st token, expected: '13', found: '1'
12 Halted 0 ms 0 KB -