Borderou de evaluare (job #2225594)

Utilizator andrei.arnautuAndi Arnautu andrei.arnautu Data 27 iulie 2018 17:35:37
Problema Culoar Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘double Dist(Line, Point)’: user.cpp:60:63: error: call of overloaded ‘abs(double)’ is ambiguous return (double)std::abs(line.a * P.x + line.b * P.y + line.c) / std::sqrt(line.a * line.a + line.b * line.b); ^ In file included from /usr/include/c++/6/bits/stl_algo.h:59:0, from /usr/include/c++/6/algorithm:62, from user.cpp:7: /usr/include/c++/6/cstdlib:172:3: note: candidate: long int std::abs(long int) abs(long __i) { return __builtin_labs(__i); } ^~~ In file included from /usr/include/c++/6/cstdlib:75:0, from /usr/include/c++/6/bits/stl_algo.h:59, from /usr/include/c++/6/algorithm:62, from user.cpp:7: /usr/include/stdlib.h:774:12: note: candidate: int abs(int) extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur; ^~~ In file included from /usr/include/c++/6/bits/stl_algo.h:59:0, from /usr/include/c++/6/algorithm:62, from user.cpp:7: /usr/include/c++/6/cstdlib:180:3: note: candidate: long long int std::abs(long long int) abs(long long __x) { return __builtin_llabs (__x); } ^~~ user.cpp:60:67: error: ‘sqrt’ is not a member of ‘std’ return (double)std::abs(line.a * P.x + line.b * P.y + line.c) / std::sqrt(line.a * line.a + line.b * line.b); ^~~ user.cpp: In function ‘void ReadInput()’: user.cpp:64:18: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &n); ^ user.cpp:66:41: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] double x, y; scanf("%lf%lf", &x, &y); ^

Ceva nu functioneaza?