题解列表

筛选

校门外的数

摘要:```cpp #include #include using namespace std; int main() { int n,m; cin>>n>>m; int c[1000……

数组的距离

摘要:解题思路:调用了fabs()这个库函数去计算了绝对值(调用此库函数的头文件为<cmath>),不断用一个变量t去保存绝对值小的值注意事项:参考代码:#include<bits/stdc++.h>usi……

pow函数算平方根

摘要:解题思路:利用pow函数来求开方,与sqrt函数求开方同理注意事项:1/2是整型,等于零,应该用1.0/2参考代码:#include<iostream>using namespace std;#inc……

用ceil函数即可

摘要:解题思路:ceil函数可实现向上求整,此题思路为向下求整,故减一即可。注意事项:参考代码:  #include<iostream>  using namespace std;  #include<cm……

简单又实用

摘要:解题思路:在已知的条件下,我们只需要一步一步去解析然后分解就可以完成这道题啦注意事项:参考代码:#include<iostream>using namespace std;int main(){   ……

计算三角形面积

摘要:解题思路:运用求两点间距离公式和海伦公式注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){    double xa,x……

感谢支持(谢谢)

摘要:解题思路:#include <bits/stdc++.h>using namespace std;int main(){    double xa,ya,xb,yb,xc,yc;    cin>>xa……

2774: 计算三角形面积

摘要:参考代码:#include<bits/stdc++.h>using namespace std;int main(){    double a;    cin>>a>>b>>c>>d>>e>>f;  ……