Problem funnyhat
User wongyikai
Submission Time 2024-12-30 17:24:29
Score 0
Max Time N/A
Max Memory N/A

Compile Error

funnyhat.cpp: In function ‘int find_hat2(int, int, std::vector<int>&)’:
funnyhat.cpp:52:41: error: cannot convert ‘std::pair<long long int, long long int>’ to ‘ll’ {aka ‘long long int’} in assignment
52 | if (b+n-1>=x+1) ind = root->range_max(x+1,b+n-1);
| ~~~~~~~~~~~~~~~^~~~~~~~~~~
| |
| std::pair<long long int, long long int>
funnyhat.cpp: In function ‘int find_hat(int, std::vector<int>)’:
funnyhat.cpp:67:23: error: no matching function for call to ‘node::node(int, int&, ll [n])’
67 | root = new node(0,n,A);
| ^
funnyhat.cpp:11:5: note: candidate: ‘node::node(int, int, int*)’
11 | node (int _s, int _e, int A[] = NULL): s(_s), e(_e), mx({0,0}), l(NULL), r(NULL) {
| ^~~~
funnyhat.cpp:11:31: note: no known conversion for argument 3 from ‘ll [