QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#784078#9807. Make Them Believeucup-team059#WA 0ms3636kbC++20417b2024-11-26 13:09:062024-11-26 13:09:12

Judging History

你现在查看的是最新测评结果

  • [2024-11-26 13:09:12]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3636kb
  • [2024-11-26 13:09:06]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

using i32 = int32_t;

int main(){
	int n = 8;

	vector<string> s(n);
	vector<int> t(n);
	for(int i = 0; i < n; i ++) {
		cin >> s[i] >> t[i];
	}

	vector<int> rank(n);
	iota(rank.begin(), rank.end(), 0);
	ranges::sort(rank, [&](int x, int y) -> bool {
		if(t[x] != t[y]) return t[x] > t[y];
	});
	cout << s[rank[0]] << " beats " <<  s[rank[1]];

}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3592kb

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: 3596kb

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: 3636kb

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'