From 5cfa8774e172e04b7fc1451146e616966a8213cf Mon Sep 17 00:00:00 2001 From: songyc macbook Date: Mon, 6 Apr 2026 17:32:41 +0900 Subject: [PATCH] baekjoon 20260406 --- code_study/Baekjoon/c/10775.c | 41 ++++++++++++++++++++++++++++++ code_study/Baekjoon/python/3047.py | 2 ++ 2 files changed, 43 insertions(+) create mode 100644 code_study/Baekjoon/c/10775.c create mode 100644 code_study/Baekjoon/python/3047.py diff --git a/code_study/Baekjoon/c/10775.c b/code_study/Baekjoon/c/10775.c new file mode 100644 index 0000000..ebadb68 --- /dev/null +++ b/code_study/Baekjoon/c/10775.c @@ -0,0 +1,41 @@ +#include + +#define MAX 100000 + +int G, P, gi, res; +int parent[MAX+1]; + +void init_uf(); +int find(int x); +void Union(int x); + +int main() { + scanf("%d %d", &G, &P); + init_uf(); + + for(int i=0; i