| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
- 코테
- 프로그래머스
- oracle
- math
- 문자열
- 문제해결
- 알고리즘
- SWEA
- 시뮬레이션
- 투포인터
- 백준
- DP
- 문제풀이
- 건강
- db
- 자바
- 코딩테스트
- 러닝일지
- SQL
- MySQL
- 운동기록
- binary search
- priorityqueue
- greedy
- COS PRO
- BFS
- Java
- dfs
- 이분탐색
- BOJ
- Today
- Total
목록2025/12/09 (5)
슈콩
[문제] [소스 코드]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; ..