From 9a0bed9d148d592a1c396ff2953161c219235278 Mon Sep 17 00:00:00 2001 From: suyeun84 <81475092+suyeun84@users.noreply.github.com> Date: Sun, 14 Sep 2025 23:47:22 +0900 Subject: [PATCH] =?UTF-8?q?[20250914]=20PGM=20/=20LV2=20/=20=ED=85=8C?= =?UTF-8?q?=EC=9D=B4=EB=B8=94=20=ED=95=B4=EC=8B=9C=20=ED=95=A8=EC=88=98=20?= =?UTF-8?q?/=20=EA=B9=80=EC=88=98=EC=97=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...4\354\213\234 \355\225\250\354\210\230.md" | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 "suyeun84/202509/14 PGM LV2 \355\205\214\354\235\264\353\270\224 \355\225\264\354\213\234 \355\225\250\354\210\230.md" diff --git "a/suyeun84/202509/14 PGM LV2 \355\205\214\354\235\264\353\270\224 \355\225\264\354\213\234 \355\225\250\354\210\230.md" "b/suyeun84/202509/14 PGM LV2 \355\205\214\354\235\264\353\270\224 \355\225\264\354\213\234 \355\225\250\354\210\230.md" new file mode 100644 index 00000000..0b39893b --- /dev/null +++ "b/suyeun84/202509/14 PGM LV2 \355\205\214\354\235\264\353\270\224 \355\225\264\354\213\234 \355\225\250\354\210\230.md" @@ -0,0 +1,21 @@ +```java +import java.util.*; +class Solution { + public int solution(int[][] data, int col, int row_begin, int row_end) { + int answer = 0; + Arrays.sort(data, (a, b) -> { + if (a[col-1] == b[col-1]) return b[0] - a[0]; + return a[col-1] - b[col-1]; + }); + for (int i = row_begin-1; i <= row_end-1; i++) { + int S = 0; + for (int j = 0; j < data[0].length; j++) { + S += (data[i][j] % (i+1)); + } + answer = answer ^ S; + } + + return answer; + } +} +```