Submission #1516027
Source Code Expand
import java.util.*; import java.util.stream.*; class Main{ public static void main(String[]$){ Scanner s=new Scanner(System.in); int n=s.nextInt(),k=s.nextInt(); System.out.println(IntStream.range(0,n).map(i->s.nextInt()).sorted().skip(n-k).sum()); } }
Submission Info
Submission Time | |
---|---|
Task | A - Sharing Cookies |
User | fal_rnd |
Language | Java8 (OpenJDK 1.8.0) |
Score | 0 |
Code Size | 292 Byte |
Status | RE |
Exec Time | 225 ms |
Memory | 26708 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 100 | ||||
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 |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_example_01.txt | RE | 225 ms | 25172 KB |
00_example_02.txt | RE | 174 ms | 24532 KB |
01.txt | RE | 169 ms | 24272 KB |
02.txt | RE | 175 ms | 26188 KB |
03.txt | RE | 172 ms | 24908 KB |
04.txt | RE | 177 ms | 24016 KB |
05.txt | RE | 167 ms | 26708 KB |
06.txt | RE | 180 ms | 24784 KB |
07.txt | RE | 165 ms | 26452 KB |