/ Vijos /

记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:33:42: warning: comparison of integer expressions of different signedness: 'std::priority_queue<int, std::vector<int>, std::greater<int> >::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   33 |                         while(minq.size()>len/2+1)
      |                               ~~~~~~~~~~~^~~~~~~~
foo.cc:40:42: warning: comparison of integer expressions of different signedness: 'std::priority_queue<int, std::vector<int>, std::less<int> >::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   40 |                         while(maxq.size()>len/2)
      |                               ~~~~~~~~~~~^~~~~~
foo.cc:48:38: error: call of overloaded 'abs(long long unsigned int)' is ambiguous
   48 |                         ans[i][j]=abs((mid*minq.size()-sum1)+(sum2-mid*maxq.size()));
      |                                   ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /nix/store/h5kvfrjmpw792v8jg7nrzfkffmn0iyy8-gcc-12.3.0/include/c++/12.3.0/bits/std_abs.h:38,
                 from /nix/store/h5kvfrjmpw792v8jg7nrzfkffmn0iyy8-gcc-12.3.0/include/c++/12.3.0/cmath:47,
                 from stdc++.h:41:
/nix/store/y8wfrgk7br5rfz4221lfb9v8w3n0cnyd-glibc-2.37-8-dev/include/stdlib.h:861:12: note: candidate: 'int abs(int)'
  861 | extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
      |            ^~~
/nix/store/h5kvfrjmpw792v8jg7nrzfkffmn0iyy8-gcc-12.3.0/include/c++/12.3.0/bits/std_abs.h:79:3: note: candidate: 'constexpr long double std::abs(long double)'
   79 |   abs(long double __x)
      |   ^~~
/nix/store/h5kvfrjmpw792v8jg7nrzfkffmn0iyy8-gcc-12.3.0/include/c++/12.3.0/bits/std_abs.h:75:3: note: candidate: 'constexpr float std::abs(float)'
   75 |   abs(float __x)
      |   ^~~
/nix/store/h5kvfrjmpw792v8jg7nrzfkffmn0iyy8-gcc-12.3.0/include/c++/12.3.0/bits/std_abs.h:71:3: note: candidate: 'constexpr double std::abs(double)'
   71 |   abs(double __x)
      |   ^~~
/nix/store/h5kvfrjmpw792v8jg7nrzfkffmn0iyy8-gcc-12.3.0/include/c++/12.3.0/bits/std_abs.h:61:3: note: candidate: 'long long int std::abs(long long int)'
   61 |   abs(long long __x) { return __builtin_llabs (__x); }
      |   ^~~
/nix/store/h5kvfrjmpw792v8jg7nrzfkffmn0iyy8-gcc-12.3.0/include/c++/12.3.0/bits/std_abs.h:56:3: note: candidate: 'long int std::abs(long int)'
   56 |   abs(long __i) { return __builtin_labs(__i); }
      |   ^~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1459 车展
语言
C++
递交时间
2023-10-22 19:08:51
评测时间
2023-10-22 19:08:51
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes