QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#629438#7879. Colorful BalloonsciyekuaWA 20ms3800kbC++23307b2024-10-11 11:41:402024-10-11 11:41:41

Judging History

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

  • [2024-10-11 11:41:41]
  • 评测
  • 测评结果:WA
  • 用时:20ms
  • 内存:3800kb
  • [2024-10-11 11:41:40]
  • 提交

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>n/2) 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: 3476kb

input:

5
red
green
red
red
blue

output:

red

result:

ok "red"

Test #2:

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

input:

3
red
blue
yellow

output:

uh-oh

result:

ok "uh-oh"

Test #3:

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

input:

1
abc

output:

abc

result:

ok "abc"

Test #4:

score: -100
Wrong Answer
time: 20ms
memory: 3536kb

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'