Submission #302615

#TimeUsernameProblemLanguageResultExecution timeMemory
302615ASD3DCarnival Tickets (IOI20_tickets)Java
0 / 100
90 ms10616 KiB
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]; for (int i = 0; i < n; i++) { answer[i][0] = 0; } /*** for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { if (j < k) { answer[i][j] = j; } else { answer[i][j] = -1; } } } ***/ long ans = 0; for (int i = 0; i < n; i++) { if (i >= n/2) { ans += x[i][0]; } else { ans -= x[i][0]; } } grader.allocate_tickets(answer); return ans; } /*** public static void main(String[] args){ int[][] s = new int[4][1]; for (int i = 0; i < 4; i++) { s[i][0] = i; } System.out.println(find_maximum(1, s)); } ***/ }
#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...