# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
168325 | 2019-12-12T12:13:52 Z | ArKCa | Karte (COCI18_karte) | C++17 | 145 ms | 7928 KB |
#include <bits/stdc++.h> #define ll long long #define mod 1000000007 #define pb push_back #define pob pop_back #define f1 first #define s2 second #define N 500005 #define ekle 200 using namespace std; int n,cnt,a,k; vector<int>doru; int dizi[N]; int main(){ scanf("%d %d",&n,&k); for(int i=0;i<n;i++){ scanf("%d",&dizi[i]); } sort(dizi,dizi+n); reverse(dizi+(n-k),dizi+n); reverse(dizi,dizi+n); if(dizi[0]<=1){ printf("-1\n"); return 0; } for(int i=0;i<n;i++){ printf("%d ",dizi[i] ); } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 252 KB | Output is correct |
2 | Incorrect | 2 ms | 252 KB | Output isn't correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 256 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 376 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 376 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 376 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 376 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 376 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 32 ms | 1784 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 61 ms | 3328 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 145 ms | 7928 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |