Added 26 solutions
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
// Author: Rodney Shaghoulian
|
||||
// Github: github.com/rshaghoulian
|
||||
// HackerRank: hackerrank.com/rshaghoulian
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
import java.text.*;
|
||||
import java.math.*;
|
||||
import java.util.regex.*;
|
||||
|
||||
public class Solution {
|
||||
|
||||
public static void main(String[] args) {
|
||||
Scanner s = new Scanner(System.in);
|
||||
int t = s.nextInt();
|
||||
String [] pair_left = new String[t];
|
||||
String [] pair_right = new String[t];
|
||||
|
||||
for (int i = 0; i < t; i++) {
|
||||
pair_left[i] = s.next();
|
||||
pair_right[i] = s.next();
|
||||
}
|
||||
s.close();
|
||||
|
||||
HashSet<String> set = new HashSet<>(t);
|
||||
for (int i = 0; i < t; i++) {
|
||||
set.add(pair_left[i] + " " + pair_right[i]);
|
||||
System.out.println(set.size());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user