-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjudging.java
More file actions
24 lines (24 loc) · 895 Bytes
/
judging.java
File metadata and controls
24 lines (24 loc) · 895 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import java.io.*;
import java.util.*;
public class judging {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
PrintWriter pw = new PrintWriter(System.out);
int size = Integer.parseInt(br.readLine());
int x = 0, y = 0, z = 0;
for (int i = 0; i < size; i++) {
String line = br.readLine();
if (line.equals("correct")) { x++; }
else if (line.equals("wronganswer")) { y++; }
else { z++; }
}
for (int i = 0; i < size; i++) {
String line = br.readLine();
if (line.equals("correct")) { if (x > 0) x--; }
else if (line.equals("wronganswer")) { if (y > 0) y--; }
else { if (z > 0) z--; }
}
pw.println(5 - x - y - z);
pw.flush();
}
}