蓝桥杯2017年第八届真题-小数第n位(快速幂) 摘要:解题思路:求小数点后n位时,根据除法的流程,仅仅与c=(a*10^(n-1)))%b相关,第n+1位,n+2位,n+3位可以利用c/b来计算。注意事项:直接模拟除法可能会超时,复杂度为O(n),快速幂…… 题解列表 2023年08月28日 0 点赞 0 评论 298 浏览 评分:9.9
蓝桥杯2017年第八届真题-合根植物(无向图强连通分量) 摘要:解题思路:对每个点,如果未访问进行深搜找强连通分量参考代码:#include<bits/stdc++.h> using namespace std; #define maxx 2000000 i…… 题解列表 2023年08月28日 0 点赞 0 评论 217 浏览 评分:9.9
信息学奥赛一本通T1347-格子游戏 摘要:```cpp #include using namespace std; const int MAXN=5e6; int Father[MAXN]; int n,m,x,y; …… 题解列表 2023年08月28日 0 点赞 0 评论 577 浏览 评分:4.7
排序(c++ sort) 摘要:参考代码:#include<iostream>#include <algorithm>using namespace std;int main(){ int n; whil…… 题解列表 2023年08月27日 0 点赞 0 评论 381 浏览 评分:9.9
高精度加法 摘要:参考代码:#include <iostream> using namespace std; const int maxn = 1000; string x,y; int a[maxn],b…… 题解列表 2023年08月27日 0 点赞 0 评论 331 浏览 评分:0.0
1086: A+B for Input-Output Practice (II) 摘要:解题思路:注意事项:scanf输入注意事项: 对于两个scanf ,第一个scanf输入数字完要回车才能进入到下一个scanf的数字输入。 …… 题解列表 2023年08月27日 0 点赞 0 评论 258 浏览 评分:0.0
[编程入门]自定义函数之数字后移(简单易懂,适合新手,因为我也是) 摘要:解题思路:1.读懂题目,题目要求很简单,说白了就是将一行整数切片为两份,然后把后面一份移到前面并打印输出2.根据题目要求,我们只需要定义一个存放整数的数组,然后根据题目所给的m值对其切片(切点在q=n…… 题解列表 2023年08月27日 0 点赞 0 评论 303 浏览 评分:9.9
2794:求平均年龄 摘要:注意事项:最后命令结果为浮点数时,要将表达式中n*1.0转化为浮点类型参考代码:#include<stdio.h>int main(){ int n,i,age,sum=0; scanf(…… 题解列表 2023年08月27日 0 点赞 2 评论 1445 浏览 评分:9.9
1151:计算一个整数的乘阶 摘要:参考代码:#include<stdio.h>int main(){ int n,i,sum; scanf("%d",&n); sum=1; for(i=n;i>=1;i--) …… 题解列表 2023年08月27日 0 点赞 0 评论 206 浏览 评分:0.0
1755: 姓名排序 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<algorithm>using namespace std; //比较的规则int cmp(string a,st…… 题解列表 2023年08月27日 0 点赞 0 评论 212 浏览 评分:0.0