diff --git "a/lkhyun/202507/1 BOJ G4 \354\210\230 \353\202\230\353\210\204\352\270\260 \352\262\214\354\236\204.md" "b/lkhyun/202507/01 BOJ G4 \354\210\230 \353\202\230\353\210\204\352\270\260 \352\262\214\354\236\204.md" similarity index 100% rename from "lkhyun/202507/1 BOJ G4 \354\210\230 \353\202\230\353\210\204\352\270\260 \352\262\214\354\236\204.md" rename to "lkhyun/202507/01 BOJ G4 \354\210\230 \353\202\230\353\210\204\352\270\260 \352\262\214\354\236\204.md" diff --git "a/lkhyun/202507/2 BOJ G3 \354\206\214\354\210\230\354\235\230 \354\227\260\354\206\215\355\225\251.md" "b/lkhyun/202507/02 BOJ G3 \354\206\214\354\210\230\354\235\230 \354\227\260\354\206\215\355\225\251.md" similarity index 100% rename from "lkhyun/202507/2 BOJ G3 \354\206\214\354\210\230\354\235\230 \354\227\260\354\206\215\355\225\251.md" rename to "lkhyun/202507/02 BOJ G3 \354\206\214\354\210\230\354\235\230 \354\227\260\354\206\215\355\225\251.md" diff --git "a/lkhyun/202507/3 BOJ G3 \353\221\220 \353\260\260\354\227\264\354\235\230 \355\225\251.md" "b/lkhyun/202507/03 BOJ G3 \353\221\220 \353\260\260\354\227\264\354\235\230 \355\225\251.md" similarity index 100% rename from "lkhyun/202507/3 BOJ G3 \353\221\220 \353\260\260\354\227\264\354\235\230 \355\225\251.md" rename to "lkhyun/202507/03 BOJ G3 \353\221\220 \353\260\260\354\227\264\354\235\230 \355\225\251.md" diff --git a/lkhyun/202507/4 BOJ G3 Dance Dance Revolution.md b/lkhyun/202507/04 BOJ G3 Dance Dance Revolution.md similarity index 100% rename from lkhyun/202507/4 BOJ G3 Dance Dance Revolution.md rename to lkhyun/202507/04 BOJ G3 Dance Dance Revolution.md diff --git "a/lkhyun/202507/5 BOJ G3 \355\224\274\353\246\254 \353\266\200\353\212\224 \354\202\254\353\202\230\354\235\264.md" "b/lkhyun/202507/05 BOJ G3 \355\224\274\353\246\254 \353\266\200\353\212\224 \354\202\254\353\202\230\354\235\264.md" similarity index 100% rename from "lkhyun/202507/5 BOJ G3 \355\224\274\353\246\254 \353\266\200\353\212\224 \354\202\254\353\202\230\354\235\264.md" rename to "lkhyun/202507/05 BOJ G3 \355\224\274\353\246\254 \353\266\200\353\212\224 \354\202\254\353\202\230\354\235\264.md" diff --git "a/lkhyun/202507/6 BOJ G2 \353\254\270\354\240\234\354\247\221.md" "b/lkhyun/202507/06 BOJ G2 \353\254\270\354\240\234\354\247\221.md" similarity index 100% rename from "lkhyun/202507/6 BOJ G2 \353\254\270\354\240\234\354\247\221.md" rename to "lkhyun/202507/06 BOJ G2 \353\254\270\354\240\234\354\247\221.md" diff --git "a/lkhyun/202507/7 BOJ G2 1\354\235\230 \352\260\234\354\210\230 \354\204\270\352\270\260.md" "b/lkhyun/202507/07 BOJ G2 1\354\235\230 \352\260\234\354\210\230 \354\204\270\352\270\260.md" similarity index 100% rename from "lkhyun/202507/7 BOJ G2 1\354\235\230 \352\260\234\354\210\230 \354\204\270\352\270\260.md" rename to "lkhyun/202507/07 BOJ G2 1\354\235\230 \352\260\234\354\210\230 \354\204\270\352\270\260.md" diff --git "a/lkhyun/202507/8 BOJ G2 \352\263\265\355\225\255.md" "b/lkhyun/202507/08 BOJ G2 \352\263\265\355\225\255.md" similarity index 100% rename from "lkhyun/202507/8 BOJ G2 \352\263\265\355\225\255.md" rename to "lkhyun/202507/08 BOJ G2 \352\263\265\355\225\255.md" diff --git "a/lkhyun/202507/9 BOJ G3 \353\262\275 \353\266\200\354\210\230\352\263\240 \354\235\264\353\217\231\355\225\230\352\270\260.md" "b/lkhyun/202507/09 BOJ G3 \353\262\275 \353\266\200\354\210\230\352\263\240 \354\235\264\353\217\231\355\225\230\352\270\260.md" similarity index 100% rename from "lkhyun/202507/9 BOJ G3 \353\262\275 \353\266\200\354\210\230\352\263\240 \354\235\264\353\217\231\355\225\230\352\270\260.md" rename to "lkhyun/202507/09 BOJ G3 \353\262\275 \353\266\200\354\210\230\352\263\240 \354\235\264\353\217\231\355\225\230\352\270\260.md" diff --git "a/lkhyun/202507/11 BOJ G3 \352\263\265\354\243\274\353\213\230\354\235\230 \354\240\225\354\233\220.md" "b/lkhyun/202507/11 BOJ G3 \352\263\265\354\243\274\353\213\230\354\235\230 \354\240\225\354\233\220.md" new file mode 100644 index 00000000..4b1ed336 --- /dev/null +++ "b/lkhyun/202507/11 BOJ G3 \352\263\265\354\243\274\353\213\230\354\235\230 \354\240\225\354\233\220.md" @@ -0,0 +1,80 @@ +```java +import java.util.*; +import java.io.*; + +public class Main{ + static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); + static BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); + static StringTokenizer st; + static int N; + static List flowers; + static int[] current = {3,1}; + static int[] maxCoverage = new int[2]; + static int cnt = 0; + static boolean isCover; + + public static void main(String[] args) throws Exception{ + N = Integer.parseInt(br.readLine()); + flowers = new ArrayList<>(); + + for (int i = 0; i < N; i++) { + st = new StringTokenizer(br.readLine()); + int startMonth = Integer.parseInt(st.nextToken()); + int startDay = Integer.parseInt(st.nextToken()); + int endMonth = Integer.parseInt(st.nextToken()); + int endDay = Integer.parseInt(st.nextToken()); + flowers.add(new int[]{startMonth, startDay, endMonth, endDay}); + } + + flowers.sort((a,b) -> { + if(a[0] == b[0]){ + if(a[1] == b[1]){ + if(a[2] == b[2]){ + return Integer.compare(a[3], b[3]); + }else{ + return Integer.compare(a[2], b[2]); + } + }else{ + return Integer.compare(a[1], b[1]); + } + }else{ + return Integer.compare(a[0], b[0]); + } + }); + + for (int[] flower : flowers) { + if(flower[0] maxCoverage[0] || (flower[2] == maxCoverage[0] && flower[3] > maxCoverage[1])){ + current[0] = maxCoverage[0]; + current[1] = maxCoverage[1]; + cnt++; + if(flower[0]11 || (maxCoverage[0] == 11 && maxCoverage[1]>30)){ + cnt++; + isCover = true; + break; + } + } + if(isCover){ + bw.write(cnt+""); + }else{ + bw.write("0"); + } + bw.close(); + } +} +```