题解列表

筛选

利用C++来编写求和训练

摘要:解题思路:注意事项:参考代码:#include<iostream>#include<math.h> using namespace std;int a,b,c;int sumOfa(int a);lo……

c++编写字符串分类统计

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(void){ int num=0,space=0,word=0,other=……

题解 2772: 苹果和虫子

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

新手,看大佬思路写的

摘要:解题思路:枚举各个瓜情况有三种:不买当前瓜买当前瓜但不劈买当前瓜劈由于n<=30,3^30肯定超时间,所以要用折半搜索然后用hash表存前面的贡献,同时劈瓜时可能出现浮点数,可以把瓜重×2,目标值×2……

2821: 开关灯

摘要:``` #include using namespace std; int l[5001],m,n; int main() { cin>>n>>m; for( int i=2; i……

暴力搜索 dfs

摘要:解题思路:用1~9的排列的方法 ,在排列时进行判断是否可以 注意事项:参考代码:#include<bits/stdc++.h> using namespace std; class plane{ ……

3000: 交换值

摘要:解题思路:cin输入cout调换个顺序 很简单注意事项:给个五星吧 求求了参考代码:#include <bits/stdc++.h>using namespace std;int main(){   ……

计算(a+b)*c的值(C++)

摘要:解题思路:用cin输入a,b,c 再用cout输出(a+b)*c学废了吗?注意事项:给孩子一个五星吧 求求了参考代码:#include <bits/stdc++.h>using namespace s……