作者在 2020-03-12 07:43:21 发布以下内容
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; }