跳到正文

题解

U477877 Stewart’s theorem+海伦公式

IdleFish约 1 分钟
原文
文章信息与版本

文章信息

收录
2025年12月12日
更新
2025年12月12日
篇幅
约 1 分钟

版本

  1. v1当前

U477877 Stewart’s theorem+海伦公式

这道题纯数学,去网上搜。

ps:自己最好证明一下

代码附上

C++
#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;
}
原文