# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
91291 | 2018-12-27T03:11:16 Z | YottaByte | K blocks (IZhO14_blocks) | C++14 | 3 ms | 732 KB |
#include <stdio.h> #include <algorithm> using namespace std; const int N = 1e5; #define pb push_back #define ll long long #define fr first #define sc second #define mk make_pair int n, a[N + 1], k; ll sum;/// inline bool check(int mid) { int sum = 0; for(int i = 1; i < k; i++) { } return false; } main() { scanf("%d %d", &n, &k); for(int i = 1; i <= n; i++) scanf("%d", &a[i]), sum += a[i]; sort(a + 1, a + 1 + n); int ans = a[n]; for(int i = 1; i < k; i++) ans += a[i]; printf("%d", ans); } /** **/
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 376 KB | Output is correct |
2 | Correct | 2 ms | 388 KB | Output is correct |
3 | Correct | 2 ms | 448 KB | Output is correct |
4 | Correct | 2 ms | 488 KB | Output is correct |
5 | Correct | 2 ms | 488 KB | Output is correct |
6 | Correct | 2 ms | 528 KB | Output is correct |
7 | Incorrect | 2 ms | 528 KB | Output isn't correct |
8 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 528 KB | Output is correct |
2 | Correct | 2 ms | 732 KB | Output is correct |
3 | Correct | 2 ms | 732 KB | Output is correct |
4 | Correct | 2 ms | 732 KB | Output is correct |
5 | Correct | 2 ms | 732 KB | Output is correct |
6 | Correct | 2 ms | 732 KB | Output is correct |
7 | Incorrect | 1 ms | 732 KB | Output isn't correct |
8 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 732 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 3 ms | 732 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |