topcoder.com

topcoder - A0Paper

건이두 2019. 10. 30. 13:48
728x90
public class A0Paper {
    public String canBuild(int[] A){
        for(int i = A.length-1; i > 0; --i)
            A[i-1] += A[i]/2;

        return (A[0] > 0)? "Possible": "Impossible";
    }
}

Tip

문제 설명에, Letter, Legal, Tabloid 는 무시하셔도 됩니다.

Source file

https://github.com/skysign/WSTT/tree/master/A0Paper/src/com/tistory/skysign/WSTT/A0Paper

728x90