Submission #2380889
Source Code Expand
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] a = new int[3 * n]; for(int i = 0 ; i < 3 * n ; i++) a[i] = sc.nextInt(); Arrays.sort(a); long ans = 0; int[][] team = new int[n][3]; for(int j = 0 ; j < 3 ; j++) { for(int i = 0 ; i < n ; i++) { team[i][j] = a[i + j * n]; } } System.out.println(Arrays.deepToString(team)); for(int i = 0 ; i < n ; i++) { int[] temp = Arrays.copyOf(team[i], team[i].length); Arrays.sort(temp); ans += temp[1]; } System.out.println(ans); } }
Submission Info
Submission Time | |
---|---|
Task | A - AtCoder Group Contest |
User | kouta1612 |
Language | Java8 (OpenJDK 1.8.0) |
Score | 0 |
Code Size | 675 Byte |
Status | WA |
Exec Time | 874 ms |
Memory | 106564 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 300 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 00_example_01.txt, 00_example_02.txt |
All | 00_example_01.txt, 00_example_02.txt, 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_example_01.txt | WA | 94 ms | 19924 KB |
00_example_02.txt | WA | 96 ms | 19156 KB |
01.txt | WA | 93 ms | 19540 KB |
02.txt | WA | 99 ms | 19668 KB |
03.txt | WA | 94 ms | 18768 KB |
04.txt | WA | 93 ms | 18768 KB |
05.txt | WA | 279 ms | 40612 KB |
06.txt | WA | 864 ms | 105376 KB |
07.txt | WA | 698 ms | 91068 KB |
08.txt | WA | 874 ms | 103736 KB |
09.txt | WA | 860 ms | 104148 KB |
10.txt | WA | 841 ms | 106564 KB |