/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'long long int getans(int)':
foo.cpp:17:5: error: reference to 'prev' is ambiguous
     prev[i]=prev[i-1];
     ^
foo.cpp:9:15: note: candidates are: long long int prev [200005]
 ll pret[maxn],prev[maxn];
               ^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algobase.h:66:0,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:61,
                 from foo.cpp:2:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_iterator_base_funcs.h:193:5: note:                 template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
     prev(_BidirectionalIterator __x, typename
     ^
foo.cpp:17:13: error: reference to 'prev' is ambiguous
     prev[i]=prev[i-1];
             ^
foo.cpp:9:15: note: candidates are: long long int prev [200005]
 ll pret[maxn],prev[maxn];
               ^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algobase.h:66:0,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:61,
                 from foo.cpp:2:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_iterator_base_funcs.h:193:5: note:                 template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
     prev(_BidirectionalIterator __x, typename
     ^
foo.cpp:19:17: error: reference to 'prev' is ambiguous
       pret[i]++,prev[i]+=v[i];
                 ^
foo.cpp:9:15: note: candidates are: long long int prev [200005]
 ll pret[maxn],prev[maxn];
               ^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algobase.h:66:0,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:61,
                 from foo.cpp:2:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_iterator_base_funcs.h:193:5: note:                 template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
     prev(_BidirectionalIterator __x, typename
     ^
foo.cpp:24:39: error: reference to 'prev' is ambiguous
     ret+=(pret[ed[i]]-pret[st[i]-1])*(prev[ed[i]]-prev[st[i]-1]);
                                       ^
foo.cpp:9:15: note: candidates are: long long int prev [200005]
 ll pret[maxn],prev[maxn];
               ^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algobase.h:66:0,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:61,
                 from foo.cpp:2:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_iterator_base_funcs.h:193:5: note:                 template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
     prev(_BidirectionalIterator __x, typename
     ^
foo.cpp:24:51: error: reference to 'prev' is ambiguous
     ret+=(pret[ed[i]]-pret[st[i]-1])*(prev[ed[i]]-prev[st[i]-1]);
                                                   ^
foo.cpp:9:15: note: candidates are: long long int prev [200005]
 ll pret[maxn],prev[maxn];
               ^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algobase.h:66:0,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:61,
                 from foo.cpp:2:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_iterator_base_funcs.h:193:5: note:                 template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
     prev(_BidirectionalIterator __x, typename
     ^
foo.cpp: In function 'int main()':
foo.cpp:31:28: warning: unknown conversion type character 'l' in format [-Wformat=]
   scanf("%d%d%lld",&n,&m,&S);
                            ^
foo.cpp:

信息

递交者
类型
递交
题目
P1740 聪明的质检员
语言
C++
递交时间
2015-10-18 11:45:48
评测时间
2015-10-18 11:45:50
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes