TOPCODER
Posts
14 postsBonuses
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 += points[i]; for (int i = 0; i
VendingMachine
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 : b; } void setMaxCol() { int max = -1, mj = cj; for (int j = 0; j < cols
PenLift
Code import java.util.ArrayList; public class PenLift { int len, size; boolean[] usedS, usedV; int[] nv; // num of vertices int[][] adj1, adj2; ArrayList xv, yv; boolean contains(int x,int y) { for (int i = 0; i < xv.size(); i++) if (xv.get(i)==x && yv.get(i)==y) return true; retur
Lottery
Code import java.util.Arrays;import java.util.Comparator; public class Lottery{ long perm(long a, long b) { long num = 1; for (int i = 0; i < b; i++) num *= a--; return num; } long fact(long a) { long num = 1; for (int i = 2; i
![[일상] Eave 65와 목새 택타일 | 토프레 무접점 느낌 | 타건 영상 있음](https://img.zoomtrend.com/2026/06/07/1780838085-SE-77297eb3-90bf-43a7-9629-75fd8530e370.jpg)



