updated at 2022. 12. 30. 오후 7:02:22

This commit is contained in:
rl544
2022-12-30 19:02:21 +09:00
parent ae9b4b7f66
commit fa9162754c
@@ -7,8 +7,7 @@ class Solution {
public int solution(int[][] data, int col, int row_begin, int row_end) {
int answer = 0;
List<int[]> al = Arrays.asList(data);
al.sort((o1,o2) -> o2[0] - o1[0]);
al.sort((o1,o2) -> o1[col-1] - o2[col-1]);
al.sort((o1,o2) -> (o1[col-1]==o2[col-1])? o2[0] - o1[0] : o1[col-1] - o2[col-1]);
for(int c = row_begin; c <= row_end; c++) answer ^= S_i(al.get(c-1),c);
return answer;
}