/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:119:24: error: ambiguous overload for 'operator<=' (operand types are '__gmp_expr<__mpz_struct [1], __mpz_struct [1]>' and 'long long int')
  119 |         if (d > 0 && d <= m) {
      |                      ~ ^~ ~
      |                      |    |
      |                      |    long long int
      |                      __gmp_expr<__mpz_struct [1], __mpz_struct [1]>
In file included from /in/foo.cc:2:
/usr/include/gmpxx.h:3333:1: note: candidate: 'bool operator<=(const __gmp_expr<T, U>&, signed char) [with T = __mpz_struct [1]; U = __mpz_struct [1]]'
 3333 | __GMP_DEFINE_BINARY_TYPE_FUNCTION(bool, operator<=, ! __gmp_binary_greater)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/gmpxx.h:3333:1: note: candidate: 'bool operator<=(const __gmp_expr<T, U>&, unsigned char) [with T = __mpz_struct [1]; U = __mpz_struct [1]]'
 3333 | __GMP_DEFINE_BINARY_TYPE_FUNCTION(bool, operator<=, ! __gmp_binary_greater)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/gmpxx.h:3333:1: note: candidate: 'bool operator<=(const __gmp_expr<T, U>&, int) [with T = __mpz_struct [1]; U = __mpz_struct [1]]'
 3333 | __GMP_DEFINE_BINARY_TYPE_FUNCTION(bool, operator<=, ! __gmp_binary_greater)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/gmpxx.h:3333:1: note: candidate: 'bool operator<=(const __gmp_expr<T, U>&, unsigned int) [with T = __mpz_struct [1]; U = __mpz_struct [1]]'
 3333 | __GMP_DEFINE_BINARY_TYPE_FUNCTION(bool, operator<=, ! __gmp_binary_greater)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/gmpxx.h:3333:1: note: candidate: 'bool operator<=(const __gmp_expr<T, U>&, short int) [with T = __mpz_struct [1]; U = __mpz_struct [1]]'
 3333 | __GMP_DEFINE_BINARY_TYPE_FUNCTION(bool, operator<=, ! __gmp_binary_greater)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/gmpxx.h:3333:1: note: candidate: 'bool operator<=(const __gmp_expr<T, U>&, short unsigned int) [with T = __mpz_struct [1]; U = __mpz_struct [1]]'
 3333 | __GMP_DEFINE_BINARY_TYPE_FUNCTION(bool, operator<=, ! __gmp_binary_greater)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/gmpxx.h:3333:1: note: candidate: 'bool operator<=(const __gmp_expr<T, U>&, long int) [with T = __mpz_struct [1]; U = __mpz_struct [1]]'
 3333 | __GMP_DEFINE_BINARY_TYPE_FUNCTION(bool, operator<=, ! __gmp_binary_greater)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/gmpxx.h:3333:1: note: candidate: 'bool operator<=(const __gmp_expr<T, U>&, long unsigned int) [with T = __mpz_struct [1]; U = __mpz_struct [1]]'
 3333 | __GMP_DEFINE_BINARY_TYPE_FUNCTION(bool, operator<=, ! __gmp_binary_greater)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/gmpxx.h:3333:1: note: candidate: 'bool operator<=(const __gmp_expr<T, U>&, float) [with T = __mpz_struct [1]; U = __mpz_struct [1]]'
 3333 | __GMP_DEFINE_BINARY_TYPE_FUNCTION(bool, operator<=, ! __gmp_binary_greater)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/gmpxx.h:3333:1: note: candidate: 'bool operator<=(const __gmp_expr<T, U>&, double) [with T = __mpz_struct [1]; U = __mpz_struct [1]]'
 3333 | __GMP_DEFINE_BINARY_TYPE_FUNCTION(bool, operator<=, ! __gmp_binary_greater)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/foo.cc:155:18: error: conversion from 'long long unsigned int' to 'Big' {aka 'mpz_class'} is ambiguous
  155 |         Big bd = d;
      |                  ^
/usr/include/gmpxx.h:1646:3: note: candidate: '__gmp_expr<__mpz_struct [1], __mpz_struct [1]>::__gmp_expr(double)'
 1646 |   __GMPXX_DEFINE_ARITHMETIC_CONSTRUCTORS
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/gmpxx.h:1646:3: note: candidate: '__gmp_expr<__mpz_struct [1], __mpz_struct [1]>::__gmp_expr(float)'
 1646 |   __GMPXX_DEFINE_ARITHMETIC_CONSTRUCTORS
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/gmpxx.h:1646:3: note: candidate: '__gmp_expr<__mpz_struct [1], __mpz_struct [1]>::__gmp_expr(long unsigned int)'
 1646 |   __GMPXX_DEFINE_ARITHMETIC_CONSTRUCTORS
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/gmpxx.h:1646:3: note: candidate: '__gmp_expr<__mpz_struct [1], __mpz_struct [1]>::__gmp_expr(long int)'
 1646 |   __GMPXX_DEFINE_ARITHMETIC_CONSTRUCTORS
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/gmpxx.h:1646:3: note: candidate: '__gmp_expr<__mpz_struct [1], __mpz_struct [1]>::__gmp_expr(short unsigned int)'
 1646 |   __GMPXX_DEFINE_ARITHMETIC_CONSTRUCTORS
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/gmpxx.h:1646:3: note: candidate: '__gmp_expr<__mpz_struct [1], __mpz_struct [1]>::__gmp_expr(short int)'
 1646 |   __GMPXX_DEFINE_ARITHMETIC_CONSTRUCTORS
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/gmpxx.h:1646:3: note: candidate: '__gmp_expr<__mpz_struct [1], __mpz_struct [1]>::__gmp_expr(unsigned int)'
 1646 |   __GMPXX_DEFINE_ARITHMETIC_CONSTRUCTORS
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/gmpxx.h:1646:3: note: candidate: '__gmp_expr<__mpz_struct [1], __mpz_struct [1]>::__gmp_expr(int)'
 1646 |   __GMPXX_DEFINE_ARITHMETIC_CONSTRUCTORS
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/gmpxx.h:1646:3: note: candidate: '__gmp_expr<__mpz_struct [1], __mpz_struct [1]>::__gmp_expr(unsigned char)'
 1646 |   __GMPXX_DEFINE_ARITHMETIC_CONSTRUCTORS
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/gmpxx.h:1646:3: note: candidate: '__gmp_expr<__mpz_struct [1], __mpz_struct [1]>::__gmp_expr(signed char)'
 1646 |   __GMPXX_DEFINE_ARITHMETIC_CONSTRUCTORS
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

信息

递交者
类型
递交
题目
P1910 解方程
语言
C++
递交时间
2025-06-14 07:15:13
评测时间
2025-06-14 07:15:13
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes