Submission #3097196
Source Code Expand
#include<cmath> #include<iostream> using namespace std; int ax,ay,bx,by,cx,cy; double ab,bc,ca,p; int main() { cin>>ax>>ay>>bx>>by>>cx>>cy; ab=sqrt(pow(ax-bx,2)+pow(ay-by,2)); bc=sqrt(pow(cx-bx,2)+pow(cy-by,2)); ca=sqrt(pow(ax-cx,2)+pow(ay-cy,2)); p=1.0*(ab+bc+ca)/2; printf("%.1lf\n",sqrt(p*(p-ab)*(p-bc)*(p-ca))); }
Submission Info
Submission Time | |
---|---|
Task | C - 直訴 |
User | luogu_bot4 |
Language | C++ (GCC 5.4.1) |
Score | 0 |
Code Size | 354 Byte |
Status | CE |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:13:50: error: ‘printf’ was not declared in this scope printf("%.1lf\n",sqrt(p*(p-ab)*(p-bc)*(p-ca))); ^