File tree 4 files changed +47
-1
lines changed
4 files changed +47
-1
lines changed Original file line number Diff line number Diff line change 64
64
| 25 | | [ Baekjoon-17779 게리맨더링 2] ( ./src/Simulation/P17779 ) | |
65
65
| 26 | | [ Baekjoon-2564 경비원] ( ./src/Simulation/P2564 ) | |
66
66
| 27 | | [ Baekjoon-17144 미세먼지 안녕!] ( ./src/Simulation/P17144 ) | |
67
- | 28 | | [ SWEA-5656 벽돌 깨기] ( ./src/Simulation/swea5656 ) | |
67
+ | 28 | ⭐️ | [ SWEA-5656 벽돌 깨기] ( ./src/Simulation/swea5656 ) | |
68
68
69
69
## String
70
70
258
258
| # | ☆ | Problem | Note |
259
259
| :-: | :-: | :----------------------------------------- | :--- |
260
260
| 01 | | [ Programmers 베스트앨범] ( ./src/Hash/prg42579 ) | |
261
+ | 02 | | [ Baekjoon-1764 듣보잡] ( ./src/Hash/P1764 ) | |
261
262
262
263
## Graph
263
264
Original file line number Diff line number Diff line change
1
+ package Hash .P1764 ;
2
+
3
+ import java .io .*;
4
+ import java .util .*;
5
+
6
+ public class Main {
7
+
8
+ static int N , M ;
9
+ static HashMap <String , Integer > map = new HashMap <>();
10
+ static List <String > list = new ArrayList <>();
11
+
12
+ public static void main (String [] args ) throws Exception {
13
+ System .setIn (new FileInputStream ("src/Hash/P1764/input.txt" ));
14
+ BufferedReader br = new BufferedReader (new InputStreamReader (System .in ));
15
+ StringTokenizer st = new StringTokenizer (br .readLine ());
16
+
17
+ N = Integer .parseInt (st .nextToken ());
18
+ M = Integer .parseInt (st .nextToken ());
19
+
20
+ for (int i = 0 ; i < N +M ; i ++) {
21
+ map .merge (br .readLine (), 1 , Integer ::sum );
22
+ }
23
+
24
+ map .forEach ((key , value ) -> {
25
+ if (value == 2 ) list .add (key );
26
+ });
27
+
28
+ list .sort (String ::compareTo );
29
+ System .out .println (list .size ());
30
+ for (String s : list ) System .out .println (s );
31
+ }
32
+ }
Original file line number Diff line number Diff line change
1
+ ## [ baekjoon-1764] 듣보잡
2
+
3
+ ![ image] ( https://user-images.githubusercontent.com/22045163/115133913-acab6280-a046-11eb-89ff-4b14483bb6c0.png )
4
+
5
+ ![ image] ( https://user-images.githubusercontent.com/22045163/115133921-b339da00-a046-11eb-8473-6d78f9918321.png )
Original file line number Diff line number Diff line change
1
+ 3 4
2
+ ohhenrie
3
+ charlie
4
+ baesangwook
5
+ obama
6
+ baesangwook
7
+ ohhenrie
8
+ clinton
You can’t perform that action at this time.
0 commit comments