코테 준비
-
https://www.acmicpc.net/problem/1753import java.io.*;import java.util.*;class Node implements Comparable { int idx; int cost; // 생성자 Node(int idx, int cost) { this.idx = idx; this.cost = cost; } @Override public int compareTo(Node other) { return Integer.compare(this.cost, other.cost); }}public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new B..
[백준] #1753. 최단경로 (골드 4)https://www.acmicpc.net/problem/1753import java.io.*;import java.util.*;class Node implements Comparable { int idx; int cost; // 생성자 Node(int idx, int cost) { this.idx = idx; this.cost = cost; } @Override public int compareTo(Node other) { return Integer.compare(this.cost, other.cost); }}public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new B..
2024.06.16 -
https://www.acmicpc.net/problem/17396import java.io.*;import java.util.*;class Node implements Comparable { int idx; long cost; // 생성자 Node(int idx, long cost) { this.idx = idx; this.cost = cost; } @Override public int compareTo(Node other) { return Long.compare(this.cost, other.cost); }}public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new B..
[백준] #17396. 백도어 (골드 5)https://www.acmicpc.net/problem/17396import java.io.*;import java.util.*;class Node implements Comparable { int idx; long cost; // 생성자 Node(int idx, long cost) { this.idx = idx; this.cost = cost; } @Override public int compareTo(Node other) { return Long.compare(this.cost, other.cost); }}public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new B..
2024.06.16 -
https://www.acmicpc.net/problem/5972import java.io.*;import java.util.*;class Node implements Comparable { int idx; int cost; // 생성자 Node(int idx, int cost) { this.idx = idx; this.cost = cost; } @Override public int compareTo(Node other) { return Integer.compare(this.cost, other.cost); }}public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new B..
[백준] #5972. 택배 배송 (골드 5)https://www.acmicpc.net/problem/5972import java.io.*;import java.util.*;class Node implements Comparable { int idx; int cost; // 생성자 Node(int idx, int cost) { this.idx = idx; this.cost = cost; } @Override public int compareTo(Node other) { return Integer.compare(this.cost, other.cost); }}public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new B..
2024.06.16 -
https://www.acmicpc.net/problem/1916import java.io.*;import java.util.*;class Node implements Comparable { int idx; int cost; Node(int idx, int cost) { this.idx = idx; this.cost = cost; } @Override public int compareTo(Node other) { return Integer.compare(this.cost, other.cost); }}public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new Buffered..
[백준] #1916. 최소비용 구하기 (골드 5)https://www.acmicpc.net/problem/1916import java.io.*;import java.util.*;class Node implements Comparable { int idx; int cost; Node(int idx, int cost) { this.idx = idx; this.cost = cost; } @Override public int compareTo(Node other) { return Integer.compare(this.cost, other.cost); }}public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new Buffered..
2024.06.13 -
https://www.acmicpc.net/problem/3020import java.io.*;import java.util.*;public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine()); int n = Integer.parseInt(st.nextToken()); //동굴의 길이 (총 석순과 종유석 개수) int h = Integer.parseInt(st.nextToken()); /..
[백준] #3020. 개똥 벌레 (골드 5)https://www.acmicpc.net/problem/3020import java.io.*;import java.util.*;public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine()); int n = Integer.parseInt(st.nextToken()); //동굴의 길이 (총 석순과 종유석 개수) int h = Integer.parseInt(st.nextToken()); /..
2024.06.13 -
https://www.acmicpc.net/problem/1446import java.io.*;import java.util.*;class Node implements Comparable { int idx; int cost; // 생성자 Node(int idx, int cost) { this.idx = idx; this.cost = cost; } @Override public int compareTo(Node other) { return Integer.compare(this.cost, other.cost); }}public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new B..
[백준] #1446. 지름길 (실버 1)https://www.acmicpc.net/problem/1446import java.io.*;import java.util.*;class Node implements Comparable { int idx; int cost; // 생성자 Node(int idx, int cost) { this.idx = idx; this.cost = cost; } @Override public int compareTo(Node other) { return Integer.compare(this.cost, other.cost); }}public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new B..
2024.06.13 -
https://www.acmicpc.net/problem/14496import java.io.*;import java.util.*;class Node implements Comparable { int idx; int cost; // 생성자 Node(int idx, int cost) { this.idx = idx; this.cost = cost; } @Override public int compareTo(Node other) { return Integer.compare(this.cost, other.cost); }}public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new ..
[백준] #14496. 그대, 그머가 되어 (실버 2)https://www.acmicpc.net/problem/14496import java.io.*;import java.util.*;class Node implements Comparable { int idx; int cost; // 생성자 Node(int idx, int cost) { this.idx = idx; this.cost = cost; } @Override public int compareTo(Node other) { return Integer.compare(this.cost, other.cost); }}public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new ..
2024.06.12 -
https://www.acmicpc.net/problem/18352import java.io.*;import java.util.*;class Node implements Comparable { int idx; int cost; // 생성자 Node(int idx, int cost) { this.idx = idx; this.cost = cost; } @Override public int compareTo(Node other) { return Integer.compare(this.cost, other.cost); }}public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new ..
[백준] #18352. 특정 거리의 도시 찾기 (실버 2)https://www.acmicpc.net/problem/18352import java.io.*;import java.util.*;class Node implements Comparable { int idx; int cost; // 생성자 Node(int idx, int cost) { this.idx = idx; this.cost = cost; } @Override public int compareTo(Node other) { return Integer.compare(this.cost, other.cost); }}public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new ..
2024.06.12