1. 首页
  2. 技术
  3. 后台

C++=》最好吃月饼

void 最好吃月饼()
{
	int aa[100][1000]{{ 1001, 992, 0, 233, 6 }, { 8, 0, 2018, 0, 2008 }, { 36, 18, 0, 1024, 4 }},
		he = 0, da = 0, x = 3, y = 5, j = 0, jj = 0;
	bool k = false;
	//cin >> x >> y;
	//while (x > jj)if (y > j)cin >> aa[jj][j++]; else j = 0, ++jj;
	while (y > jj)if (x > j)he += aa[j++][jj]; else j = 0, aa[x][jj] = he, ++jj, da = (he > da ? he : da), he = 0;
	cout << da << endl;
	while (y > j)if (aa[x][j++] == da) (k ? cout << ends : cout << flush), cout << j, k = true;
}

无标题.png (上传于2020-03-12 07:43:21)


C++=》最好吃月饼

原创文章,作者:xianfajushi的博客,如若转载,请注明出处:https://www.zengqueling.com/c%e3%80%8b%e6%9c%80%e5%a5%bd%e5%90%83%e6%9c%88%e9%a5%bc/

联系我们

15602395067

在线咨询:点击这里给我发消息

邮件:eden7@qq.com

工作时间:周一至周五,9:30-18:30,节假日休息

QR code