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_38358506_146.cpp: In function 'void init()':
0_0_38358506_146.cpp:34:10: error: request for member 'push_back' in 'state', which is of non-class type 'std::vector<int>()'
    state.push_back(s); 
          ^
0_0_38358506_146.cpp: In function 'int solve()':
0_0_38358506_146.cpp:39:22: error: request for member 'size' in 'state', which is of non-class type 'std::vector<int>()'
  for(int x=0;x<state.size();x++){
                      ^
0_0_38358506_146.cpp:40:29: error: invalid conversion from 'std::vector<int> (*)()' to 'int' [-fpermissive]
   dp[0][x]+=getsum(0,state[x]);
                             ^
0_0_38358506_146.cpp:18:5: note: initializing argument 2 of 'int getsum(int, int)'
 int getsum(int i,int x){
     ^
0_0_38358506_146.cpp:40:11: error: assignment of read-only location '*(dp + ((sizetype)x))'
   dp[0][x]+=getsum(0,state[x]);
           ^
0_0_38358506_146.cpp:40:11: error: cannot convert 'std::vector<std::vector<int> > (*)()' to 'std::vector<std::vector<int> >()' in assignment
0_0_38358506_146.cpp:43:23: error: request for member 'size' in 'state', which is of non-class type 'std::vector<int>()'
   for(int x=0;x<state.size();x++){
                       ^
0_0_38358506_146.cpp:44:24: error: request for member 'size' in 'state', which is of non-class type 'std::vector<int>()'
    for(int k=0;k<state.size();k++){
                        ^
0_0_38358506_146.cpp:45:32: error: invalid operands of types 'std::vector<int>()' and 'std::vector<int>()' to binary 'operator&'
        if( ( state[x] & state[k] ) == 0 ){
                                ^
0_0_38358506_146.cpp:46:14: error: assignment of read-only location '*(dp + (((sizetype)i) + ((sizetype)x)))'
      dp[i][x]=max(dp[i-1][k],dp[i][x]);
              ^
0_0_38358506_146.cpp:46:14: error: cannot convert 'std::vector<std::vector<int> >()' to 'std::vector<std::vector<int> >()' in assignment
0_0_38358506_146.cpp:49:30: error: invalid conversion from 'std::vector<int> (*)()' to 'int' [-fpermissive]
    dp[i][x]+=getsum(i,state[x]);
                              ^
0_0_38358506_146.cpp:18:5: note: initializing argument 2 of 'int getsum(int, int)'
 int getsum(int i,int x){
     ^
0_0_38358506_146.cpp:49:12: error: assignment of read-only location '*(dp + (((sizetype)i) + ((sizetype)x)))'
    dp[i][x]+=getsum(i,state[x]);
            ^
0_0_38358506_146.cpp:49:12: error: cannot convert 'std::vector<std::vector<int> > (*)()' to 'std::vector<std::vector<int> >()' in assignment
0_0_38358506_146.cpp:53:22: error: request for member 'size' in 'state', which is of non-class type 'std::vector<int>()'
  for(int x=0;x<state.size();x++){
                      ^
0_0_38358506_146.cpp:54:25: error: no matching function for call to 'max(std::vector<std::vector<int> > (&)(), int&)'
   res=max(dp[n-1][x],res);
                         ^
0_0_38358506_146.cpp:54:25: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ostream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:39,
                 from 0_0_38358506_146.cpp:10:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:217:5: note: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)
     max(const _Tp& __a, const _Tp& __b)
     ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:217:5: note:   template argument deduction/substitution failed:
0_0_38358506_146.cpp:54:25: note:   deduced conflicting types for parameter 'const _Tp' ('std::vector<std::vector<int> >()' and 'int')
   res=max(dp[n-1][x],res);
                         ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ostream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:39,
                 from 0_0_38358506_146.cpp:10:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:261:5: note: template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:261:5: note:   template argument deduction/substitution failed:
0_0_38358506_146.cpp:54:25: note:   deduced conflicting types for parameter 'const _Tp' ('std::vector<std::vector<int> >()' and 'int')
   res=max(dp[n-1][x],res);
                         ^
0_0_38358506_146.cpp: In function 'int main()':
0_0_38358506_146.cpp:60:9: error: request for member 'clear' in 'state', which is of non-class type 'std::vector<int>()'
   state.clear();
         ^
0_0_38358506_146.cpp:68:5: error: assignment of function 'std::vector<std::vector<int> > dp()'
   dp=vector<vector<int>>(25,vector<int>(1<<20));
     ^
0_0_38358506_146.cpp:68:5: error: cannot convert 'std::vector<std::vector<int> >' to 'std::vector<std::vector<int> >()' in assignment


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 04:07:28, Gzip enabled