Problem horses
User jeongwonho64
Submission Time 2023-12-10 21:51:56
Score 0
Max Time N/A
Max Memory N/A

Compile Error

horses.cpp: In member function ‘void node::upd(int, int, int)’:
horses.cpp:69:10: error: cannot convert ‘const std::pair<long double, int>’ to ‘int’ in assignment
69 | v = max(l->v,r->v);
| ~~~^~~~~~~~~~~
| |
| const std::pair<long double, int>
horses.cpp: In member function ‘std::pair<long double, int> node::qry(int, int)’:
horses.cpp:75:11: error: ‘val’ was not declared in this scope
75 | return val;
| ^~~
horses.cpp: In function ‘long long int qexp(long long int, long long int)’:
horses.cpp:112:24: error: ‘m’ was not declared in this scope
112 | ll half = qexp(a, b/2,m);
| ^
horses.cpp: In function ‘int init(int, int*, int*)’:
horses.cpp:131:9: error: ‘struct node’ has no member named ‘update’
131 | root->update(i,n-1,logX[i]);
| ^~~~~~
horses.cpp:137:9: error: ‘struct node’ has no memb