QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#88855 | #5004. Finalists | SorahISA | AC ✓ | 2ms | 3432kb | C++20 | 737b | 2023-03-17 19:41:38 | 2023-03-17 19:41:43 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
void solve() {
int C; cin >> C;
vector<tuple<int, string, int, int, int, int, int>> team(6);
for (auto &[sc, name, pt, pu, rt, ru, f] : team) {
cin >> name >> pt >> pu >> rt >> ru >> f;
sc = 56 * ru + 24 * rt + 14 * pu + 6 * pt + 3 * f;
}
sort(rbegin(team), rend(team));
for (int i = 0; i < 6; ++i) {
if (get<1>(team[i]) == "Taiwan") {
cout << min(get<5>(team[i]), C / 6 + (C % 6 > i)) << "\n";
}
}
}
int main() {
ios_base::sync_with_stdio(0), cin.tie(0);
int t = 1;
// cin >> t;
for (int i = 1; i <= t; ++i) {
solve();
}
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3432kb
input:
17 Japan 500 95 40 30 5 Vietnam 400 50 150 40 20 Indonesia 700 25 80 35 20 Taiwan 200 30 100 35 1 Korea 600 100 100 70 0 Philippines 50 10 40 15 15
output:
3
result:
ok single line: '3'
Test #2:
score: 0
Accepted
time: 2ms
memory: 3248kb
input:
16 Japan 500 95 40 30 5 Taiwan 200 30 100 35 1 Indonesia 700 25 80 35 20 Philippines 50 10 40 15 15 Korea 600 100 100 70 0 Vietnam 400 50 150 40 20
output:
2
result:
ok single line: '2'
Test #3:
score: 0
Accepted
time: 2ms
memory: 3300kb
input:
16 Vietnam 321 51 113 48 0 Indonesia 690 19 60 17 15 Korea 333 54 59 39 0 Japan 294 86 40 29 0 Taiwan 145 26 101 30 0 Philippines 29 26 50 30 4
output:
2
result:
ok single line: '2'
Test #4:
score: 0
Accepted
time: 2ms
memory: 3356kb
input:
17 Vietnam 321 51 113 48 0 Indonesia 690 19 60 17 15 Korea 333 54 59 39 0 Japan 294 86 40 29 0 Taiwan 145 26 101 30 0 Philippines 29 26 50 30 4
output:
3
result:
ok single line: '3'
Test #5:
score: 0
Accepted
time: 1ms
memory: 3432kb
input:
17 Japan 294 86 40 29 0 Philippines 145 26 101 30 0 Taiwan 29 26 50 30 4 Vietnam 321 51 113 48 0 Indonesia 690 19 60 17 15 Korea 333 54 59 39 0
output:
2
result:
ok single line: '2'