- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsolution.java
More file actions
Latest commit
29 lines (24 loc) · 738 Bytes
/
Copy pathsolution.java
File metadata and controls
29 lines (24 loc) · 738 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
25
26
27
28
29
// https://github.com/Utkarsh299-tech
importjava.io.*;
importjava.util.*;
importjava.text.*;
importjava.math.*;
importjava.util.regex.*;
publicclassSolution {
publicstaticvoidmain(String[] args) {
Scanners = newScanner(System.in);
intt = s.nextInt();
String [] pair_left = newString[t];
String [] pair_right = newString[t];
for (inti = 0; i < t; i++) {
pair_left[i] = s.next();
pair_right[i] = s.next();
}
s.close();
HashSet<String> set = newHashSet<>(t);
for(inti = 0; i < t; i++) {
set.add(pair_left[i] + " " + pair_right[i]);
System.out.println(set.size());
}
}
}