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_28715236_24588.cpp: In function 'void initial()':
0_0_28715236_24588.cpp:16:26: error: 'memset' was not declared in this scope
  memset(cnt,0,sizeof(cnt));
                          ^
0_0_28715236_24588.cpp:20:5: error: reference to 'next' is ambiguous
     next[i][cnt[i]++] = j;
     ^
0_0_28715236_24588.cpp:10:5: note: candidates are: int next [2048][2048]
 int next[N][N], cnt[N], dp[M][N], val[M][N];
     ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:66:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39,
                 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_28715236_24588.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator_base_funcs.h:184:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^
0_0_28715236_24588.cpp: In function 'void operDp()':
0_0_28715236_24588.cpp:27:26: error: 'memset' was not declared in this scope
  memset(val,0,sizeof(val));
                          ^
0_0_28715236_24588.cpp:59:11: error: reference to 'next' is ambiguous
     dp[i][next[j][k]] = max ( dp[i][next[j][k]], dp[i-1][j] + val[i][next[j][k]] );
           ^
0_0_28715236_24588.cpp:10:5: note: candidates are: int next [2048][2048]
 int next[N][N], cnt[N], dp[M][N], val[M][N];
     ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:66:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39,
                 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_28715236_24588.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator_base_funcs.h:184:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^
0_0_28715236_24588.cpp:59:37: error: reference to 'next' is ambiguous
     dp[i][next[j][k]] = max ( dp[i][next[j][k]], dp[i-1][j] + val[i][next[j][k]] );
                                     ^
0_0_28715236_24588.cpp:8:19: note: in definition of macro 'max'
 #define max(a,b) (a>b?a:b)
                   ^
0_0_28715236_24588.cpp:10:5: note: candidates are: int next [2048][2048]
 int next[N][N], cnt[N], dp[M][N], val[M][N];
     ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:66:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39,
                 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_28715236_24588.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator_base_funcs.h:184:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^
0_0_28715236_24588.cpp:59:70: error: reference to 'next' is ambiguous
     dp[i][next[j][k]] = max ( dp[i][next[j][k]], dp[i-1][j] + val[i][next[j][k]] );
                                                                      ^
0_0_28715236_24588.cpp:8:21: note: in definition of macro 'max'
 #define max(a,b) (a>b?a:b)
                     ^
0_0_28715236_24588.cpp:10:5: note: candidates are: int next [2048][2048]
 int next[N][N], cnt[N], dp[M][N], val[M][N];
     ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:66:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39,
                 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_28715236_24588.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator_base_funcs.h:184:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^
0_0_28715236_24588.cpp:59:37: error: reference to 'next' is ambiguous
     dp[i][next[j][k]] = max ( dp[i][next[j][k]], dp[i-1][j] + val[i][next[j][k]] );
                                     ^
0_0_28715236_24588.cpp:8:23: note: in definition of macro 'max'
 #define max(a,b) (a>b?a:b)
                       ^
0_0_28715236_24588.cpp:10:5: note: candidates are: int next [2048][2048]
 int next[N][N], cnt[N], dp[M][N], val[M][N];
     ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:66:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39,
                 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_28715236_24588.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator_base_funcs.h:184:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^
0_0_28715236_24588.cpp:59:70: error: reference to 'next' is ambiguous
     dp[i][next[j][k]] = max ( dp[i][next[j][k]], dp[i-1][j] + val[i][next[j][k]] );
                                                                      ^
0_0_28715236_24588.cpp:8:25: note: in definition of macro 'max'
 #define max(a,b) (a>b?a:b)
                         ^
0_0_28715236_24588.cpp:10:5: note: candidates are: int next [2048][2048]
 int next[N][N], cnt[N], dp[M][N], val[M][N];
     ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:66:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39,
                 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_28715236_24588.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator_base_funcs.h:184:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^


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-25 01:56:29, Gzip enabled