您的位置:首页 > 文旅 > 旅游 > 中国风ppt模板免费下载_公司官网备案流程_济南网站建设方案_网络推广外包业务销售

中国风ppt模板免费下载_公司官网备案流程_济南网站建设方案_网络推广外包业务销售

2025/2/24 16:07:34 来源:https://blog.csdn.net/2401_88089822/article/details/145816632  浏览:    关键词:中国风ppt模板免费下载_公司官网备案流程_济南网站建设方案_网络推广外包业务销售
中国风ppt模板免费下载_公司官网备案流程_济南网站建设方案_网络推广外包业务销售

#include<iostream>
using namespace std;
int main() {int n, na, nb;cin >> n >> na >> nb;int a[200] = { 0 };int b[200] = { 0 };for (int i = 0; i < na; i++) {cin >> a[i];}for (int i = 0; i < nb; i++) {cin >> b[i];}int ca = 0;int cb = 0;int i = 0;int j = 0;while(n--){if (i >= na)i = 0;if (j >= nb)j = 0;//赢:ca++;//输:cb++;int x = a[i];int y = b[j];if (x == 0) {if (y == 1) cb++;else if (y == 2)ca++;else if (y == 3)ca++;else if (y == 4)cb++;}else if (x == 1) {if (y == 0) ca++;else if (y == 2)cb++;else if (y == 3)ca++;else if (y == 4)cb++;}else if (x == 2) {if (y == 0) cb++;else if (y == 1)ca++;else if (y == 3)cb++;else if (y == 4)ca++;}else if (x == 3) {if (y == 0) cb++;else if (y == 1)cb++;else if (y == 2)ca++;else if (y == 4)ca++;}else if (x == 4) {if (y == 0) ca++;else if (y == 1)ca++;else if (y == 2)cb++;else if (y == 3)cb++;}i++;j++;}cout << ca << " " << cb << endl;return 0;
}

版权声明:

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

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