您的位置:首页 > 教育 > 培训 > 东莞专业网站设计建站公司_东莞长安_天津seo技术教程_网站如何优化一个关键词

东莞专业网站设计建站公司_东莞长安_天津seo技术教程_网站如何优化一个关键词

2024/10/5 21:13:54 来源:https://blog.csdn.net/weixin_51503393/article/details/142407696  浏览:    关键词:东莞专业网站设计建站公司_东莞长安_天津seo技术教程_网站如何优化一个关键词
东莞专业网站设计建站公司_东莞长安_天津seo技术教程_网站如何优化一个关键词

202006-4 1246

32分解

#include <bits/stdc++.h>
using namespace std;
int main(){int n;string s;cin >> n >> s;string str1 = "1";for(int i = 0; i < n; i++){string str2 = "";for(int j = 0; j < str1.size(); j++){if(str1[j] == '1')str2 += '2';if(str1[j] == '2')str2 += '4';if(str1[j] == '4')str2 += "16";if(str1[j] == '6')str2 += "64";}str1 = str2;}int res = 0;int pos = 0;while(str1.find(s, pos) != -1){res++;pos = str1.find(s, pos) + 1;}cout << res;return 0;
}

202006-5 乔乔和牛牛逛超市

80分解

#include <bits/stdc++.h>
using namespace std;
int main(){int n, m;cin >> n >> m;int a[n][5], b[m][3];long long Max[n], res = 0;for(int i = 0; i < n; i++){for(int j = 0; j < 5; j++){cin >> a[i][j];}}for(int i = 0; i < n; i++){Max[i] = a[i][0] * a[i][0] * a[i][2] + a[i][0] * a[i][3] + a[i][4];for(int j = a[i][0]; j <= a[i][1]; j++){if(j * j * a[i][2] + j * a[i][3] + a[i][4] > Max[i]){Max[i] = j * j * a[i][2] + j * a[i][3] + a[i][4];}}}for(int i = 0; i< n;i++){res += Max[i];}cout << res;return 0;
}

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com