题解列表
台球碰撞的三种解法(尽量使用c++)
摘要:原题:在平面直角坐标系下,台球桌是一个左下角在(0,0),右上角在(L,W)的矩形。有一个球心在(x,y),半径为R的圆形母球放在台球桌上(整个球都在台球桌内)。受撞击后,球沿极角为a的射线(即:x正……
使用fgets输入字符串然后实现反转
摘要:解题思路:可以定义一个数组循环输入,也可以定义一个数组然后使用字符串输入格式 "%s" 输入,还可以使用gets输入(gets不安全,尽量不用),这里使用fgets输入,fgets函数具有三个参数,第……
编写题解 2236: 蓝桥杯算法训练-大小写转换
摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;const int N = 1e7;ch……
编写题解 2846: 统计数字字符个数
摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;const int N = 1e7;ch……
编写题解 2853: 字符替换
摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;int main(){ string……
2853: 字符替换 c++ (string)
摘要:解题思路:注意事项:参考代码: #include <bits/stdc++.h> using namespace std; const int N = 1e3; typedef……
c语言牛顿迭代法求平方根
摘要:# C语言迭代法求平方根
迭代法也称牛顿迭代法,核心公式是**牛顿迭代公式**:
$$x\_{n+1}=x\_{n}-\frac{f(x\_{n})}{f^{\prime}(x\_{n})}$$……
编写题解 2749: Hello, World!
摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int main(){ cout << "Hello world!" << endl;……
编写题解 1267: A+B Problem
摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a,b; while(cin>>a>>b)cout……