Problem payraise
User jmuzhen
Submission Time 2025-12-15 16:36:55
Score 0
Max Time N/A
Max Memory N/A

Compile Error

payraise.cpp: In function ‘int main()’:
payraise.cpp:73:3: error: template placeholder type ‘Fenwick<...auto...>’ must be followed by a simple declarator-id
73 | Fenwick *root = new Fenwick(n);
| ^~~~~~~
payraise.cpp:14:8: note: ‘template<class T> struct Fenwick’ declared here
14 | struct Fenwick {
| ^~~~~~~
payraise.cpp:73:32: error: class template argument deduction failed:
73 | Fenwick *root = new Fenwick(n);
| ^
payraise.cpp:73:32: error: no matching function for call to ‘Fenwick(long long int&)’
payraise.cpp:16:5: note: candidate: ‘template<class T> Fenwick(long long int)-> Fenwick<T>’
16 | Fenwick(int n_=0) { init(n_); }
| ^~~~~~~
payraise.cpp:16:5: note: template argument deduction/substitution failed:
payraise.cpp:73:32: note: couldn’t deduce template parameter ‘T’
73 | Fenwick *root = new Fenwick(n);