QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#275860 | #7879. Colorful Balloons | kath# | WA | 0ms | 3820kb | C++14 | 341b | 2023-12-05 10:13:06 | 2023-12-05 10:13:06 |
Judging History
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)
{
cout<<str;
return 0;
}
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3752kb
input:
5 red green red red blue
output:
red
result:
ok "red"
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 3820kb
input:
3 red blue yellow
output:
result:
wrong answer Unexpected EOF in the participants output