hihoCoder太阁最新面经算法竞赛10 register

Ended

Participants:138

Verdict:Accepted
Score:100 / 100
Submitted:2016-07-25 15:52:39

Lang:Java

Edit
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
import java.util.*;
import java.util.Map.Entry;
public class Main{
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        HashMap<StringInteger> map = new HashMap<>();
        for(int i = 0i < ni++){
            int m = in.nextInt();
            in.nextLine();
            HashSet<String> set = new HashSet<>();
            for(int j = 0j < mj++){
                String tmp = in.nextLine();
                String[] str = tmp.split(" ");
                String one = str[0+ str[2];
                if(!set.contains(one)){
                    set.add(one);
                    if(!map.containsKey(one))
                        map.put(one1);
                    else
                        map.put(onemap.get(one+ 1);
                }
            }
        }
        List<String> list = new ArrayList<>();
        for(Entry<StringInteger> entry : map.entrySet()){
            if(entry.getValue() == n)
                list.add(entry.getKey().substring(09));
        }
        Collections.sort(list);
        for(int i = 0i < list.size(); i++)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX