c++常规做法,一画图就很简单了 摘要:解题思路:画图,看一下注意事项:注意c++保留两位小数,和他的头文件参考代码:#include<iostream>#include<iomanip>using namespace std;int ma…… 题解列表 2021年12月25日 0 点赞 0 评论 714 浏览 评分:0.0
素数求和----三种写法,思路相近,一个可AC,两个不可AC 摘要:```cpp //1.时间超限 //#include //#include //using namespace std; //int main(void) //{ // int n; …… 题解列表 2021年12月25日 0 点赞 0 评论 800 浏览 评分:9.9
2058: [STL训练]Who's in the Middle 摘要:把 n 个数先后压进向量,然后排序,最后直接用索引打印中位数。#include<bits/stdc++.h> using namespace std; int main(){ int…… 题解列表 2021年12月24日 0 点赞 0 评论 743 浏览 评分:9.9
2071: [STL训练]壮志难酬 摘要:用 find 函数找到小数点的位置,再加上往后移动的位数就是所求数字。#include<bits/stdc++.h> using namespace std; int main(){ …… 题解列表 2021年12月24日 0 点赞 0 评论 376 浏览 评分:0.0
栅格打印问题----两种写法,一种可AC,一种不可AC 摘要:```cpp //1.第一种为什么AC不了,无法理解 //#include //using namespace std; //int main(void) //{ // int a,b;…… 题解列表 2021年12月24日 0 点赞 0 评论 474 浏览 评分:9.9
最长单词------提供两种写法,第一种无法AC,第二种可AC 摘要:```cpp //1.我百思不得其解为什么这个AC不了 //#include //#include //using namespace std; //int main(void) //{…… 题解列表 2021年12月24日 0 点赞 0 评论 873 浏览 评分:9.3
1131: C语言训练-斐波纳契数列 摘要:这里采用的是循环方案,也可以用递归。#include<bits/stdc++.h> using namespace std; int main(){ int n; cin …… 题解列表 2021年12月24日 0 点赞 0 评论 368 浏览 评分:0.0
2644: 烤干机 c++分治思想 摘要:解题思路:这道题第一眼会想到全排列或者优先队列毫无疑问这是错的,因为时间复杂度太高了所以我想的是分治算法(因为最近比较菜想了好久)int f[500002];定义数组 int a(即A),b(即B)首…… 题解列表 2021年12月24日 0 点赞 0 评论 585 浏览 评分:7.3
1688: 数据结构-字符串插入 摘要:#include<bits/stdc++.h> using namespace std; int main(){ string a,b; int n; cin >…… 题解列表 2021年12月23日 0 点赞 0 评论 490 浏览 评分:9.9