Submission #2380897
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 | 677 Byte |
Status | WA |
Exec Time | 710 ms |
Memory | 94840 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 | AC | 95 ms | 20692 KB |
00_example_02.txt | AC | 97 ms | 21204 KB |
01.txt | WA | 95 ms | 19796 KB |
02.txt | WA | 103 ms | 19668 KB |
03.txt | WA | 97 ms | 23124 KB |
04.txt | WA | 95 ms | 21716 KB |
05.txt | WA | 262 ms | 40712 KB |
06.txt | AC | 665 ms | 91128 KB |
07.txt | AC | 611 ms | 94840 KB |
08.txt | WA | 710 ms | 91308 KB |
09.txt | WA | 697 ms | 93024 KB |
10.txt | WA | 664 ms | 91136 KB |