intmain(){ int n = 1; for (int i = 1; i <= MAX_N; i++) { if (i & 1) { // 奇数的情况 for (int x = i, y = 1; x >= 1 && y <= i; x--, y++) { f[x][y] = n++; } } else { for (int x = 1, y = i; x <= i && y >= 1; x++, y--) { f[x][y] = n++; } } }
for (int i = 1; i <= 20; i++) { for (int j = 1; j <= 20; j++) { cout << f[i][j] << " "; } cout << endl; } return0; }
intmain(){ int n; int E = 0, G = 0; cin >> n; for (int i = 0; i < n; i++) { int t; cin >> t; if (t > 60) G++; if (t > 85) E++; } int t = E * 100.0 / n + 0.5; int t1 = G * 100.0 / n + 0.5; printf("%d%%\n%d%%", t1, t); return0; }