updated at 2022. 12. 30. 오후 7:02:22
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user