개발 관련 공부/알고리즘28 백준 11652 import java.util.*; import java.io.BufferedReader; import java.io.FileInputStream; import java.io.InputStreamReader; import java.lang.reflect.Array; public class Main{ static public void main(String args[]){ try{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); int n=Integer.parseInt(br.readLine()); long arr []=new long[n]; for(int i=0;i 2021. 8. 3. 백준 10989 import java.util.*; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.OutputStreamWriter; import java.io.InputStreamReader; import java.lang.reflect.Array; public class Main{ public static void main(String[] args) { try { BufferedReader bf=new BufferedReader(new InputStreamReader(System.in)); int n=Integer.parseInt(bf.readLine()); //리스트 말고 배열로 해야함! idx를 입력받은 수라고 치고, ar.. 2021. 8. 2. 백준 10814 import java.util.*; public class Main{ static public void main(String args[]){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); String arr [][]=new String[n][2]; for(int i=0;i{ if(e1[0].equals(e2[0])){ return 0; } else return Integer.parseInt(e1[0])-Integer.parseInt(e2[0]); } ); StringBuilder sb=new StringBuilder(); for(int i=0;i 2021. 7. 30. 백준 11651 import java.util.Scanner; import java.util.Arrays; public class Main{ static public void main(String args[]){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int arr [][]= new int [n][2]; for(int i=0;i { if(e1[1]==e2[1]){ return e1[0]-e2[0]; //e1에서 e2를 빼야 함 }else return e1[1]-e2[1]; } ); StringBuilder sb=new StringBuilder(); for(int i=0;i 2021. 7. 29. 백준 2751 import java.util.*; import java.io.BufferedReader; import java.io.FileInputStream; import java.io.InputStreamReader; public class Main{ static public void main(String args[]){ try{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); ArrayList arr=new ArrayList(); for(int i=0;i 2021. 7. 28. 백준 1912 import java.util.Scanner; public class Main{ static public void main(String args[]){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); //코드.... int arr [] = new int [n+1]; int dp []=new int[n+1]; for(int i=1;i 2021. 7. 26. 이전 1 2 3 4 5 다음 반응형