From 10c50517dd07f12ec47461cc5328531d74310fab Mon Sep 17 00:00:00 2001 From: Yujiseul <98597009+Yujiseul@users.noreply.github.com> Date: Thu, 2 Jun 2022 19:45:04 +0900 Subject: [PATCH 1/3] =?UTF-8?q?0602=5Fsolve:lv1=ED=8F=B0=EC=BC=93=EB=AA=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...5\217\260\354\274\223\353\252\254_yu.java" | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 "0602/Programmers/Lv1/\355\217\260\354\274\223\353\252\254_yu.java" diff --git "a/0602/Programmers/Lv1/\355\217\260\354\274\223\353\252\254_yu.java" "b/0602/Programmers/Lv1/\355\217\260\354\274\223\353\252\254_yu.java" new file mode 100644 index 0000000..7f7498e --- /dev/null +++ "b/0602/Programmers/Lv1/\355\217\260\354\274\223\353\252\254_yu.java" @@ -0,0 +1,26 @@ +import java.util.HashSet; + +public class lv1_폰켓몬 { + public static void main(String[] args) { + int[] nums = {3,3,3,2,2,2}; + int answer = 0; + // + + int n = nums.length; + + HashSet mon = new HashSet<>(); + + for(int i=0; in/2) { + answer = n/2; + }else { + answer = mon.size(); + } + + System.out.println(answer); + } + +} From c58acbaf6036291cd0bfbea18dde90d5a3cec7ee Mon Sep 17 00:00:00 2001 From: Yujiseul <98597009+Yujiseul@users.noreply.github.com> Date: Thu, 2 Jun 2022 19:45:37 +0900 Subject: [PATCH 2/3] =?UTF-8?q?0602=5Fsolve:lv1=EC=98=88=EC=82=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Lv1/\354\230\210\354\202\260_yu.java" | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 "0602/Programmers/Lv1/\354\230\210\354\202\260_yu.java" diff --git "a/0602/Programmers/Lv1/\354\230\210\354\202\260_yu.java" "b/0602/Programmers/Lv1/\354\230\210\354\202\260_yu.java" new file mode 100644 index 0000000..10b292e --- /dev/null +++ "b/0602/Programmers/Lv1/\354\230\210\354\202\260_yu.java" @@ -0,0 +1,25 @@ +import java.util.Arrays; + +public class lv1_예산 { + public static void main(String[] args) { + + int[] d = {1,3,2,5,4}; + int budget = 9; + int answer = 0; + + Arrays.sort(d); + int sum = 0; + + for(int i=0; i budget) { + break; + } + answer++; + } + + System.out.println(answer); + } + +} From 851473acf7970496c80dc051a5bd6b5cffc10733 Mon Sep 17 00:00:00 2001 From: Yujiseul <98597009+Yujiseul@users.noreply.github.com> Date: Thu, 2 Jun 2022 19:46:48 +0900 Subject: [PATCH 3/3] 0602_solve:programmers --- ...4\261\204\355\214\205\353\260\251_yu.java" | 52 ++++++++++++ ...3\237\254\353\247\201\353\266\201_yu.java" | 83 +++++++++++++++++++ 2 files changed, 135 insertions(+) create mode 100644 "0602/Programmers/Lv2/\354\230\244\355\224\210\354\261\204\355\214\205\353\260\251_yu.java" create mode 100644 "0602/Programmers/Lv2/\354\271\264\354\271\264\354\230\244\355\224\204\353\240\214\354\246\210\354\273\254\353\237\254\353\247\201\353\266\201_yu.java" diff --git "a/0602/Programmers/Lv2/\354\230\244\355\224\210\354\261\204\355\214\205\353\260\251_yu.java" "b/0602/Programmers/Lv2/\354\230\244\355\224\210\354\261\204\355\214\205\353\260\251_yu.java" new file mode 100644 index 0000000..5467a77 --- /dev/null +++ "b/0602/Programmers/Lv2/\354\230\244\355\224\210\354\261\204\355\214\205\353\260\251_yu.java" @@ -0,0 +1,52 @@ +import java.util.Arrays; +import java.util.HashMap; + +public class lv2_오픈채팅방 { + public static void main(String[] args) { + + String[] record = {"Enter uid1234 Muzi", "Enter uid4567 Prodo","Leave uid1234","Enter uid1234 Prodo","Change uid4567 Ryan"}; + // + + int ncnt = 0; + + HashMap user = new HashMap<>(); + + for(int i=0; i0) { + cnt++; + g =dfs(r, c); + } + + if(maxg=m|| nc>=n) { + continue; + } + + if(visited[nr][nc] || pic[nr][nc] != num) { + continue; + } + + dfs(nr, nc); + g++; + } + return g+1; + + + } + +}