Borderou de evaluare (job #2594611)
Utilizator | Data | 6 aprilie 2020 13:55:13 | |
---|---|---|---|
Problema | Smax | Status | done |
Runda | Arhiva ICPC | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:6:28: error: 'int j1' redeclared as different kind of symbol
int T, n, m, d, x, x1, i1, j1, x2, i2, j2, res;
^~
In file included from /usr/include/features.h:367:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/6/bits/c++config.h:507,
from /usr/include/c++/6/cassert:43,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:33,
from main.cpp:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:248:1: note: previous declaration 'double j1(double)'
__MATHCALL (j1,, (_Mdouble_));
^
main.cpp: In function 'int main()':
main.cpp:26:45: warning: pointer to a function used in arithmetic [-Wpointer-arith]
if (abs(i1 - i2) + abs(j1 - j2) <= d)
^~
main.cpp:26:47: error: no matching function for call to 'abs(double (*)(double) throw ())'
if (abs(i1 - i2) + abs(j1 - j2) <= d)
^
In file included from /usr/include/c++/6/cstdlib:75:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:47,
from main.cpp:1:
/usr/include/stdlib.h:774:12: note: candidate: int abs(int) <near match>
extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
^~~
/usr/include/stdlib.h:774:12: note: conversion of argument 1 would be ill-formed:
main.cpp:26:43: error: invalid conversion from 'double (*)(double) throw ()' to 'int' [-fpermissive]
if (abs(i1 - i2) + abs(j1 - j2) <= d)
~~~^~~~
In file included from /usr/include/c++/6/valarray:587:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:95,
from main.cpp:1:
/usr/include/c++/6/bits/valarray_after.h:442:5: note: candidate: template<class _Tp> std::_Expr<std::_UnClos<std::_Abs, std::_ValArray, _Tp>, _Tp> std::abs(const std::valarray<_Tp>&)
_DEFINE_EXPR_UNARY_FUNCTION(abs, _Abs)
^
/usr/include/c++/6/bits/valarray_after.h:442:5: note: template argument deduction/substitution failed:
main.cpp:26:47: note: mismatched types 'const std::valarray<_Tp>' and 'double (*)(double) throw ()'
if (abs(i1 - i2) + abs(j1 - j2) <= d)
^
In file included from /usr/include/c++/6/valarray:587:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:95,
from main.cpp:1:
/usr/include/c++/6/bits/valarray_after.h:442:5: note: candidate: template<class _Dom> std::_Expr<std::_UnClos<std::_Abs, std::_Expr, _Dom>, typename _Dom::value_type> std::abs(const std::_Expr<_Dom1, typename _Dom1::value_type>&)
_DEFINE_EXPR_UNARY_FUNCTION(abs, _Abs)
^
/usr/include/c++/6/bits/valarray_after.h:442:5: note: template argument deduction/substitution failed:
main.cpp:26:47: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'double (*)(double) throw ()'
if (abs(i1 - i2) + abs(j1 - j2) <= d)
^
In file included from /usr/include/c++/6/ccomplex:39:0,
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !