### 用结构体他不香吗?
```cpp
#include <bits/stdc++.h>
using namespace std;
struct S
{
int a, b, all, day;
}l[9];
bool cmp(S a, S b) {
if (a.all > b.all) return true;
if (a.all < b.all) return false;
return a.day < b.day;
}
int main() {
for (int i = 1;i <= 7;i++) {
cin >> l[i].a >> l[i].b;
l[i].all = l[i].a + l[i].b;
l[i].day = i;
}
sort(l + 1, l + 8, cmp);
if (l[1].all > 8) cout << l[1].day << endl;
else cout << "0" << endl;
return 0;
}
```
祝你 $AK$ $IOI$
by cyx012113 @ 2024-03-27 13:14:26
@[cyx012113](/user/1099138) 受教了,感谢:)
by RJwuji66 @ 2024-03-27 19:59:40
@[RJwuji66](/user/1271458) 不用谢!
by cyx012113 @ 2024-03-27 21:52:18