题解列表

筛选

使用递归解决这道题目

摘要:解题思路:使用递归解决这道题 非常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>……

盾神与积木游戏 结构体与优先队列

摘要: #### 利用优先队列的自动排序,将每个人按照需要的积木数量排序,在获取数据时若持有数大于目标数则不将其塞进优先队列里面。 ##### 用while循环判断遍历优先队列里面的最小所需数是否小于总……

字符串解题,代码简短简单

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){    string str;    getline(cin,……

不需要数组,简单运算

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){    int a=0 , n=0 , m=0;    flo……