Submission #3808445
Source Code Expand
#include<bits/stdc++.h> using namespace std; int main() { int i,n,k,a[51],o=0; cin>>n>>k; for (i=1;i<=n;i++) cin>>a[i]; sort(a+1,a+n+1); for (i=n;i>n-k;i++) o=o+a[i]; cout<<o<<endl; }
Submission Info
Submission Time | |
---|---|
Task | B - Snake Toy |
User | luogu_bot3 |
Language | C++ (GCC 5.4.1) |
Score | 0 |
Code Size | 216 Byte |
Status | RE |
Exec Time | 101 ms |
Memory | 256 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 200 | ||||
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 |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_example_01.txt | RE | 100 ms | 256 KB |
00_example_02.txt | RE | 99 ms | 256 KB |
01.txt | RE | 101 ms | 256 KB |
02.txt | RE | 99 ms | 256 KB |
03.txt | RE | 99 ms | 256 KB |
04.txt | RE | 99 ms | 256 KB |
05.txt | RE | 99 ms | 256 KB |
06.txt | RE | 100 ms | 256 KB |
07.txt | RE | 99 ms | 256 KB |
08.txt | RE | 98 ms | 256 KB |