Submission #169010


Source Code Expand

Copy
function Main(input) {
	input = input.split("\n");
	var x =[];
	var m = 1;
	var c ;
	for(var i=input[0];i>0;i--){
		if(x[input[i]] ===undefined){
			x[input[i]] = 1
		}else{
			x[input[i]] += 1;
			if(x[input[i]] > m){
				m = x[input[i]];
				c = input[i];
			}
 		}
	}
	console.log(c);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));

Submission Info

Submission Time
Task B - 投票
User putrat
Language JavaScript (Node.js 0.6.12)
Score 0
Code Size 363 Byte
Status
Exec Time 718 ms
Memory 11160 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 100
Status
× 2
× 1
× 15
× 3
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 718 ms 11048 KB
case_02.txt 176 ms 10996 KB
case_03.txt 170 ms 11012 KB
case_04.txt 174 ms 11160 KB
case_05.txt 171 ms 10992 KB
case_06.txt 172 ms 10996 KB
case_07.txt 178 ms 11132 KB
case_08.txt 172 ms 11120 KB
case_09.txt 168 ms 10996 KB
case_10.txt 170 ms 11012 KB
case_11.txt 181 ms 10872 KB
case_12.txt 177 ms 10996 KB
case_13.txt 188 ms 11000 KB
case_14.txt 174 ms 11124 KB
case_15.txt 180 ms 10872 KB
sample_01.txt 177 ms 10864 KB
sample_02.txt 179 ms 11008 KB
sample_03.txt 185 ms 10872 KB