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