Submission #168847


Source Code Expand

Copy
#include <iostream>
#include <algorithm>
#include <map>
#include <stack>
#include <string.h>
#include <queue>
#include <string>
#define MAX_N 100000
#define MOD 1000000007
using namespace std; 

int N;
map<string, int> m;
string str[50];

int main () {
	cin >> N;
	for(int i = 0; i < N; i++) { 
		cin >> str[i];
		m[str[i]]++;
	}
	int res = 0;
	for(int i = 0; i < N; i++) {
		res = max(res, m[str[i]]);
	}
	cout<< res << endl;
}

Submission Info

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

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 sample_01.txt, sample_02.txt, sample_03.txt
All 0 / 100 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 25 ms 804 KB
case_02.txt 24 ms 880 KB
case_03.txt 22 ms 736 KB
case_04.txt 21 ms 920 KB
case_05.txt 23 ms 920 KB
case_06.txt 22 ms 732 KB
case_07.txt 21 ms 924 KB
case_08.txt 22 ms 684 KB
case_09.txt 23 ms 916 KB
case_10.txt 23 ms 920 KB
case_11.txt 23 ms 912 KB
case_12.txt 21 ms 836 KB
case_13.txt 23 ms 916 KB
case_14.txt 24 ms 880 KB
case_15.txt 22 ms 732 KB
sample_01.txt 21 ms 920 KB
sample_02.txt 22 ms 924 KB
sample_03.txt 23 ms 868 KB