U477877 Stewart’s theorem+海伦公式
这道题纯数学,去网上搜。
ps:自己最好证明一下
代码附上
#include<bits/stdc++.h>
using namespace std;
int main(){
string n;//为什么要输入?我也不知道,造数据的时候敲了一个输入,将就一下吧
cin>>n;
cout<<"AD*AD*BC=AB*AB*CD+AC*AC*BD-BC*BD*CD\n";
cout<<"S=sqrt((AB+AC+BC)/2*(AB-(AB+AC+BC)/2)*(AC-(AB+AC+BC)/2)*(BC-(AB+AC+BC)/2))";
return 0;
}