์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
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 |
- DFS
- ์ด๊ฒ์ด ์ทจ์ ์ ์ํ ์ฝ๋ฉํ ์คํธ๋ค
- ํฉํ ๋ฆฌ์ผ ์ง๋ฒ
- np.zeros_like
- dacon
- ์ด์ง์ ๋ณํ
- PYTHON
- ์ ํ ํฌ ํ์ด์ฌ
- ์์ด
- ๋ฐ์ค๊ทธ๋ํ
- ์ง ๊ฐ ์์ธก ๋ถ์
- mysql
- ์๋ฐ
- ๋ฐฑ์ค
- ํ๋ก๊ทธ๋๋จธ์ค
- java
- sql
- 2BPerfect
- matplotlib
- ๋ธ๋ผ์ฐ์ ์คํ
- ๋ค์ต์คํธ๋ผ ์๊ณ ๋ฆฌ์ฆ
- MacOS
- jdbc
- Do_it
- BFS
- Extended Slices
- ํ์ ๋ณ์
- Do it
- ์ต์
- ์ฐธ์กฐ ๋ณ์
- Today
- Total
๋ชฉ๋ก์๋ฐ (2)
๐ฆ ๊ณต๋ฃก์ด ๋์!

// arr ๋ฝ๊ธฐ๋ฅผ ํ๋ ค๊ณ ๋ชจ์ ๊ฐ๋ค // output ์ถ๋ ฅ ๋๋ ๊ฐ // visited ์ค๋ณต๊ฐ ๋ฐฉ์ง 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]; perm(arr, output, visited, 0, n, 3); // Swap ์์ด // System.out.println(); // permutation(arr, 0, n, 3); } // ์ฌ์ฉ ์์: perm(arr, output, visited, 0, n, 3); static void perm(int[] a..
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..