From 5a6752ef70a2a972213a06633f00b3d3d11edc33 Mon Sep 17 00:00:00 2001 From: songyc macbook Date: Mon, 11 Aug 2025 23:55:49 +0900 Subject: [PATCH] 20250811 baekjoon --- code_study/Baekjoon/java/_1931.java | 43 ++++++++++++++++++++++++++ code_study/Baekjoon/python/7569.py | 48 +++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 code_study/Baekjoon/java/_1931.java create mode 100644 code_study/Baekjoon/python/7569.py diff --git a/code_study/Baekjoon/java/_1931.java b/code_study/Baekjoon/java/_1931.java new file mode 100644 index 0000000..e5418e7 --- /dev/null +++ b/code_study/Baekjoon/java/_1931.java @@ -0,0 +1,43 @@ +import java.util.*; + +class Meeting_Hour implements Comparable{ + public int start; + public int end; + + Meeting_Hour(int start, int end){ + this.start = start; + this.end = end; + } + + public int compareTo(Meeting_Hour another){ + if(this.end == another.end) return this.start - another.start; + return this.end - another.end; + } +} + +public class _1931 { + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + ArrayList meetingList = new ArrayList<>(); + int N = sc.nextInt(); + for(int i=0; i{ + // if(a.end == b.end) return a.start - b.start; + // return a.end - b.end; + // }); + int currentEnd = meetingList.get(0).end; + int result = 1; + for(int i=1; i dayMax : + dayMax = visited[nz][ny][nx] + +if N*M*H == visitCount + emptyCount : + print(dayMax) +else : + print(-1) \ No newline at end of file