Submission #2235803
Source Code Expand
#include <cstdio> #include <cstdlib> int main(void) { double xa, ya, xb, yb, xc, yc; scanf("%lf%lf%lf%lf%lf%lf", &xa, &ya, &xb, &yb, &xc, &yc); xb -= xa; yb -= ya; xc -= xa; yc -= ya; printf("%0.2lf\n", abs(xb * yc - yb * xc) / 2.0); }
Submission Info
Submission Time | |
---|---|
Task | C - 直訴 |
User | zohe |
Language | C++14 (Clang 3.8.0) |
Score | 0 |
Code Size | 275 Byte |
Status | CE |
Compile Error
./Main.cpp:11:24: error: call to 'abs' is ambiguous printf("%0.2lf\n", abs(xb * yc - yb * xc) / 2.0); ^~~ /usr/include/stdlib.h:775:12: note: candidate function extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur; ^ /usr/local/include/c++/v1/stdlib.h:115:44: note: candidate function inline _LIBCPP_INLINE_VISIBILITY long abs( long __x) _NOEXCEPT {return labs(__x);} ^ /usr/local/include/c++/v1/stdlib.h:117:44: note: candidate function inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {return llabs(__x);} ^ 1 error generated.