数学思想讨论问题,dfs(当前选择哪个火箭发射,上一个火箭降落完毕时间,这是第几个发射的火箭),分三种情况,思路可以很清晰,时间复杂度o(n2n!)10的8次方,应该是完全可以的,不过还可以优化,毕竟 摘要:思路就是标题,代码上传格式比较奇怪,随便看看参考代码:#include <bits/stdc++.h>using namespace std;const int N=20;int T,n,ans;in…… 题解列表 2024年01月24日 0 点赞 0 评论 979 浏览 评分:8.7
编程入门 选择排序(C++) 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<vector>#include<algorithm>using namespace std;/* 选择排序 */vo…… 题解列表 2024年01月24日 0 点赞 0 评论 460 浏览 评分:0.0
自定义函数之整数处理 解题思路:先用数组拿到10个数找出10个数中的最大值与最小值把最大值与最小值的值和下标存储起来与第一个数和最后一个数交换即可注意事项:要注意的是,此题为交换第一个数和最小值,交换最后一个数和最大值,并不是排序参考代码:#includeusingnamespacestd;voiddf 题解列表 2024年01月23日 0 点赞 0 评论 492 浏览 评分:0.0
2925: 单词排序 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h> using namespace std; struct u { char str[50]; st…… 题解列表 2024年01月23日 0 点赞 1 评论 396 浏览 评分:6.0
string字符串的运用 摘要:解题思路:用c++中的string容器存储字符串求出数字和ans,并取余数将余数转城字符类型: int转char:char=int+'0' …… 题解列表 2024年01月23日 0 点赞 0 评论 543 浏览 评分:9.9
1009: [编程入门]数字的处理与判断 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int num = 0; cin >> num; s…… 题解列表 2024年01月23日 0 点赞 0 评论 743 浏览 评分:0.0
#include <iostream> #include <set> using namespace std; int main() { int n 摘要:解题思路:注意事项:参考代码:#include <iostream>#include <set>using namespace std;int main(){ int n; cin >> …… 题解列表 2024年01月23日 0 点赞 0 评论 333 浏览 评分:0.0
C++1045,小白题解。简单易懂。会简单for循环与函数就能看懂。 解题思路:利用for循环,算出所输入的数字里面的最大值与最小值,最后将其与其他数字更换位置即可。注意事项:当我们找到最大值最小值时,应该知道这个数值在数组的哪一个位置,这样有利于后续的更换位置。参考代码:#include#includeusingnamespac 题解列表 2024年01月22日 0 点赞 0 评论 609 浏览 评分:0.0
1112: C语言考试练习题_一元二次方程 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int a,b,c; cin>>a>>b>>c;…… 题解列表 2024年01月22日 0 点赞 0 评论 554 浏览 评分:0.0
2774: 计算三角形面积 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ double x1,y1,x2,y2,x3,y3,a…… 题解列表 2024年01月22日 0 点赞 0 评论 454 浏览 评分:0.0