PostAddsense


태그 : Simulation 요약보기전체보기목록닫기

1 2

Dragons

Problem각 면에 용이 살고 있는 정육면체가 있다. 용은 음식이 담긴 그릇을 갖고 있고, 음식의 양은 면에 표시된다. 매 차례마다 다음 일이 발생한다: 용은 자기와 근접한 면에 있는 용의 음식을 1/4만큼 가지고 올 수 있다. 정육면체 위쪽에 살고 있는 용들의 대장 스노그의 최종 음식의 양을 구하고 "X/Y" 형태의 문자열로 반환하라.Constrai...

Bonuses

Codepublic class Bonuses{    public int[] getDivision(int[] points) {        int len = points.length;      &...

VendingMachine

Codepublic class VendingMachine{    int rows, cols;    int ts;                ...

TreasureHunt

Codepublic class TreasureHunt{        int xLen,yLen;    char[][] land;    String[] inst;    boolea...

WaterPressure

Codeimport java.util.ArrayList;public class WaterPressure{    int[] dy = {-1,0,1,0};    int[] dx = {0,1,0,-1};    class Point {  ...

Planets

Codeimport java.text.DecimalFormat;public class Planets{    public String[] locations(String[] planets, int time) {        double G = 6.67...

Mandelbrot

Codepublic class Mandelbrot{    public int iterations(int max, double a, double b) {        double za = a, zb = b;        for (int i=0; i <= max;...

BitmapToGraph

Codeimport java.util.TreeSet;public class BitmapToGraph{    int[] dx = {-1,0,1,1,1,0,-1,-1};    int[] dy = {-1,-1,-1,0,1,1,1,0};    int n,...

UserId

Codepublic class UserId{    String[] iu;    String delch(String s) {        return s.replace(" ","").replace("'","");    }    boolean...

Inchworm

Codepublic class Inchworm {    public int gcd(int a, int b) {        return b==0 ? a : gcd(b,a%b);    }    int lcm(int a, i...
1 2