#include <bits/stdc++.h>
using namespace std;
string s[100], ans[100];
long long v[100], u[100], n, w, sum = 0, it = 1;
int main() {
cin >> n >> w;
for (int i = 1; i <= n; i++) {
cin >> s[i] >> u[i] >> v[i];
if (u[i] > 0) {
sum += u[i];
ans[it] = s[i];
it++;
}
}
cout << sum << endl;
for (int i = 1; i < it; i++) cout << ans[i] << endl;
return 0;
}
9021-01
最新推荐文章于 2024-09-02 08:30:00 发布