CSES - HIIT Open 2018 - Results
Submission details
Task:Alien Invasion
Sender:El Numero Uno
Submission time:2018-05-26 15:47:11 +0300
Language:Java
Status:READY
Result:
Test results
testverdicttime
#10.23 sdetails
#20.22 sdetails
#30.24 sdetails
#40.22 sdetails
#50.24 sdetails
#60.27 sdetails
#70.28 sdetails
#80.24 sdetails
#90.24 sdetails
#100.24 sdetails
#110.26 sdetails
#120.22 sdetails
#130.21 sdetails
#140.21 sdetails
#150.23 sdetails
#160.22 sdetails
#170.26 sdetails
#180.25 sdetails
#190.24 sdetails
#200.25 sdetails
#210.21 sdetails
#220.22 sdetails

Code

import java.util.*;

public class d {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String s;
		
		int c = Integer.parseInt(in.nextLine());
		for (int i = 0; i < c; i++) {
			Map<String, Integer> d = new HashMap<>();
			int k = Integer.parseInt(in.nextLine().split(" ")[1]);
			for (int j = 0; j < k; j++) {
				s = in.nextLine();
				if (d.containsKey(s)) d.put(s, d.get(s) + 1);
				else d.put(s, 1);
			}
			System.out.println(d.values().stream().max(Comparator.naturalOrder()).get());
		}
		
	
		
		
	}
	
}

Test details

Test 1

Verdict:

input
1

correct output
odd

user output
(empty)

Error:
Exception in thread "main" java.util.NoSuchElementException: No line found
	at java.base/java.util.Scanner.nextLine(Scanner.java:1651)
	at d.main(d.java:13)

Test 2

Verdict:

input
2

correct output
even

user output
(empty)

Error:
Exception in thread "main" java.util.NoSuchElementException: No line found
	at java.base/java.util.Scanner.nextLine(Scanner.java:1651)
	at d.main(d.java:13)

Test 3

Verdict:

input
3

correct output
even

user output
(empty)

Error:
Exception in thread "main" java.util.NoSuchElementException: No line found
	at java.base/java.util.Scanner.nextLine(Scanner.java:1651)
	at d.main(d.java:13)

Test 4

Verdict:

input
4

correct output
odd

user output
(empty)

Error:
Exception in thread "main" java.util.NoSuchElementException: No line found
	at java.base/java.util.Scanner.nextLine(Scanner.java:1651)
	at d.main(d.java:13)

Test 5

Verdict:

input
5

correct output
even

user output
(empty)

Error:
Exception in thread "main" java.util.NoSuchElementException: No line found
	at java.base/java.util.Scanner.nextLine(Scanner.java:1651)
	at d.main(d.java:13)

Test 6

Verdict:

input
6

correct output
even

user output
(empty)

Error:
Exception in thread "main" java.util.NoSuchElementException: No line found
	at java.base/java.util.Scanner.nextLine(Scanner.java:1651)
	at d.main(d.java:13)

Test 7

Verdict:

input
7

correct output
even

user output
(empty)

Error:
Exception in thread "main" java.util.NoSuchElementException: No line found
	at java.base/java.util.Scanner.nextLine(Scanner.java:1651)
	at d.main(d.java:13)

Test 8

Verdict:

input
8

correct output
even

user output
(empty)

Error:
Exception in thread "main" java.util.NoSuchElementException: No line found
	at java.base/java.util.Scanner.nextLine(Scanner.java:1651)
	at d.main(d.java:13)

Test 9

Verdict:

input
9

correct output
odd

user output
(empty)

Error:
Exception in thread "main" java.util.NoSuchElementException: No line found
	at java.base/java.util.Scanner.nextLine(Scanner.java:1651)
	at d.main(d.java:13)

Test 10

Verdict:

input
10

correct output
even

user output
(empty)

Error:
Exception in thread "main" java.util.NoSuchElementException: No line found
	at java.base/java.util.Scanner.nextLine(Scanner.java:1651)
	at d.main(d.java:13)

Test 11

Verdict:

input
11

correct output
even

user output
(empty)

Error:
Exception in thread "main" java.util.NoSuchElementException: No line found
	at java.base/java.util.Scanner.nextLine(Scanner.java:1651)
	at d.main(d.java:13)

Test 12

Verdict:

input
12

correct output
even

user output
(empty)

Error:
Exception in thread "main" java.util.NoSuchElementException: No line found
	at java.base/java.util.Scanner.nextLine(Scanner.java:1651)
	at d.main(d.java:13)

Test 13

Verdict:

input
13

correct output
even

user output
(empty)

Error:
Exception in thread "main" java.util.NoSuchElementException: No line found
	at java.base/java.util.Scanner.nextLine(Scanner.java:1651)
	at d.main(d.java:13)

Test 14

Verdict:

input
14

correct output
even

user output
(empty)

Error:
Exception in thread "main" java.util.NoSuchElementException: No line found
	at java.base/java.util.Scanner.nextLine(Scanner.java:1651)
	at d.main(d.java:13)

Test 15

Verdict:

input
15

correct output
even

user output
(empty)

Error:
Exception in thread "main" java.util.NoSuchElementException: No line found
	at java.base/java.util.Scanner.nextLine(Scanner.java:1651)
	at d.main(d.java:13)

Test 16

Verdict:

input
16

correct output
odd

user output
(empty)

Error:
Exception in thread "main" java.util.NoSuchElementException: No line found
	at java.base/java.util.Scanner.nextLine(Scanner.java:1651)
	at d.main(d.java:13)

Test 17

Verdict:

input
17

correct output
even

user output
(empty)

Error:
Exception in thread "main" java.util.NoSuchElementException: No line found
	at java.base/java.util.Scanner.nextLine(Scanner.java:1651)
	at d.main(d.java:13)

Test 18

Verdict:

input
18

correct output
even

user output
(empty)

Error:
Exception in thread "main" java.util.NoSuchElementException: No line found
	at java.base/java.util.Scanner.nextLine(Scanner.java:1651)
	at d.main(d.java:13)

Test 19

Verdict:

input
19

correct output
even

user output
(empty)

Error:
Exception in thread "main" java.util.NoSuchElementException: No line found
	at java.base/java.util.Scanner.nextLine(Scanner.java:1651)
	at d.main(d.java:13)

Test 20

Verdict:

input
999999874000003969

correct output
odd

user output
(empty)

Error:
Exception in thread "main" java.lang.NumberFormatException: For input string: "999999874000003969"
	at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.base/java.lang.Integer.parseInt(Integer.java:652)
	at java.base/java.lang.Integer.parseInt(Integer.java:770)
	at d.main(d.java:10)

Test 21

Verdict:

input
999999999999999989

correct output
even

user output
(empty)

Error:
Exception in thread "main" java.lang.NumberFormatException: For input string: "999999999999999989"
	at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.base/java.lang.Integer.parseInt(Integer.java:652)
	at java.base/java.lang.Integer.parseInt(Integer.java:770)
	at d.main(d.java:10)

Test 22

Verdict:

input
1000000000000000000

correct output
odd

user output
(empty)

Error:
Exception in thread "main" java.lang.NumberFormatException: For input string: "1000000000000000000"
	at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.base/java.lang.Integer.parseInt(Integer.java:652)
	at java.base/java.lang.Integer.parseInt(Integer.java:770)
	at d.main(d.java:10)