목록1만들기 (1)
hara
BEAKJOON JAVA ALGORITHM #1463(1만들기)
https://www.acmicpc.net/problem/1463 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class a1463 { public static void main(String[] args) throws IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); int num=Integer.parseInt(br.readLine()); int[] a=new int[num]; a[0]=0; for(int i=1;ia[i/2]+1){ a[i]=a[i/2]+1; } if(..
공부/알고리즘
2017. 4. 2. 04:31