일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Java8
- backtracking
- 그래프
- programmers
- 스프링
- 운영체제
- 자료구조
- 네트워크
- algorithm
- back-end
- 자바
- OS
- 백준
- BFS
- DFS
- kotlin
- LEVEL2
- 프로젝트
- Brute-force
- java
- 프로그래머스
- 알고리즘
- baekjoon
- lambda
- 모던자바
- 백트래킹
- 코틀린
- TDD
- Spring
- DP
- Today
- Total
목록백준 (37)
요깨비's LAB

import java.util.Scanner; public class Main { static boolean isGet = false; public static void main(String[] args) { Scanner scr = new Scanner(System.in); long A = scr.nextInt(); long B = scr.nextInt(); multiplyTwo(A, B, 1); if (isGet) { return; } appendOne(A, B, 1); if (isGet) { return; } System.out.println(-1); } public static void multiplyTwo(long value, long B, long count) { if (isGet || val..

엄청 틀렸고, 결국 다른분들의 설명을 참조하여 풀었습니다. 이 과정에서 해결한 부분들입니다. import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; import java.util.StringTokenizer; public class Main { static int N; public static void main(String[] args) { YoggaebReader input = new YoggaebReader(); StringBuilder sb = new StringBuilder(); N = input.nextInt(); int[] arr = new..

import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; import java.util.StringTokenizer; public class Main { static int T; static int[] A; static int[] B; public static void main(String[] args) { YoggaebReader input = new YoggaebReader(); T = input.nextInt(); StringBuilder sb = new StringBuilder(); for(int t=0;t

간만에 맞았던문제를 다시 풀어보았다. import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer; public class Main { static int N; static int result = 0; static List queenTiles = new ArrayList(); public static void main(String[] args) { YoggaebReader input = new YoggaebReader(); N = input.nextIn..

import java.io.*; import java.util.StringTokenizer; public class Main { static int N, S; static int count = 0; static int[] arr; public static void main(String[] args) { YoggaebReader scr = new YoggaebReader(); N = scr.nextInt(); S = scr.nextInt(); arr = new int[N]; for (int i = 0; i < N; i++) { arr[i] = scr.nextInt(); } for (int i = 0; i < N; i++) { doAlgorithm(i, arr[i]); } System.out.print(co..

import java.util.HashMap; import java.util.Map; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scr = new Scanner(System.in); int N = scr.nextInt(); Map nodes = new HashMap(); for (int i = 0; i < N; i++) { String id = String.valueOf((char) ('A' + i)); nodes.putIfAbsent(id, new Node(id)); } for (int i = 0; i < N; i++) { String rootId = scr.next(); St..

import java.util.*; public class Main { static int N; static int groupCount = 0; static int[][] map; static boolean[][] isVisited; static int min = Integer.MAX_VALUE; public static void main(String[] args) { Scanner scr = new Scanner(System.in); N = scr.nextInt(); map = new int[N][N]; isVisited = new boolean[N][N]; for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) { map[i][j] = scr.nextI..

처음에 자꾸 시간초과가 나서 뭐지 하고 결국에 구글링을 참조하였는데, 로직은 제가 짠것과 거의 동일했습니다. 단, 저는 배열을 순회하면서 print("${arr[i]} ")으로 출력을 하여서 시간초과가 난 것 같습니다. StringBuilder를 만들어 순회한 데이터를 담아 한번에 출력하니 정답으로 처리가 되었습니다. import java.lang.StringBuilder import java.util.* fun main(args: Array) { val scr = Scanner(System.`in`) val N = scr.nextInt() val stack = Stack() val arr = IntArray(N) for (i in 0 until N) { val element = scr.nextInt()..