Submission #2378117
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(); long ans = 0; for(int i = 0 ; i < n ; i++) { int[] x = new int[3]; x[0] = a[3 * i]; x[1] = a[3 * i + 1]; x[2] = a[3 * i + 2]; Arrays.sort(x); ans += x[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 | 495 Byte |
Status | WA |
Exec Time | 688 ms |
Memory | 91408 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 | 115 ms | 21716 KB |
00_example_02.txt | AC | 107 ms | 19792 KB |
01.txt | WA | 95 ms | 19796 KB |
02.txt | WA | 101 ms | 21588 KB |
03.txt | WA | 97 ms | 20564 KB |
04.txt | WA | 95 ms | 21844 KB |
05.txt | WA | 248 ms | 41104 KB |
06.txt | AC | 688 ms | 90180 KB |
07.txt | AC | 566 ms | 89024 KB |
08.txt | WA | 598 ms | 91408 KB |
09.txt | WA | 631 ms | 90276 KB |
10.txt | WA | 604 ms | 90224 KB |