Submission #657790

#TimeUsernameProblemLanguageResultExecution timeMemory
657790coding_snorlaxRadio Towers (IOI22_towers)C++17
Compilation error
0 ms0 KiB
#include "towers.h" #include<bits/stdc++.h> using namespace std; int Max_place=0; int Now; vector<int> S; void init(int N,vector<int> H){ Now=H[0]; for(int i=1;i<N;i++){ if(H[i]>H[i-1]){ Max_place++; Now=H[i]; } } for(int i=0;i<N;i++){ S.push_back(H[i]); } } int max_towers(int L,int R,int D){ if(L<Max_place && Max_place<R){ if(S[L]+D<Now && S[R]+D<Now) return 1; } return 0

Compilation message (stderr)

towers.cpp: In function 'int max_towers(int, int, int)':
towers.cpp:23:13: error: expected ';' at end of input
   23 |     return 0
      |            ~^
      |             ;
towers.cpp:23:12: error: expected '}' at end of input
   23 |     return 0
      |            ^
towers.cpp:19:34: note: to match this '{'
   19 | int max_towers(int L,int R,int D){
      |                                  ^