QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#800427 | #9807. Make Them Believe | ucup-team5008# | WA | 1ms | 3760kb | C++14 | 428b | 2024-12-06 10:33:20 | 2024-12-06 10:33:21 |
Judging History
answer
#include <cstdio>
#include <string>
int n;
char buf[4];
int main() {
int n = 8, win = 0, ru = 0;
std::string win_name, ru_name;
int val;
while (n--) {
scanf("%s%d", buf, &val);
std::string s(buf);
if (val > win) {
ru = win;
ru_name = win_name;
win = val;
win_name = s;
} else if (val > ru) {
ru = val;
ru_name = s;
}
}
printf("%s beats %s\n", win_name.c_str(), ru_name.c_str());
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3760kb
input:
LNG 55 WBG 65 HLE 70 BLG 75 TES 48 T1 80 GEN 60 FLY 50
output:
T1 beats BLG
result:
ok 3 tokens
Test #2:
score: 0
Accepted
time: 0ms
memory: 3756kb
input:
LNG 55 WBG 65 HLE 70 BLG 81 TES 48 T1 80 GEN 60 FLY 50
output:
BLG beats T1
result:
ok 3 tokens
Test #3:
score: -100
Wrong Answer
time: 1ms
memory: 3748kb
input:
P6 73 4 22 UN 84 Q 55 J 68 QR8 18 W 27 9J7 1
output:
UN beats P6
result:
wrong answer 3rd words differ - expected: 'J', found: 'P6'