Submission #1015614

# Submission time Handle Problem Language Result Execution time Memory
1015614 2024-07-06T15:22:31 Z nomen_nescio Radio Towers (IOI22_towers) C++17
0 / 100
403 ms 1368 KB
#include "towers.h"

#include <vector>


int iMaxi = 0, maxi = 0;
std::vector<int> hauteurs;
void init(int N, std::vector<int> H)
{
  for (int i = 0; i < N; i++)
  {
    if(H[i] >= maxi)
    {
      iMaxi = i;
      maxi = H[i];
    }
  }
  hauteurs = H;
}

int max_towers(int L, int R, int D)
{
  if (L < iMaxi && R > iMaxi && maxi - D >= hauteurs[L] && maxi - D >= hauteurs[R])
  {
    return 2;
  }
  return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 217 ms 1112 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 344 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 344 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 403 ms 1368 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 138 ms 848 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 344 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 217 ms 1112 KB 1st lines differ - on the 1st token, expected: '1', found: '0'
2 Halted 0 ms 0 KB -