F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_18680305_874.cpp:92:43: error: 'typeof' was not declared in this scope
 typedef csl::sparse_table<int, typeof(func)> ST;
                                           ^
0_0_18680305_874.cpp:92:44: error: template argument 2 is invalid
 typedef csl::sparse_table<int, typeof(func)> ST;
                                            ^
0_0_18680305_874.cpp:92:48: error: invalid type in declaration before ';' token
 typedef csl::sparse_table<int, typeof(func)> ST;
                                                ^
0_0_18680305_874.cpp:93:11: error: invalid user-defined conversion from 'const<lambda(const int&, const int&)>' to 'ST {aka int}' [-fpermissive]
 ST st(func);
           ^
0_0_18680305_874.cpp:85:53: note: candidate is: <lambda(const int&, const int&)>::operator int (*)(const int&, const int&)() const <near match>
 const auto func = [](const int& a, const int& b) -> int {
                                                     ^
0_0_18680305_874.cpp:85:53: note:   no known conversion from 'int (*)(const int&, const int&)' to 'ST {aka int}'
0_0_18680305_874.cpp: In function 'int main()':
0_0_18680305_874.cpp:105:7: error: request for member 'clear' in 'st', which is of non-class type 'ST {aka int}'
    st.clear();
       ^
0_0_18680305_874.cpp:106:7: error: request for member 'build' in 'st', which is of non-class type 'ST {aka int}'
    st.build(a, n);
       ^
0_0_18680305_874.cpp:113:12: error: request for member 'query' in 'st', which is of non-class type 'ST {aka int}'
     x = st.query(l, r);
            ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2025 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.001000(s) query 1, Server time : 2025-02-17 07:03:16, Gzip enabled