C++=》最好吃月饼

默认分类 | 2020-03-12 07:43:21 | 阅读 427 次 | 评论(0)


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)
无标题.png

文章评论,共0条
游客请输入验证码
最新评论