编写题解 2973: 出现次数超过一半的数 摘要:解题思路:先计数排序 再判断注意事项:参考代码:#include<bits/stdc++.h>using namespace std;typedef long long ll;const int N=…… 题解列表 2024年07月22日 0 点赞 0 评论 221 浏览 评分:9.9
vector写数组 摘要:#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; vector<in…… 题解列表 2024年07月22日 0 点赞 0 评论 192 浏览 评分:0.0
优先队列的使用 摘要:#include<bits/stdc++.h> using namespace std; priority_queue<int>v;//大根堆 int main() { int n,…… 题解列表 2024年07月22日 0 点赞 0 评论 183 浏览 评分:0.0
台球碰撞的三种解法(尽量使用c++) 摘要:原题:在平面直角坐标系下,台球桌是一个左下角在(0,0),右上角在(L,W)的矩形。有一个球心在(x,y),半径为R的圆形母球放在台球桌上(整个球都在台球桌内)。受撞击后,球沿极角为a的射线(即:x正…… 题解列表 2024年07月22日 0 点赞 0 评论 635 浏览 评分:9.9
使用fgets输入字符串然后实现反转 摘要:解题思路:可以定义一个数组循环输入,也可以定义一个数组然后使用字符串输入格式 "%s" 输入,还可以使用gets输入(gets不安全,尽量不用),这里使用fgets输入,fgets函数具有三个参数,第…… 题解列表 2024年07月22日 2 点赞 0 评论 249 浏览 评分:10.0
编写题解 2236: 蓝桥杯算法训练-大小写转换 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;const int N = 1e7;ch…… 题解列表 2024年07月22日 0 点赞 0 评论 445 浏览 评分:0.0
编写题解 2846: 统计数字字符个数 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;const int N = 1e7;ch…… 题解列表 2024年07月22日 0 点赞 0 评论 744 浏览 评分:9.9
编写题解 2853: 字符替换 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;int main(){ string…… 题解列表 2024年07月22日 0 点赞 0 评论 197 浏览 评分:9.9
2853: 字符替换 c++ (string) 摘要:解题思路:注意事项:参考代码: #include <bits/stdc++.h> using namespace std; const int N = 1e3; typedef…… 题解列表 2024年07月22日 0 点赞 0 评论 181 浏览 评分:0.0
c语言牛顿迭代法求平方根 摘要:# C语言迭代法求平方根 迭代法也称牛顿迭代法,核心公式是**牛顿迭代公式**: $$x\_{n+1}=x\_{n}-\frac{f(x\_{n})}{f^{\prime}(x\_{n})}$$ …… 题解列表 2024年07月23日 0 点赞 0 评论 383 浏览 评分:0.0