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_37840026_7056.cpp: In function 'bool dfs(long long int, long long int)':
0_0_37840026_7056.cpp:82:47: error: 'max' was not declared in this scope
         dp[x][0] += max(max(dp[i][0], dp[i][1]), dp[i][2]);
                                               ^
0_0_37840026_7056.cpp:82:47: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:64,
                 from 0_0_37840026_7056.cpp:29:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:3454:5: note:   'std::max'
     max(initializer_list<_Tp> __l, _Compare __comp)
     ^
0_0_37840026_7056.cpp:82:58: error: 'max' was not declared in this scope
         dp[x][0] += max(max(dp[i][0], dp[i][1]), dp[i][2]);
                                                          ^
0_0_37840026_7056.cpp:82:58: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:64,
                 from 0_0_37840026_7056.cpp:29:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:3454:5: note:   'std::max'
     max(initializer_list<_Tp> __l, _Compare __comp)
     ^
0_0_37840026_7056.cpp:82:58: error: redeclaration of '<typeprefixerror>max'
         dp[x][0] += max(max(dp[i][0], dp[i][1]), dp[i][2]);
                                                          ^
0_0_37840026_7056.cpp:82:47: note: previous declaration '<typeprefixerror>max'
         dp[x][0] += max(max(dp[i][0], dp[i][1]), dp[i][2]);
                                               ^
0_0_37840026_7056.cpp:90:65: error: 'max' was not declared in this scope
         dp[x][2] = max(dp[x][2], 1 + dp[i][1] + (res - dp[i][0]));
                                                                 ^
0_0_37840026_7056.cpp:90:65: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:64,
                 from 0_0_37840026_7056.cpp:29:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:3454:5: note:   'std::max'
     max(initializer_list<_Tp> __l, _Compare __comp)
     ^
0_0_37840026_7056.cpp: In function 'void Solve()':
0_0_37840026_7056.cpp:108:51: error: 'max' was not declared in this scope
     int ans = max(dp[1][0], max(dp[1][1], dp[1][2]));
                                                   ^
0_0_37840026_7056.cpp:108:51: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:64,
                 from 0_0_37840026_7056.cpp:29:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:3454:5: note:   'std::max'
     max(initializer_list<_Tp> __l, _Compare __comp)
     ^
0_0_37840026_7056.cpp:108:52: error: 'max' was not declared in this scope
     int ans = max(dp[1][0], max(dp[1][1], dp[1][2]));
                                                    ^
0_0_37840026_7056.cpp:108:52: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:64,
                 from 0_0_37840026_7056.cpp:29:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:3454:5: note:   'std::max'
     max(initializer_list<_Tp> __l, _Compare __comp)
     ^
0_0_37840026_7056.cpp:108:52: error: redeclaration of '<typeprefixerror>max'
     int ans = max(dp[1][0], max(dp[1][1], dp[1][2]));
                                                    ^
0_0_37840026_7056.cpp:108:51: note: previous declaration '<typeprefixerror>max'
     int ans = max(dp[1][0], max(dp[1][1], dp[1][2]));
                                                   ^


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-07-04 14:19:32, Gzip enabled