Submission #809655
Source Code Expand
import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt(); //出来上がる焼き鳥の本数
int Kushi = 2*N; //串の本数
ArrayList<Integer> L = new ArrayList<Integer>(); //串の長さ一覧
int KK = 0;
for(int i=0; i < Kushi; i++){
L.add(sc.nextInt());
}
Collections.sort(L);
for(int i=0; i<Kushi; i+= 2){
KK += L.get(i);
}
System.out.println(KK);
}
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - BBQ Easy |
| User | candyseller18 |
| Language | Java7 (OpenJDK 1.7.0) |
| Score | 200 |
| Code Size | 495 Byte |
| Status | AC |
| Exec Time | 253 ms |
| Memory | 9940 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | sample-01.txt, sample-02.txt |
| All | sample-01.txt, sample-02.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 01-01.txt | AC | 210 ms | 8788 KiB |
| 01-02.txt | AC | 253 ms | 9812 KiB |
| 01-03.txt | AC | 237 ms | 9940 KiB |
| 01-04.txt | AC | 225 ms | 9044 KiB |
| 01-05.txt | AC | 222 ms | 9040 KiB |
| 01-06.txt | AC | 239 ms | 9812 KiB |
| 01-07.txt | AC | 235 ms | 9876 KiB |
| 01-08.txt | AC | 212 ms | 8656 KiB |
| sample-01.txt | AC | 214 ms | 8660 KiB |
| sample-02.txt | AC | 208 ms | 8788 KiB |