일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 그래프
- 네트워크
- 자료구조
- OS
- back-end
- Spring
- algorithm
- Java8
- 백준
- 프로젝트
- kotlin
- java
- DP
- programmers
- lambda
- TDD
- 프로그래머스
- LEVEL2
- 운영체제
- 스프링
- 알고리즘
- 모던자바
- 백트래킹
- 자바
- DFS
- 코틀린
- Brute-force
- backtracking
- baekjoon
- BFS
- Today
- Total
목록back-tracking (3)
요깨비's LAB
import java.util.* var C:Int = 0 fun main() { val scr = Scanner(System.`in`) C = scr.nextInt() val results = StringBuffer() for(i in 0 until C) { val N = scr.nextInt() val scores = mutableListOf() var total = 0 for(j in 0 until N) { val score = scr.nextInt() total += score scores.add(score) } val avg = total/N var count = 0 for(j in 0 until N) { if(scores[j] > avg) count++ } val result = String...
import java.util.* var energyBalls = mutableListOf() var N: Int = 0 var max = Int.MIN_VALUE fun main() { val scr = Scanner(System.`in`) N = scr.nextInt() for (i in 0 until N) { val element = scr.nextInt() energyBalls.add(element) } doAlgorithm(0, 0, N) println(max) } fun doAlgorithm(count: Int, value: Int, size: Int) { if (energyBalls.size == 2) { max = if (max < value) value else max return } f..
import java.util.* var N = 0 var max = Int.MIN_VALUE var min = Int.MAX_VALUE val elements = mutableListOf() val operators = mutableListOf() fun main() { val scr = Scanner(System.`in`) N = scr.nextInt() for (i in 0 until N) { val element = scr.nextInt() elements.add(element) } for (i in 0 until 4) { val operator = scr.nextInt() operators.add(operator) } doAlgorithm(1, elements[0]) println(max) pr..