/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'void pushdown(int)':
foo.cpp:20:5: error: reference to 'minus' is ambiguous
  if(minus[t]) {
     ^
foo.cpp:9:31: note: candidates are: int minus [4000400]
 int num[maxn], tr[maxn << 2], minus[maxn << 2];
                               ^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\string:48:0,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\random:41,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:65,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:62,
                 from foo.cpp:3:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_function.h:149:12: note:                 template<class _Tp> struct std::minus
     struct minus : public binary_function<_Tp, _Tp, _Tp>
            ^
foo.cpp:21:15: error: reference to 'minus' is ambiguous
   tr[lson] -= minus[t], tr[rson] -= minus[t];
               ^
foo.cpp:9:31: note: candidates are: int minus [4000400]
 int num[maxn], tr[maxn << 2], minus[maxn << 2];
                               ^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\string:48:0,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\random:41,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:65,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:62,
                 from foo.cpp:3:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_function.h:149:12: note:                 template<class _Tp> struct std::minus
     struct minus : public binary_function<_Tp, _Tp, _Tp>
            ^
foo.cpp:21:37: error: reference to 'minus' is ambiguous
   tr[lson] -= minus[t], tr[rson] -= minus[t];
                                     ^
foo.cpp:9:31: note: candidates are: int minus [4000400]
 int num[maxn], tr[maxn << 2], minus[maxn << 2];
                               ^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\string:48:0,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\random:41,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:65,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:62,
                 from foo.cpp:3:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_function.h:149:12: note:                 template<class _Tp> struct std::minus
     struct minus : public binary_function<_Tp, _Tp, _Tp>
            ^
foo.cpp:22:3: error: reference to 'minus' is ambiguous
   minus[lson] += minus[t], minus[rson] += minus[t];
   ^
foo.cpp:9:31: note: candidates are: int minus [4000400]
 int num[maxn], tr[maxn << 2], minus[maxn << 2];
                               ^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\string:48:0,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\random:41,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:65,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:62,
                 from foo.cpp:3:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_function.h:149:12: note:                 template<class _Tp> struct std::minus
     struct minus : public binary_function<_Tp, _Tp, _Tp>
            ^
foo.cpp:22:18: error: reference to 'minus' is ambiguous
   minus[lson] += minus[t], minus[rson] += minus[t];
                  ^
foo.cpp:9:31: note: candidates are: int minus [4000400]
 int num[maxn], tr[maxn << 2], minus[maxn << 2];
                               ^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\string:48:0,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\random:41,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:65,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:62,
                 from foo.cpp:3:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_function.h:149:12: note:                 template<class _Tp> struct std::minus
     struct m

信息

递交者
类型
递交
题目
P1782 借教室
语言
C++
递交时间
2016-11-15 17:57:55
评测时间
2016-11-15 17:57:56
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes