목록연속적배열 (5)
hara
https://www.acmicpc.net/problem/2839 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class a2839 { public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); int num=Integer.parseInt(br.readLine()); int[] a=new int[num+1]; a[0]=0; a[1]=-1; a[2]=-1; f..
https://www.acmicpc.net/problem/11726 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class a11726 { public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); int num=Integer.parseInt(br.readLine()); int []a=new int[num]; a[0]=1; if(num>=2){ a[1]=2;..
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(..
https://www.acmicpc.net/problem/9095 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class a9095 { public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); int num=Integer.parseInt(br.readLine()); int[] tl=new int[11]; tl[0]=1; tl[1]=2; tl[2]=4; fo..