| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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
- db
- COS PRO
- 프로그래머스
- binary search
- greedy
- oracle
- 자바
- dfs
- priorityqueue
- MySQL
- 문제풀이
- 코딩테스트
- SWEA
- SQL
- BOJ
- 알고리즘
- 건강
- 이분탐색
- 시뮬레이션
- 투포인터
- 백준
- math
- 운동기록
- 문자열
- 문제해결
- DP
- 러닝일지
- Today
- Total
목록전체 글 (534)
슈콩
[문제] [소스 코드]class Main { interface Book{ public int getRentalPrice(int day); } class ComicBook implements Book { public int getRentalPrice(int day) { int cost = 500; day -= 2; if(day > 0) cost += 200 * day; return cost; } } class Novel implements Book { public int getRentalPrice(int day..
[문제] [소스 코드]import java.io.*;import java.util.*;public class Main { static int n,k; static List[][] map; static int[][] horse,color; static int[] dr = {0,1,0,-1}; static int[] dc = {1,0,-1,0}; public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine()); n = Integer...
[소스 코드]class Main{ int solution(int[] prices){ [[(guide-anchor):(한줄을 수정해주세요)]] int inf = 1000000001; int tmp = inf; int answer = -inf; for(int price : prices){ if(tmp != inf) answer = Math.max(answer, price - tmp); tmp = Math.min(tmp, price); } return answer; }}
[소스 코드] public int solution(int[] recordA, int[] recordB){ int cnt = 0; for(int i = 0; i
[소스 코드]class Main { public int solution(String pos) { int answer = 0; int row = pos.charAt(1) - '0'; int col = pos.charAt(0) - 'A' + 1; int[][] dirs = { {2,1},{1,2}, {2,-1},{1,-2}, {-1,2},{-2,1}, {-2,-1},{-1,-2} }; for(int[] d : dirs){ int nr = row + d[0]; int nc = col + d[1]; if(nr8 || nc8) continue; answer++; } return answer; ..
[소스 코드]class Main { public int[] solution(int N, int[] votes) { [[(guide-anchor):(한줄을 수정하시오)]] int voteCounter[] = new int[11]; for (int i = 0; i
[문제]https://www.acmicpc.net/problem/17779 [소스 코드]import java.io.*;import java.util.*;public class Main { static int n,result,total = 0; static int[][] map; public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st; n = Integer.parseInt(br.readLine()); map = new int[n][n]; for(int i=0;i=n) continue;..
[소스 코드]class Main { public int solution(int n) { int[][] map = new int[n][n]; int num = 1; int top = 0; int bottom = n-1; int max = n-1; int min = 0; int answer = 0; while(num=min;i--) map[i][bottom] = num++; bottom--; for(int i=bottom;i>=top;i--) map[min][i] = num++; min++; } for(int i=0;i
[문제]https://www.acmicpc.net/problem/17142 [소스 코드]import java.io.*;import java.util.*;public class Main { static int n,m,result = Integer.MAX_VALUE; static int[][] lab,copy; static boolean[] select; static List virus; static int[] dr = {-1,1,0,0}; static int[] dc = {0,0,-1,1}; public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(..
[문제]https://www.acmicpc.net/problem/17140 [소스 코드]import java.io.*;import java.util.*;public class Main { static int n,m; static int[][] map; public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine()); int r = Integer.parseInt(st.nextToken()); int c = Integer.parse..