์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
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 |
- ๋ธ๋ผ์ฐ์ ์คํ
- java
- BFS
- ์ด๊ฒ์ด ์ทจ์ ์ ์ํ ์ฝ๋ฉํ ์คํธ๋ค
- ํฉํ ๋ฆฌ์ผ ์ง๋ฒ
- DFS
- Do_it
- mysql
- ์์ด
- PYTHON
- Do it
- ํ์ ๋ณ์
- ์ต์
- 2BPerfect
- ์ง ๊ฐ ์์ธก ๋ถ์
- ์ด์ง์ ๋ณํ
- ์ฐธ์กฐ ๋ณ์
- ํ๋ก๊ทธ๋๋จธ์ค
- jdbc
- ์๋ฐ
- MacOS
- Extended Slices
- ๋ฐฑ์ค
- ์ ํ ํฌ ํ์ด์ฌ
- matplotlib
- ๋ค์ต์คํธ๋ผ ์๊ณ ๋ฆฌ์ฆ
- np.zeros_like
- ๋ฐ์ค๊ทธ๋ํ
- dacon
- sql
- Today
- Total
๋ชฉ๋กjava (13)
๐ฆ ๊ณต๋ฃก์ด ๋์!
๊ธฐ๋ณธํ์ ๊ตฌ๋ถ1byte2byte3byte4byte ์ ์ํ์ byte short / char int long ์ค์ํ์ float double ๋ ผ๋ฆฌ ํ์ boolean ํ์ ๋ณํ ํ์ฉ ๋ฒ์๊ฐ ์์ ํ์ ์ด ํ์ฉ ๋ฒ์๊ฐ ํฐ ํ์ ์ผ๋ก ์ ์ฅ๋ ๋ ๋ฐ์ํ๋ค. ๊ฐ์ ํ์ ๋ณํ ์์ ํ์ฉ ๋ฒ์ ํ์ = (์์ ํ์ฉ ๋ฒ์ ํ์ )ํฐ ํ์ฉ ๋ฒ์ ํ์ byte+byte==int byte+byte!=byte byte(byte+byte)==byte short+short==int // ์ฐ์ฐ์ ๊ธฐ๋ณธ ํ์ ์ int // ํ์ ๋ณํ ์กฐ์ฌ int x = 3; int y = 2; double z=(double) (x / y); z==1.0; double z=(double) x / y; z==1.5; //๋ฌธ์์ด ํ์ ๋ณํ Byte.parseBy..
import java.util.*; class Solution { ArrayList answer; boolean[] visited; public int solution(String numbers) { answer = new ArrayList(); visited = new boolean[numbers.length()]; int[] nums = new int[numbers.length()]; for(int i = 0; i < nums.length; i++) { nums[i] = Integer.parseInt(numbers.charAt(i)+""); } for(int i = 1; i

๋ฐฐ์ด์ ์ฒซ ๊ฐ๋ถํฐ ์์๋๋ก ํ๋์ฉ ๋ฐ๊พธ๋ฉฐ ๋ชจ๋ ๊ฐ์ ํ ๋ฒ์ฉ swap depth๋ฅผ ๊ธฐ์ค ์ธ๋ฑ์ค๋ก ํ์ฌ depth๋ณด๋ค ์ธ๋ฑ์ค๊ฐ ์์ ๊ฐ๋ค์ ๊ทธ๋๋ก ๊ณ ์ ํ๊ณ depth๋ณด๋ค ์ธ๋ฑ์ค๊ฐ ํฐ ๊ฐ๋ค๋ง ๊ฐ์ง๊ณ ๋ค์ swap ์์๊ฐ ๋ณด์ฅ๋์ง ์์ ๋ง์ง๋ง 321,312 ๋ถ๋ถ public class Permutation { public static void main(String[] args) { int n = 3; int[] arr = {1, 2, 3}; int[] output = new int[n]; //boolean[] visited = new boolean[n]; // visited๋ฅผ ์ด์ฉํ ์์ด์์ ์ค๋ช ์์ // perm(arr, output, visited, 0, n, 3); // System.out.println..

1. import java.util.Scanner; public class Test { public static void main(String[] args) throws IOException { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); sc.nextLine(); String ns = sc.nextLine(); int m = sc.nextInt(); sc.nextLine(); String ms = sc.nextLine(); String[] na = ns.split(" "); String[] ma = ms.split(" "); int[] answer = new int[m]; for (int i = 0; i < m; i++) { for (int ..
import java.util.*; class Solution { public static int[] solution(int[] answers) { int[][] patterns = { {1, 2, 3, 4, 5}, {2, 1, 2, 3, 2, 4, 2, 5}, {3, 3, 1, 1, 2, 2, 4, 4, 5, 5} }; int[] hit = new int[3]; for(int i = 0; i < hit.length; i++) { for(int j = 0; j < answers.length; j++) { if(patterns[i][j % patterns[i].length] == answers[j]) hit[i]++; } } int max = Math.max(hit[0], Math.max(hit[1], h..
๊ธฐ์กด์๋ queue๋ฅผ array๋ฆฌ์คํธ๋ก ์ด๋ป๊ฒ๋ ํ์๋๋ฐ ๊ทธ๊ฑธ ์ฐ์ง ์๊ณ ์๋ ๋๋ฌด ๋ณต์กํ๊ฒ ์ฝ๋๊ฐ ์ง์ฌ์ ธ์ ์๊ฐ์ด ๋ง์ด ๊ฑธ๋ ธ๋ค. ์๋๋ queue๋ฅผ ์ด์ฉํ ํด๋ต์ด๋ค. import java.util.LinkedList; import java.util.Queue; import java.util.List; import java.util.ArrayList; public class Truck { int w; int d; public Truck(int w, int d) { this.w = w; this.d = d; } } class Solution { public int solution(int bridge_length, int weight, int[] truck_weights) { int wL = weight; i..