From 8647c53284959dff47b2c87632031f554361c78b Mon Sep 17 00:00:00 2001 From: oncsr Date: Tue, 18 Feb 2025 13:00:45 +0900 Subject: [PATCH 1/2] =?UTF-8?q?[20250217]=20BOJ=20/=20P1=20/=20C.S.G.=20/?= =?UTF-8?q?=20=EA=B6=8C=ED=98=81=EC=A4=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- khj20006/202502/17 BOJ P1 C.S.G. .md | 110 +++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 khj20006/202502/17 BOJ P1 C.S.G. .md diff --git a/khj20006/202502/17 BOJ P1 C.S.G. .md b/khj20006/202502/17 BOJ P1 C.S.G. .md new file mode 100644 index 00000000..6b376eea --- /dev/null +++ b/khj20006/202502/17 BOJ P1 C.S.G. .md @@ -0,0 +1,110 @@ +```java + +import java.util.*; +import java.io.*; + + +class Main { + + // IO field + static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); + static BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); + static StringTokenizer st; + + static void nextLine() throws Exception {st = new StringTokenizer(br.readLine());} + static int nextInt() {return Integer.parseInt(st.nextToken());} + static long nextLong() {return Long.parseLong(st.nextToken());} + static void bwEnd() throws Exception {bw.flush();bw.close();} + + // Additional field + static int N, M, K; + static int[] C, A, L, D, R; + static List G; + static int turnReverse; + + public static void main(String[] args) throws Exception { + + ready(); + //solve(); + + bwEnd(); + + } + + static void ready() throws Exception{ + + int T = Integer.parseInt(br.readLine()); + while(T-- > 0) { + turnReverse = 0; + nextLine(); + N = nextInt(); + M = nextInt(); + C = new int[N+1]; + TreeSet temp = new TreeSet<>(); + + nextLine(); + for(int i=0;i 75) { + turnReverse ^= 1; + continue; + } + if(a != 1) temp.add(a); + C[origin]++; + + } + K = temp.size(); + L = new int[K]; + int idx = 0; + for(int i:temp) L[idx++] = i; + + G = new ArrayList<>(); + for(int i=1;i<=N;i++) { + int res = 0; + if(C[i] == 0) continue; + for(int j=0;j Date: Tue, 18 Feb 2025 13:01:05 +0900 Subject: [PATCH 2/2] . --- 17 BOJ P1 C.S.G. .md | 110 ------------------------------------------- 1 file changed, 110 deletions(-) delete mode 100644 17 BOJ P1 C.S.G. .md diff --git a/17 BOJ P1 C.S.G. .md b/17 BOJ P1 C.S.G. .md deleted file mode 100644 index 6b376eea..00000000 --- a/17 BOJ P1 C.S.G. .md +++ /dev/null @@ -1,110 +0,0 @@ -```java - -import java.util.*; -import java.io.*; - - -class Main { - - // IO field - static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); - static BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); - static StringTokenizer st; - - static void nextLine() throws Exception {st = new StringTokenizer(br.readLine());} - static int nextInt() {return Integer.parseInt(st.nextToken());} - static long nextLong() {return Long.parseLong(st.nextToken());} - static void bwEnd() throws Exception {bw.flush();bw.close();} - - // Additional field - static int N, M, K; - static int[] C, A, L, D, R; - static List G; - static int turnReverse; - - public static void main(String[] args) throws Exception { - - ready(); - //solve(); - - bwEnd(); - - } - - static void ready() throws Exception{ - - int T = Integer.parseInt(br.readLine()); - while(T-- > 0) { - turnReverse = 0; - nextLine(); - N = nextInt(); - M = nextInt(); - C = new int[N+1]; - TreeSet temp = new TreeSet<>(); - - nextLine(); - for(int i=0;i 75) { - turnReverse ^= 1; - continue; - } - if(a != 1) temp.add(a); - C[origin]++; - - } - K = temp.size(); - L = new int[K]; - int idx = 0; - for(int i:temp) L[idx++] = i; - - G = new ArrayList<>(); - for(int i=1;i<=N;i++) { - int res = 0; - if(C[i] == 0) continue; - for(int j=0;j