题解列表

筛选

1129: C语言训练-排序问题<2>

摘要:降序排序,只需要给 sort 函数加第三个参数。#include<bits/stdc++.h> using namespace std; bool cmp(int a,int b){    ……

1128: C语言训练-排序问题<1>

摘要:现成的 sort() 函数往上拍就完事儿了。#include<bits/stdc++.h> using namespace std;   int main(){     vector<int>……

1114: C语言考试练习题_排列

摘要:无脑打印,没想到什么更好的解决办法。(文章先收藏了以后看看)#include<bits/stdc++.h> using namespace std;   int main(){     vec……

使用递归解决这道题目

摘要:解题思路:使用递归解决这道题 非常easy注意事项:理解递归参考代码:#include<iostream>#include<string>using namespace std;string  f(i……

使用函数的定义和调用

摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int x=0,y;void cst();/* run this program using……

【出圈】-另类简单解法

摘要:解题思路:   在数组中将所有人从1到n编号,报数到的第b个人出圈(对其赋大值然后sort),始终在n+1-b个人中报数参考代码:  1     #include<iostream>……