일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- #크랙미3번
- #파밍
- #크랙미 5번
- #크랙미4번
- 리버싱
- leetcode
- Spring
- #보안이슈
- #크랙미 9번
- #크랙미 10번
- #크랙미
- #심플즈 크랙미
- #보안뉴스
- GraphQL
- Easy
- #리버싱
- #심플즈
- springframework
- #abex크랙미
- #abex
- #abex크랙미4번
- #고클린
- #크랙미2번
- java8
- java
- Today
- Total
목록스터디 (44)
Halo World
//1,2,3더하기import java.util.*;public class p9095_add { static int d[]=new int[12]; public static void main(String args[]){ Scanner sc = new Scanner(System.in); int T=sc.nextInt(); d[1]=1; d[2]=2; d[3]=4; while(T-- >0){ int n=sc.nextInt(); int result=count(n); System.out.println(result); } } static int count(int n){ for(int i=4;i
//2Xn 타일링2 import java.util.*; public class p11726_2xn2 { static int d[]; public static void main(String args[]){ Scanner sc = new Scanner(System.in); int n=sc.nextInt(); d=new int[n+1]; int result = count(n); System.out.println(result); } static int count(int n){ if(n==1){ d[n]=1; return d[n]; } if(n==2){ d[n]=3; return d[n]; } if(d[n-1]==0) d[n-1]=count(n-1); if(d[n-2]==0) d[n-2]=count(n-2); d..
//2Xn 타일링 import java.util.*; public class p11726_2xn { static int d[]; public static void main(String args[]){ Scanner sc = new Scanner(System.in); int n=sc.nextInt(); d=new int[n+1]; int result = count(n); System.out.println(result); } static int count(int n){ if(n==1){ d[n]=1; return d[n]; } if(n==2){ d[n]=2; return d[n]; } if(d[n-1]==0) d[n-1]=count(n-1); if(d[n-2]==0) d[n-2]=count(n-2); d[n..
| Top Down 방식 import java.util.*; public class p1463_make1 { static int D[]; static int n; public static void main(String args[]){ Scanner sc = new Scanner(System.in); n=sc.nextInt(); D=new int[n+1]; int result = make_1(n); System.out.println(result); } static int make_1(int x){ int Min; if(x==1) return 0; if(D[x-1]>0) Min=D[x-1]+1; else{ D[x-1]=make_1(x-1); Min=D[x-1]+1; } if(x%3==0){ int tmp=x..
import java.util.*; public class pro_7576_3 { static int a[][]; static int MAX; static int n,m; static int dx[]={0,0,1,-1}; static int dy[]={1,-1,0,0}; public static void main(String args[]){ Scanner sc = new Scanner(System.in); m=sc.nextInt(); n=sc.nextInt(); a=new int[n][m]; int x,y,cx=0,cy=0; Queue qx=new LinkedList(); Queue qy=new LinkedList(); for(int i=0;i
import java.util.*; public class 텀프로젝트_9466 { static int a[];//입력받는 배열 static int check[];//방문 check(시작에서부터 몇번째로 방문되는 것인지) static int startVertex[];//시작정점 static int dfs(int cur, int cnt, int start){ /*이미 방문했던 정점이고 * 시작정점이 start와 다르면 start 정점은 사이클 외에 있는 정점이므로 0을 리턴, * 아니면 (현재 cnt - start로부터 몇번째로 방문한 정점인지) 리턴 */ if(check[cur]!=0){ if(start!=startVertex[cur]) return 0; return cnt-check[cur]; } che..
import java.util.*; public class pro_2178 { static int[][] a=new int[100][100]; static int[][] visit=new int[100][100]; static int dx[]={0,0,1,-1}; static int dy[]={-1,1,0,0}; //왼쪽, 오른쪽, 위, 아래 static int MIN=10000; static int n,m; public static void main(String args[]){ Scanner sc = new Scanner(System.in); n=sc.nextInt(); m=sc.nextInt(); for(int i=0;i
//섬의 개수 (BFS 버전) import java.util.*; public class pro_4963 { static int a[][]; static int dx[] = {-1,-1,-1,0,0,1,1,1}; static int dy[] = {-1,0,1,-1,1,-1,0,1}; static int cnt=2; static int n,m; static void bfs(int x, int y){ a[x][y]=cnt; Queue qx=new LinkedList(); Queue qy=new LinkedList(); qx.add(x); qy.add(y); while(!qx.isEmpty() && !qy.isEmpty()){ x=qx.peek(); y=qy.peek(); qx.poll(); qy.poll()..
//단지 번호붙이기 (DFS 버전) package graph1; import java.util.*; public class pro_2667 { static int a[][]; static int dx[] = {1,0,-1,0}; static int dy[] = {0,1,0,-1}; static int cnt=2; static int n; static int sum[]; static void dfs(int x, int y){ a[x][y]=cnt; sum[cnt]++; for(int i=0;i
//순열의 개수 import java.util.*; public class pro_10451 { static boolean[] c; static ArrayList[] a; static void dfs(int x){ if(c[x]) return; c[x]=true; for(int y : a[x]){ if(c[y]==false) dfs(y); } } public static void main(String args[]){ Scanner sc = new Scanner(System.in); int T=sc.nextInt(); for(int i=0;i