# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
168323 | ArKCa | Karte (COCI18_karte) | C++17 | 146 ms | 4912 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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(){
// freopen("a.gir","r",stdin);
// freopen("a.cik","w",stdout);
scanf("%d %d",&n,&k);
for(int i=0;i<n;i++){
scanf("%d",&dizi[i]);
}
sort(dizi,dizi+n);
if(dizi[(n-k)]<=1){
printf("-1\n");
return 0;
}
reverse(dizi+(n-k),dizi+n);
reverse(dizi,dizi+n);
for(int i=0;i<n;i++){
printf("%d ",dizi[i] );
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |