1131: C语言训练-斐波纳契数列 摘要:这里采用的是循环方案,也可以用递归。#include<bits/stdc++.h> using namespace std; int main(){ int n; cin …… 题解列表 2021年12月24日 0 点赞 0 评论 262 浏览 评分:0.0
2644: 烤干机 c++分治思想 摘要:解题思路:这道题第一眼会想到全排列或者优先队列毫无疑问这是错的,因为时间复杂度太高了所以我想的是分治算法(因为最近比较菜想了好久)int f[500002];定义数组 int a(即A),b(即B)首…… 题解列表 2021年12月24日 0 点赞 0 评论 509 浏览 评分:7.3
1688: 数据结构-字符串插入 摘要:#include<bits/stdc++.h> using namespace std; int main(){ string a,b; int n; cin >…… 题解列表 2021年12月23日 0 点赞 0 评论 394 浏览 评分:9.9
1687: 数据结构-字符串连接 摘要:#include<bits/stdc++.h> using namespace std; int main(){ string a,b; while(cin>>a>>b){ …… 题解列表 2021年12月23日 0 点赞 0 评论 370 浏览 评分:0.0
1206: 字符串问题 摘要:这题就是字符串逆序,使用 reverse 函数。#include<bits/stdc++.h> using namespace std; int main(){ string s; …… 题解列表 2021年12月23日 0 点赞 0 评论 340 浏览 评分:0.0
1126: C语言训练-字符串正反连接 摘要:使用 reverse 函数将字符串反序。#include<bits/stdc++.h> using namespace std; int main(){ string s,temp;…… 题解列表 2021年12月23日 0 点赞 0 评论 365 浏览 评分:0.0
1093: 字符逆序 摘要:直接用 reverse 函数将字符串逆序。#include <bits/stdc++.h> using namespace std; int main() { string s; …… 题解列表 2021年12月23日 0 点赞 0 评论 328 浏览 评分:0.0
1083: Hello, world! 摘要:直接用 %c 输出 ASCII 码对应的字符,注意读入换行符时输出空格。#include <bits/stdc++.h> using namespace std; int main() { …… 题解列表 2021年12月23日 0 点赞 0 评论 252 浏览 评分:0.0
1057: 二级C语言-分段函数 摘要:输出两位有效数字还是用 printf 方便。#include <bits/stdc++.h> using namespace std; int main() { double x;…… 题解列表 2021年12月23日 0 点赞 0 评论 362 浏览 评分:0.0