Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions suyeun84/202509/14 PGM LV2 테이블 해시 함수.md
Original file line number Diff line number Diff line change
@@ -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;
}
}
```