Borderou de evaluare (job #2656448)
Utilizator | Data | 7 octombrie 2020 19:10:18 | |
---|---|---|---|
Problema | Dragonas | Status | done |
Runda | Arhiva ICPC | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:8:11: error: 'int y1' redeclared as different kind of symbol
int x1,x2,y1,y2;
^~
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:251:1: note: previous declaration 'double y1(double)'
__MATHCALL (y1,, (_Mdouble_));
^
main.cpp: In function 'void rez()':
main.cpp:14:25: warning: pointer to a function used in arithmetic [-Wpointer-arith]
if(x2-x1<abs(y1-y2)){
^~
main.cpp:14:27: error: no matching function for call to 'abs(double (*)(double) throw ())'
if(x2-x1<abs(y1-y2)){
^
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:14:24: error: invalid conversion from 'double (*)(double) throw ()' to 'int' [-fpermissive]
if(x2-x1<abs(y1-y2)){
~~^~~
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:14:27: note: mismatched types 'const std::valarray<_Tp>' and 'double (*)(double) throw ()'
if(x2-x1<abs(y1-y2)){
^
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:14:27: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'double (*)(double) throw ()'
if(x2-x1<abs(y1-y2)){
^
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 !