File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6464| 25 | | [ Baekjoon-17779 ๊ฒ๋ฆฌ๋งจ๋๋ง 2] ( ./src/Simulation/P17779 ) | |
6565| 26 | | [ Baekjoon-2564 ๊ฒฝ๋น์] ( ./src/Simulation/P2564 ) | |
6666| 27 | | [ Baekjoon-17144 ๋ฏธ์ธ๋จผ์ง ์๋
!] ( ./src/Simulation/P17144 ) | |
67- | 28 | | [ SWEA-5656 ๋ฒฝ๋ ๊นจ๊ธฐ] ( ./src/Simulation/swea5656 ) | |
67+ | 28 | โญ๏ธ | [ SWEA-5656 ๋ฒฝ๋ ๊นจ๊ธฐ] ( ./src/Simulation/swea5656 ) | |
6868
6969## String
7070
258258| # | โ | Problem | Note |
259259| :-: | :-: | :----------------------------------------- | :--- |
260260| 01 | | [ Programmers ๋ฒ ์คํธ์จ๋ฒ] ( ./src/Hash/prg42579 ) | |
261+ | 02 | | [ Baekjoon-1764 ๋ฃ๋ณด์ก] ( ./src/Hash/P1764 ) | |
261262
262263## Graph
263264
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