用快读scanf别用cin 摘要:解题思路:/*带权并查集模板*/注意事项:参考代码:#include<bits/stdc++.h>typedef long long ll;using namespace std;int fa[100…… 题解列表 2024年07月21日 0 点赞 0 评论 278 浏览 评分:0.0
判断数正负 摘要:解题思路:注意事项:参考代码:N = int(input())if N > 0: print("positive")elif N == 0: print("zero")elif N < 0…… 题解列表 2024年07月22日 0 点赞 0 评论 466 浏览 评分:0.0
vector写数组 摘要:#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; vector<in…… 题解列表 2024年07月22日 0 点赞 0 评论 173 浏览 评分:0.0
优先队列的使用 摘要:#include<bits/stdc++.h> using namespace std; priority_queue<int>v;//大根堆 int main() { int n,…… 题解列表 2024年07月22日 0 点赞 0 评论 167 浏览 评分:0.0
编写题解 2236: 蓝桥杯算法训练-大小写转换 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;const int N = 1e7;ch…… 题解列表 2024年07月22日 0 点赞 0 评论 424 浏览 评分:0.0
2853: 字符替换 c++ (string) 摘要:解题思路:注意事项:参考代码: #include <bits/stdc++.h> using namespace std; const int N = 1e3; typedef…… 题解列表 2024年07月22日 0 点赞 0 评论 163 浏览 评分:0.0
c语言牛顿迭代法求平方根 摘要:# C语言迭代法求平方根 迭代法也称牛顿迭代法,核心公式是**牛顿迭代公式**: $$x\_{n+1}=x\_{n}-\frac{f(x\_{n})}{f^{\prime}(x\_{n})}$$ …… 题解列表 2024年07月23日 0 点赞 0 评论 360 浏览 评分:0.0
字符统计两种方式(C语言) 摘要:方法区别:第一种:输出在自定义函数中第二种:输出在主函数中注意事项:使用scanf函数输入时,不能用 "%s" ,因为输入空格后输出只会显示空格之前的内容,所以要用 "%[^\n]" ,表示除了回车键…… 题解列表 2024年07月23日 0 点赞 0 评论 356 浏览 评分:0.0
自定义函数求解水仙花数(C语言) 摘要:解题思路:水仙花数是3位整数,所以判断区间是包含100~999之间注意事项:水仙花数是各个位数的三次方之和等于它本身参考代码:#include <stdio.h> #include <math.h>…… 题解列表 2024年07月23日 0 点赞 0 评论 165 浏览 评分:0.0
[编程入门]求和训练 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(void){ int a,b,c; double sum1=0,sum2=0,sum3…… 题解列表 2024年07月23日 0 点赞 0 评论 144 浏览 评分:0.0