Problem lampposts
User LCJLY
Submission Time 2023-01-02 19:09:32
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lampposts.cpp: In function ‘void find_lampposts(int, int, int*)’:
lampposts.cpp:4:2: error: ‘memset’ was not declared in this scope
4 | memset(memo,-1,sizeof(memo));
| ^~~~~~
lampposts.cpp:1:1: note: ‘memset’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
+++ |+#include <cstring>
1 | void find_lampposts(int L, int N, int X[]){
lampposts.cpp:18:10: error: ‘nearest_lamppost’ was not declared in this scope
18 | hold=nearest_lamppost(mid);
| ^~~~~~~~~~~~~~~~
lampposts.cpp:23:10: error: ‘max’ was not declared in this scope
23 | best=max(best,mid);
| ^~~