/ Vijos /

记录详情

Compile Error

foo.cc:7:3: error: 'stone' does not name a type
    7 |   stone data[MAXN];
      |   ^~~~~
foo.cc: In function 'void input()':
foo.cc:20:7: error: 'data' was not declared in this scope
   20 |       data[i] = {tw, tv};
      |       ^~~~
foo.cc:21:7: error: reference to 'right' is ambiguous
   21 |       right = max(right, tv);
      |       ^~~~~
In file included from /nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/ios:42,
                 from /nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/ostream:38,
                 from iostream:39:
/nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/bits/ios_base.h:1037:3: note: candidates are: 'std::ios_base& std::right(std::ios_base&)'
 1037 |   right(ios_base& __base)
      |   ^~~~~
foo.cc:6:21: note:                 'll right'
    6 |   ll s, ans = 1e15, right;
      |                     ^~~~~
foo.cc:21:19: error: reference to 'right' is ambiguous
   21 |       right = max(right, tv);
      |                   ^~~~~
In file included from /nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/ios:42,
                 from /nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/ostream:38,
                 from iostream:39:
/nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/bits/ios_base.h:1037:3: note: candidates are: 'std::ios_base& std::right(std::ios_base&)'
 1037 |   right(ios_base& __base)
      |   ^~~~~
foo.cc:6:21: note:                 'll right'
    6 |   ll s, ans = 1e15, right;
      |                     ^~~~~
foo.cc: In function 'll check(int)':
foo.cc:31:11: error: 'data' was not declared in this scope
   31 |       if (data[i].w >= W) {
      |           ^~~~
foo.cc: In function 'void output()':
foo.cc:49:12: error: reference to 'right' is ambiguous
   49 |     while (right >= left) {
      |            ^~~~~
In file included from /nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/ios:42,
                 from /nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/ostream:38,
                 from iostream:39:
/nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/bits/ios_base.h:1037:3: note: candidates are: 'std::ios_base& std::right(std::ios_base&)'
 1037 |   right(ios_base& __base)
      |   ^~~~~
foo.cc:6:21: note:                 'll right'
    6 |   ll s, ans = 1e15, right;
      |                     ^~~~~
foo.cc:50:21: error: reference to 'right' is ambiguous
   50 |       mid = (left + right) >>1;
      |                     ^~~~~
In file included from /nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/ios:42,
                 from /nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/ostream:38,
                 from iostream:39:
/nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/bits/ios_base.h:1037:3: note: candidates are: 'std::ios_base& std::right(std::ios_base&)'
 1037 |   right(ios_base& __base)
      |   ^~~~~
foo.cc:6:21: note:                 'll right'
    6 |   ll s, ans = 1e15, right;
      |                     ^~~~~
foo.cc:55:9: error: reference to 'right' is ambiguous
   55 |         right = mid - 1;
      |         ^~~~~
In file included from /nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/ios:42,
                 from /nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/ostream:38,
                 from iostream:39:
/nix/store/42izybv2fz3ps5pcg3dvcmn85pc9406y-gcc-11.3.0/include/c++/11.3.0/bits/ios_base.h:1037:3: note: candidates are: 'std::ios_base& std::right(std::ios_base&)'
 1037 |   right(ios_base& __base)
      |   ^~~~~
foo.cc:6:21: note:                 'll right'
    6 |   ll s, ans = 1e15, right;
      |                     ^~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1740 聪明的质检员
语言
C++
递交时间
2022-08-10 16:55:08
评测时间
2022-08-10 16:55:08
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes