???为什么只有8分???

wcyq 愚かな人間 2024-01-28 14:43:21 2024-02-02 14:12:58 10

#include <bits/stdc++.h>

using namespace std;

int a[8], b[8], c[8], d[8];

int main() {

int t = 0;

for (int i = 1; i <= 7; i++) {

    freopen("unhappy.in", "r", stdin);

    cin >> a[i] >> b[i];

}

for (int i = 1; i <= 7; i++) {

    if (a[i] + b[i] > 8) {

        c[i] = a[i] + b[i];

        d[i] = i;

    }

}

for (int i = 1; i <= 7; i++) {

    if (c[t] < c[i])

        t = d[i];

}

freopen("unhappy.out", "w", stdout);

cout << t;

return 0;

}

{{ vote && vote.total.up }}