Submission #2380817
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[3][n]; for(int i = 0 ; i < 3 ; i++) { for(int j = 0 ; j < n ; j++) { team[i][j] = a[i + 3 * j]; } } 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 | RE |
Exec Time | 818 ms |
Memory | 101800 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 | 93 ms | 20820 KB |
00_example_02.txt | RE | 96 ms | 19924 KB |
01.txt | WA | 94 ms | 19156 KB |
02.txt | RE | 100 ms | 21204 KB |
03.txt | RE | 96 ms | 21716 KB |
04.txt | RE | 95 ms | 17104 KB |
05.txt | RE | 285 ms | 41564 KB |
06.txt | RE | 818 ms | 101800 KB |
07.txt | RE | 661 ms | 92040 KB |
08.txt | RE | 775 ms | 101792 KB |
09.txt | RE | 774 ms | 91748 KB |
10.txt | RE | 754 ms | 94276 KB |