Problem supermarket
User purpleblackferret
Submission Time 2024-01-09 22:34:57
Score 0
Max Time N/A
Max Memory N/A

Compile Error

supermarket.cpp: In function ‘int32_t main()’:
supermarket.cpp:108:15: error: non-type template parameters of class type only available with ‘-std=c++2a’ or ‘-std=gnu++2a’
108 | segtree<node> sub(D);
| ^
supermarket.cpp:108:15: error: non-type template parameters of class type only available with ‘-std=c++2a’ or ‘-std=gnu++2a’
supermarket.cpp:108:21: error: cannot convert ‘std::vector<long long int>’ to ‘int’ in initialization
108 | segtree<node> sub(D);
| ^
| |
| std::vector<long long int>
supermarket.cpp:115:26: error: request for member ‘query’ in ‘sub’, which is of non-class type ‘int’
115 | ans = max(ans, sub.query(l, r + 1).mxsum);
| ^~~~~