-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path416AER.java
34 lines (33 loc) · 1.08 KB
/
416AER.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import java.util.Scanner;
public class unit {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int casos = sc.nextInt();
String fecha;
boolean done = false;
int tabla[][];
while (casos != 0) {
tabla = new int[13][32];
for (int i = 0; i < casos; i++) {
fecha = sc.next();
String[] strArray = fecha.split("/");
int[] intArray = new int[strArray.length];
for (int j = 0; j < strArray.length; j++) {
intArray[j] = Integer.parseInt(strArray[j]);
}
tabla[intArray[1]][intArray[0]]++;
if (tabla[intArray[1]][intArray[0]] >= 2) {
done = true;
//break;
}
}
if (done) {
System.out.print("SI\n");
} else {
System.out.print("NO\n");
}
done = false;
casos = sc.nextInt();
}
}
}