Skip to content

Instantly share code, notes, and snippets.

🌞 Morning 27 commits █▉░░░░░░░░░░░░░░░░░░░ 9.2%
🌆 Daytime 51 commits ███▋░░░░░░░░░░░░░░░░░ 17.5%
🌃 Evening 198 commits ██████████████▏░░░░░░ 67.8%
🌙 Night 16 commits █▏░░░░░░░░░░░░░░░░░░░ 5.5%
@beng9re
beng9re / 순열.JAVA
Created January 26, 2022 15:18
순열과 조합 (백트래킹)
public static void permutation(int idx) {
if(idx == R) {
return;
}
for(int i = 0; i < list.length; ++i) {
if(visited[i]) continue;
resulList[idx] = list[i];
visited[i] = true;
permutation(idx+1);
@beng9re
beng9re / 유클리드호제법.java
Created January 26, 2022 15:12
유클리드 호제법 (최대 공약수,공배수 구하기)
import java.util.Scanner;
public class EuclideanAlgorithm {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt(); // 제수
int b = sc.nextInt(); // 피제수
System.out.println(GCD(a, b));
sc.close();
public class DiskController {
public int solution(int[][] jobs) {
int answer = 0;
return answer;
}
}