소개
게시글
질문&답변
2023.12.21
강의 보지 않고 혼자 풀었는데
찾았습니다 채점사이트 결과에서 볼 수 있군요 ㅎㅎ 감사합니다!
- 0
- 2
- 350
질문&답변
2023.11.07
완탐 1090
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.*; /** * 체커 플레티넘4 * 인프런 알고 * 미완 * 1. x,y 따로 계산해서 더해 최솟값 구하기 * 2. 입력으로 들어오는 좌표값의 x,y 좌표마다 탐색해야 함 * 3. 좌표마다 최소 거리가 있고 거기서 가장 가까운거 가져오면 됨 * 4. 누가 올건지 상관이 없음 */ public class Main{ public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); List list = new ArrayList (); Set xList = new HashSet (); Set yList = new HashSet (); int n = Integer.parseInt(br.readLine()); //입력받기 for(int i=0;i distance = new ArrayList (); Object[] xArr = xList.toArray(); Object[] yArr = yList.toArray(); for(int i=0;i dist = cord.getDistance(); for(int j=0;j dist = distance.get(j).getDistance(); int sum = 0; for(int k=0;k distance; public Coord(int x, int y) { this.x = x; this.y = y; this.distance = new ArrayList (); } public int getX() { return x; } public int getY() { return y; } public List getDistance(){ return distance; } } 이렇게 해서 맞긴 맞았네요..
- 1
- 2
- 222
질문&답변
2022.05.19
MongoParseError: options usecreateindex, usefindandmodify are not supported
오~ 감사해요
- 16
- 3
- 378