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