/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:21:5: error: reference to 'left' is ambiguous
     left[i][j]=right[i][j]=j;
     ^~~~
/in/foo.cc:12:21: note: candidates are: int left [2001][2001]
 int res[maxn][maxn],left[maxn][maxn],right[maxn][maxn],up[maxn][maxn];
                     ^~~~
In file included from /usr/include/c++/6/ios:42:0,
                 from /usr/include/c++/6/istream:38,
                 from /usr/include/c++/6/sstream:38,
                 from /usr/include/c++/6/complex:45,
                 from /usr/include/c++/6/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/ios_base.h:999:3: note:                 std::ios_base& std::left(std::ios_base&)
   left(ios_base& __base)
   ^~~~
/in/foo.cc:21:16: error: reference to 'right' is ambiguous
     left[i][j]=right[i][j]=j;
                ^~~~~
/in/foo.cc:12:38: note: candidates are: int right [2001][2001]
 int res[maxn][maxn],left[maxn][maxn],right[maxn][maxn],up[maxn][maxn];
                                      ^~~~~
In file included from /usr/include/c++/6/ios:42:0,
                 from /usr/include/c++/6/istream:38,
                 from /usr/include/c++/6/sstream:38,
                 from /usr/include/c++/6/complex:45,
                 from /usr/include/c++/6/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/ios_base.h:1007:3: note:                 std::ios_base& std::right(std::ios_base&)
   right(ios_base& __base)
   ^~~~~
/in/foo.cc:27:5: error: reference to 'left' is ambiguous
     left[i][j]=left[i][j-1];//预处理左边界
     ^~~~
/in/foo.cc:12:21: note: candidates are: int left [2001][2001]
 int res[maxn][maxn],left[maxn][maxn],right[maxn][maxn],up[maxn][maxn];
                     ^~~~
In file included from /usr/include/c++/6/ios:42:0,
                 from /usr/include/c++/6/istream:38,
                 from /usr/include/c++/6/sstream:38,
                 from /usr/include/c++/6/complex:45,
                 from /usr/include/c++/6/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/ios_base.h:999:3: note:                 std::ios_base& std::left(std::ios_base&)
   left(ios_base& __base)
   ^~~~
/in/foo.cc:27:16: error: reference to 'left' is ambiguous
     left[i][j]=left[i][j-1];//预处理左边界
                ^~~~
/in/foo.cc:12:21: note: candidates are: int left [2001][2001]
 int res[maxn][maxn],left[maxn][maxn],right[maxn][maxn],up[maxn][maxn];
                     ^~~~
In file included from /usr/include/c++/6/ios:42:0,
                 from /usr/include/c++/6/istream:38,
                 from /usr/include/c++/6/sstream:38,
                 from /usr/include/c++/6/complex:45,
                 from /usr/include/c++/6/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/ios_base.h:999:3: note:                 std::ios_base& std::left(std::ios_base&)
   left(ios_base& __base)
   ^~~~
/in/foo.cc:31:5: error: reference to 'right' is ambiguous
     right[i][j]=right[i][j+1];//预处理右边界
     ^~~~~
/in/foo.cc:12:38: note: candidates are: int right [2001][2001]
 int res[maxn][maxn],left[maxn][maxn],right[maxn][maxn],up[maxn][maxn];
                                      ^~~~~
In file included from /usr/include/c++/6/ios:42:0,
                 from /usr/include/c++/6/istream:38,
                 from /usr/include/c++/6/sstream:38,
                 from /usr/include/c++/6/complex:45,
                 from /usr/include/c++/6/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/ios_base.h:1007:3: note:                 std::ios_base& std::right(std::ios_base&)
   right(ios_base& __base)
   ^~~~~
/in/foo.cc:31:17: error: reference to 'right' is ambiguous
     right[i][j]=right[i][j+1];//预处理右边界
                 ^~~~~
/in/foo.cc:12:38: note: candidates are: int right [2001][2001]
 int res[maxn][maxn],left[maxn][maxn],right[maxn][maxn],up[maxn][maxn];
                                      ^~~~~
In file included from /usr/include/c++/6/ios:42:0,
                 from /usr/include/c++/6/istream:38,
                 from /usr/include/c++/6/sstream:38,
                 from /usr/include/c++/6/complex:45,
                 from /usr/include/c++/6/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/ios_base.h:1007:3: note:                 std::ios_base& std::right(std::ios_base&)
   right(ios_base& __base)
   ^~~~~
/in/foo.cc:37:6: error: reference to 'left' is ambiguous
      left[i][j]=max(left[i][j],left[i-1][j]);
      ^~~~
/in/foo.cc:12:21: note: candidates are: int left [2001][2001]
 int res[maxn][maxn],left[maxn][maxn],right[maxn][maxn],up[maxn][maxn];
                     ^~~~
In file included from /usr/include/c++/6/ios:42:0,
                 from /usr/include/c++/6/istream:38,
                 from /usr/include/c++/6/sstream:38,
                 from /usr/include/c++/6/complex:45,
                 from /usr/include/c++/6/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/ios_base.h:999:3: note:                 std::ios_base& std::left(std::ios_base&)
   left(ios_base& __base)
   ^~~~
/in/foo.cc:37:21: error: reference to 'left' is ambiguous
      left[i][j]=max(left[i][j],left[i-1][j]);
                     ^~~~
/in/foo.cc:12:21: note: candidates are: int left [2001][2001]
 int res[maxn][maxn],left[maxn][maxn],right[maxn][maxn],up[maxn][maxn];
                     ^~~~
In file included from /usr/include/c++/6/ios:42:0,
                 from /usr/include/c++/6/istream:38,
                 from /usr/include/c++/6/sstream:38,
                 from /usr/include/c++/6/complex:45,
                 from /usr/include/c++/6/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/ios_base.h:999:3: note:                 std::ios_base& std::left(std::ios_base&)
   left(ios_base& __base)
   ^~~~
/in/foo.cc:37:32: error: reference to 'left' is ambiguous
      left[i][j]=max(left[i][j],left[i-1][j]);
                                ^~~~
/in/foo.cc:12:21: note: candidates are: int left [2001][2001]
 int res[maxn][maxn],left[maxn][maxn],right[maxn][maxn],up[maxn][maxn];
                     ^~~~
In file included from /usr/include/c++/6/ios:42:0,
                 from /usr/include/c++/6/istream:38,
                 from /usr/include/c++/6/sstream:38,
                 from /usr/include/c++/6/complex:45,
                 from /usr/include/c++/6/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/ios_base.h:999:3: note:                 std::ios_base& std::left(std::ios_base&)
   left(ios_base& __base)
   ^~~~
/in/foo.cc:38:6: error: reference to 'right' is ambiguous
      right[i][j]=min(right[i][j],right[i-1][j]);
      ^~~~~
/in/foo.cc:12:38: note: candidates are: int right [2001][2001]
 int res[maxn][maxn],left[maxn][maxn],right[maxn][maxn],up[maxn][maxn];
                                      ^~~~~
In file included from /usr/include/c++/6/ios:42:0,
                 from /usr/include/c++/6/istream:38,
                 from /usr/include/c++/6/sstream:38,
                 from /usr/include/c++/6/complex:45,
                 from /usr/include/c++/6/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/ios_base.h:1007:3: note:                 std::ios_base& std::right(std::ios_base&)
   right(ios_base& __base)
   ^~~~~
/in/foo.cc:38:22: error: reference to 'right' is ambiguous
      right[i]

信息

递交者
类型
递交
题目
P1351 棋盘制作
语言
C++
递交时间
2020-05-24 13:25:39
评测时间
2020-05-24 13:25:39
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes