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_17076148_1647.cpp:28:26: error: 'round' does not name a type
   bool operator() (const round & lhs, const round &rhs) const
                          ^
0_0_17076148_1647.cpp:28:45: error: 'round' does not name a type
   bool operator() (const round & lhs, const round &rhs) const
                                             ^
0_0_17076148_1647.cpp: In member function 'bool mycomparison::operator()(const int&, const int&) const':
0_0_17076148_1647.cpp:30:30: error: request for member 'v' in 'lhs', which is of non-class type 'const int'
     if (reverse) return (lhs.v>rhs.v);
                              ^
0_0_17076148_1647.cpp:30:36: error: request for member 'v' in 'rhs', which is of non-class type 'const int'
     if (reverse) return (lhs.v>rhs.v);
                                    ^
0_0_17076148_1647.cpp:31:22: error: request for member 'v' in 'lhs', which is of non-class type 'const int'
     else return (lhs.v<rhs.v);
                      ^
0_0_17076148_1647.cpp:31:28: error: request for member 'v' in 'rhs', which is of non-class type 'const int'
     else return (lhs.v<rhs.v);
                            ^
0_0_17076148_1647.cpp: In function 'int main()':
0_0_17076148_1647.cpp:46:45: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp, class _Alloc> class std::vector'
         priority_queue < round, vector<round>, mycomparison> q_round;
                                             ^
0_0_17076148_1647.cpp:46:45: error:   expected a type, got 'std::round'
0_0_17076148_1647.cpp:46:45: error: template argument 2 is invalid
0_0_17076148_1647.cpp:46:60: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp, class _Sequence, class _Compare> class std::priority_queue'
         priority_queue < round, vector<round>, mycomparison> q_round;
                                                            ^
0_0_17076148_1647.cpp:46:60: error:   expected a type, got 'std::round'
0_0_17076148_1647.cpp:46:60: error: template argument 2 is invalid
0_0_17076148_1647.cpp:46:69: error: invalid type in declaration before ';' token
         priority_queue < round, vector<round>, mycomparison> q_round;
                                                                     ^
0_0_17076148_1647.cpp:57:21: error: request for member 'push' in 'q_round', which is of non-class type 'int'
             q_round.push(round(l,r,v));
                     ^
0_0_17076148_1647.cpp:57:37: error: no matching function for call to 'round(int&, int&, int&)'
             q_round.push(round(l,r,v));
                                     ^
0_0_17076148_1647.cpp:57:37: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:44:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/random:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:66,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62,
                 from 0_0_17076148_1647.cpp:3:
GCC4.9.2/x86_64-w64-mingw32/include/math.h:874:25: note: double round(double)
   extern double __cdecl round (double);
                         ^
GCC4.9.2/x86_64-w64-mingw32/include/math.h:874:25: note:   candidate expects 1 argument, 3 provided
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/random:38:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:66,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62,
                 from 0_0_17076148_1647.cpp:3:
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:1620:5: note: template<class _Tp> constexpr typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type std::round(_Tp)
     round(_Tp __x)
     ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:1620:5: note:   template argument deduction/substitution failed:
0_0_17076148_1647.cpp:57:37: note:   candidate expects 1 argument, 3 provided
             q_round.push(round(l,r,v));
                                     ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/random:38:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:66,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62,
                 from 0_0_17076148_1647.cpp:3:
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:1614:3: note: constexpr long double std::round(long double)
   round(long double __x)
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:1614:3: note:   candidate expects 1 argument, 3 provided
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:1610:3: note: constexpr float std::round(float)
   round(float __x)
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:1610:3: note:   candidate expects 1 argument, 3 provided
0_0_17076148_1647.cpp:88:24: error: request for member 'empty' in 'q_round', which is of non-class type 'int'
         while(!q_round.empty())
                        ^
0_0_17076148_1647.cpp:90:19: error: 'round' does not name a type
             const round &ro = q_round.top();
                   ^
0_0_17076148_1647.cpp:91:17: error: 'ro' was not declared in this scope
             l = ro.l;
                 ^
0_0_17076148_1647.cpp:106:21: error: request for member 'pop' in 'q_round', which is of non-class type 'int'
             q_round.pop();
                     ^


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-23 01:48:53, Gzip enabled