태그>srm145(총 4개의 글)
'srm145' 관련 최근글
-
- HillHike
-
불타는 아잍(IT)스크림 by 불타는 아이스크림|2020/03/10 23:00
Code public class HillHike{ public long numPaths(int distance, int maxHeight, int[] _landmarks) { long[][][] cache1 = new long[2][52][51]; long[][][] cache2 = new long[2][52][51]; cache1[0][0][0] = 1; i..
- HillHike
-
- Bonuses
-
불타는 아잍(IT)스크림 by 불타는 아이스크림|2020/03/02 15:53
Code public class Bonuses{ public int[] getDivision(int[] points) { int len = points.length; int sum = 0, extra = 100; boolean[] used = new boolean[len]; int[] percents = new int[len]; for (int i = 0; i < len; i+) sum ..
Topcoder, SRM145, Easy, 250p, SimpleMath
- Bonuses
-
- VendingMachine
-
불타는 아잍(IT)스크림 by 불타는 아이스크림|2020/02/28 15:13
Code public class VendingMachine{ int rows, cols; int ts; // a total of seconds int ci, cj; // current i, current j; int[][] p; void addSecs(int nj) { int a = Math.abs(nj - cj); int b = cols - Math.abs(nj - cj); ts = (a < b) ? a ..
- VendingMachine
-
- ExerciseMachine
-
불타는 아잍(IT)스크림 by 불타는 아이스크림|2018/06/08 18:21
Code public class ExerciseMachine { public int getPercentages(String time) { int total = Integer.parseInt(time.substring(0, 2)) * 60 * 60 + Integer.parseInt(time.substring(3, 5)) * 60 + Integer.parseInt(time.substring(6, 8))..
- ExerciseMachine