• 문제 링크
13450번: László Babai
László Babai is a Hungarian computer scientist and mathematician. He is a Gödel prize winner and an outstanding researcher in the fields of the theory of computation, algorithms, combinatorics, and group theory. Last year, he proposed a subexponential-t
www.acmicpc.net
• 풀이 코드
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
public class Main {
public static void main(String[] args) throws IOException {
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
StringBuilder sb = new StringBuilder();
int t = read();
while (t-- > 0) {
int n = read();
for (int i = 0; i < n; i++, read()) read();
int m = read();
for (int i = 0; i < m; i++, read()) read();
sb.append(n == m ? "yes\n" : "no\n");
}
bw.write(sb.toString());
bw.flush();
}
private static int read() throws IOException {
int c, n = System.in.read() & 15;
while ((c = System.in.read()) > 32) n = (n << 3) + (n << 1) + (c & 15);
return n;
}
}
'Problem Solving > Baekjoon' 카테고리의 다른 글
[백준] 5975 Pathfinding - Graph Theory / Java (0) | 2024.04.07 |
---|---|
[백준] 31575 도시와 비트코인 - Graph Theory / Java (0) | 2024.04.06 |
[백준] 31409 착신 전환 소동 - Graph Theory / Java (0) | 2024.04.04 |
[백준] 31562 전주 듣고 노래 맞히기 - Data Structure / Java (0) | 2024.04.03 |
[백준] 31718 Double Up - Data Structure / Java (0) | 2024.04.02 |
댓글