제출 #301653

#제출 시각아이디문제언어결과실행 시간메모리
301653llaki카니발 티켓 (IOI20_tickets)Java
0 / 100
231 ms16240 KiB
import java.util.Arrays; public class tickets { long find_maximum(int k, int[][] x) { int n = x.length; int m = x[0].length; int[][] answer = new int[n][m]; Arrays.sort(x, (i, j) -> i[0] + i[m - 1] - j[0] - j[m - 1]); long ans = 0; for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { answer[i][j] = 1; if (i < n / 2) { ans -= x[i][0]; } else { ans += x[i][m - 1]; } } } grader.allocate_tickets(answer); return ans; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...