题解列表

筛选

注意时间要求

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int ti[501];//n个人打水的时间,下标从1开始int   wat[100……

用string类直接秒了

摘要:```cpp #include #include using namespace std; int main() { string str; cin >> str; ……

反复使用sort函数

摘要:解题思路:反复使用sort函数注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int pa[101];int main(){   int n;……

3039: 分成互质组(递归)

摘要:解题思路:建立数组v记录组别, 遍历每一个数字, 分别和当前组别每一个数字判断是否有大于1的公约数, 如果没有,在v数组中标记该数字的组别, 如果有有, 递归下一个组别, 如果当前组别比 最大组别大,……

简单的贪心题

摘要:解题思路:     网站指定是贪心算法,那就是最简单的类似背包题目。先从最大面值的钱开始尝试注意事项:  参考代码:#include<bits/stdc++.h>using namespace std……

黑白棋子的移动(C++)

摘要:解题思路:注意事项:参考代码:#include <iostream>#include <iomanip>using namespace std;int n, rt, step = 0;char a[1……

[编程入门]完数的判断

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){    int N,i,j,sum=0,flag=0;    cin >……