QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#629435#7879. Colorful BalloonsciyekuaWA 17ms3800kbC++23307b2024-10-11 11:37:222024-10-11 11:37:23

Judging History

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

  • [2024-10-11 11:37:23]
  • 评测
  • 测评结果:WA
  • 用时:17ms
  • 内存:3800kb
  • [2024-10-11 11:37:22]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
int main() {
    int n;
    map<string,int> mp;
    string s1;
    cin>>n;
    for(int i=0;i<n;i++) {
        cin>>s1;
        mp[s1]++;
    }
    if(mp.rbegin()->second*2>n) cout<<mp.rbegin()->first<<"\n";
    else cout<<"uh-oh\n";
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

5
red
green
red
red
blue

output:

red

result:

ok "red"

Test #2:

score: 0
Accepted
time: 0ms
memory: 3604kb

input:

3
red
blue
yellow

output:

uh-oh

result:

ok "uh-oh"

Test #3:

score: 0
Accepted
time: 0ms
memory: 3800kb

input:

1
abc

output:

abc

result:

ok "abc"

Test #4:

score: -100
Wrong Answer
time: 17ms
memory: 3760kb

input:

100000
vagsmrnnry
vagsmrnnry
bvaojtyvmn
vagsmrnnry
vagsmrnnry
vvzrbrqrgb
vagsmrnnry
vvzrbrqrgb
vagsmrnnry
vagsmrnnry
bvaojtyvmn
vagsmrnnry
vagsmrnnry
vvzrbrqrgb
vagsmrnnry
bvaojtyvmn
vagsmrnnry
vagsmrnnry
vagsmrnnry
vvzrbrqrgb
vagsmrnnry
vvzrbrqrgb
vagsmrnnry
vagsmrnnry
vagsmrnnry
vagsmrnnry
vagsmrn...

output:

uh-oh

result:

wrong answer 1st words differ - expected: 'vagsmrnnry', found: 'uh-oh'