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_38941475_27090.cpp: In function 'void SuffixArray::BuildSA(std::string)':
0_0_38941475_27090.cpp:23:17: error: 'function' was not declared in this scope
   23 |                 function<bool(int , int , int)> Comp = [&](int x , int y , int w) {
      |                 ^~~~~~~~
0_0_38941475_27090.cpp:17:1: note: 'std::function' is defined in header '<functional>'; did you forget to '#include <functional>'?
   16 | #include <numeric>
  +++ |+#include <functional>
   17 | using namespace std;
0_0_38941475_27090.cpp:23:46: error: expression list treated as compound expression in functional cast [-fpermissive]
   23 |                 function<bool(int , int , int)> Comp = [&](int x , int y , int w) {
      |                                              ^
0_0_38941475_27090.cpp:23:26: error: expected primary-expression before 'bool'
   23 |                 function<bool(int , int , int)> Comp = [&](int x , int y , int w) {
      |                          ^~~~
0_0_38941475_27090.cpp:59:45: error: 'Comp' was not declared in this scope
   59 |                                 rk[sa[i]] = Comp(sa[i], sa[i - 1], w) ? p : ++p;
      |                                             ^~~~


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-28 19:40:58, Gzip enabled