Submission #169306


Source Code Expand

Copy
#include <iostream>
#include <string>
#include <vector>
using namespace std;

int main(){
int n=0;
string tmp;
vector<string> name;
int count=0;
int cnt=0;
string hoge;

cin>>n;

for(int i=0;i<n;++i){
cin>>tmp;
name.push_back(tmp);
}

for(int i=0;i<n;++i){
count=0;
for(int j=i+1;j<n;++j){
if(name[i]==name[j]){
count++;
}
if(cnt<count-1){
cnt=count;
hoge=name[i];
}
}
}
cout<<hoge<<endl;
return 0;
}

Submission Info

Submission Time
Task B - 投票
User compositae
Language C++ (G++ 4.6.4)
Score 0
Code Size 434 Byte
Status
Exec Time 24 ms
Memory 924 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 100
Status
× 1
× 2
× 13
× 5
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All sample_01.txt, sample_02.txt, sample_03.txt, case_01.txt, case_02.txt, case_03.txt, case_04.txt, case_05.txt, case_06.txt, case_07.txt, case_08.txt, case_09.txt, case_10.txt, case_11.txt, case_12.txt, case_13.txt, case_14.txt, case_15.txt
Case Name Status Exec Time Memory
case_01.txt 21 ms 792 KB
case_02.txt 22 ms 808 KB
case_03.txt 23 ms 792 KB
case_04.txt 21 ms 796 KB
case_05.txt 21 ms 796 KB
case_06.txt 21 ms 924 KB
case_07.txt 22 ms 924 KB
case_08.txt 23 ms 796 KB
case_09.txt 20 ms 916 KB
case_10.txt 21 ms 924 KB
case_11.txt 21 ms 796 KB
case_12.txt 24 ms 916 KB
case_13.txt 23 ms 796 KB
case_14.txt 20 ms 792 KB
case_15.txt 22 ms 796 KB
sample_01.txt 22 ms 856 KB
sample_02.txt 21 ms 920 KB
sample_03.txt 22 ms 720 KB