QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#794837 | #9807. Make Them Believe | ucup-team2112# | WA | 0ms | 3864kb | C++14 | 1.6kb | 2024-11-30 16:21:07 | 2024-11-30 16:21:08 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
char c[5];
int a[10],b[10];
void Get(int x) {
if (x == 0) {
printf("LNG");
}
if (x == 1) {
printf("WBG");
}
if (x == 2) {
printf("HLE");
}
if (x == 3) {
printf("BLG");
}
if (x == 4) {
printf("TES");
}
if (x == 5) {
printf("T1");
}
if (x == 6) {
printf("GEN");
}
if (x == 7) {
printf("FLY");
}
}
int main() {
for (int i=0;i<8;i++) {
scanf("%s",c);
if (c[0]=='L') {
scanf("%d",&a[0]);
}
if (c[0]=='W') {
scanf("%d",&a[1]);
}
if (c[0]=='H') {
scanf("%d",&a[2]);
}
if (c[0]=='B') {
scanf("%d",&a[3]);
}
if (c[0]=='T' && c[1]=='E') {
scanf("%d",&a[4]);
}
if (c[0]=='T'&&c[1]=='1') {
scanf("%d",&a[5]);
}
if (c[0]=='G') {
scanf("%d",&a[6]);
}
if (c[0]=='F') {
scanf("%d",&a[7]);
}
}
for (int i=0;i<8;i++) b[i]=i;
for (int i=0;i<8;i+=2) {
if (a[b[i]] < a[b[i+1]]) b[i]=b[i+1];
}
for (int i=0;i<8;i+=4) {
if (a[b[i]] < a[b[i+2]]) b[i]=b[i+2];
}
if (a[b[0]]<a[b[5]]) {
Get(b[5]);
printf(" beats ");
Get(b[0]);
}
else {
Get(b[0]);
printf(" beats ");
Get(b[5]);
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3864kb
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: 3860kb
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: 0ms
memory: 3780kb
input:
P6 73 4 22 UN 84 Q 55 J 68 QR8 18 W 27 9J7 1
output:
LNG beats T1
result:
wrong answer 1st words differ - expected: 'UN', found: 'LNG'