QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#275861#7879. Colorful Balloonskath#WA 1ms3420kbC++14348b2023-12-05 10:13:502023-12-05 10:13:51

Judging History

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

  • [2023-12-05 10:13:51]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3420kb
  • [2023-12-05 10:13:50]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;


int main()
{
    int n;cin>>n;
    map<string,int>mp;
    for(int i=0;i<n;i++)
    {
        string str;
        cin>>str;
        mp[str]++;
    }
    for(auto[str,cnt]:mp)
    {
        if(cnt>=n/2+(n&1))
        {
            cout<<str;
            return 0;
        }
    }
}

详细

Test #1:

score: 100
Accepted
time: 1ms
memory: 3412kb

input:

5
red
green
red
red
blue

output:

red

result:

ok "red"

Test #2:

score: -100
Wrong Answer
time: 0ms
memory: 3420kb

input:

3
red
blue
yellow

output:


result:

wrong answer Unexpected EOF in the participants output