题解列表

筛选

2901: 查找特定的值

摘要:```#include using namespace std; int n,x,N[100000]; int main(){ cin>>n; for( int i=1;i>N[i];……

答案之中的答案

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

c++ 边乘边加

摘要:#include<iostream> using namespace std; int a[1000],b[1000]; void cheng(int a[],int c) { int j……

利用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……