Submission #1519794
Source Code Expand
import java.util.*; class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); Long result = 0l; Integer n = in.nextInt(); Integer[] a = new Integer[3*n]; for (int i = 0; i < a.length; i++) { a[i] = in.nextInt(); } Arrays.sort(a, Comparator.reverseOrder()); for (int i = 1; i < 2 * n; i += 2) { result += a[i]; } System.out.println(result); } }
Submission Info
Submission Time | |
---|---|
Task | A - AtCoder Group Contest |
User | non |
Language | Java8 (OpenJDK 1.8.0) |
Score | 300 |
Code Size | 430 Byte |
Status | AC |
Exec Time | 946 ms |
Memory | 99012 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 300 / 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 | 98 ms | 21712 KB |
00_example_02.txt | AC | 102 ms | 21204 KB |
01.txt | AC | 97 ms | 21844 KB |
02.txt | AC | 108 ms | 21716 KB |
03.txt | AC | 97 ms | 18900 KB |
04.txt | AC | 96 ms | 18644 KB |
05.txt | AC | 288 ms | 40356 KB |
06.txt | AC | 701 ms | 97568 KB |
07.txt | AC | 614 ms | 90860 KB |
08.txt | AC | 946 ms | 99012 KB |
09.txt | AC | 870 ms | 97112 KB |
10.txt | AC | 855 ms | 95884 KB |