# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
580145 | 2022-06-20T16:06:55 Z | Yazan_SA | Karte (COCI18_karte) | C++14 | 595 ms | 29332 KB |
#include<bits/stdc++.h> #define endl "\n" #define ll long long #define map unordered_map #define start cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0); using namespace std; int main() { start freopen("codeblocksinput.txt", "r", stdin); int t=1; //cin>>t; while(t--) { int n, k, act=0; cin>>n>>k; vector<int>v(n); for(int i=0; i<n; cin>>v[i++]); sort(v.begin(), v.end(), greater<int>()); sort(v.begin(), v.begin()+k); for(int i=0; i<n; i++) if(v[i]>act) act++; if(act==k) for(int i=n-1; i>=0; i--) cout<<v[i]<<' '; else cout<<-1; } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 455 ms | 29332 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 509 ms | 29260 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 478 ms | 29212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 468 ms | 29236 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 510 ms | 29216 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 509 ms | 29240 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 468 ms | 29260 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 468 ms | 29216 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 530 ms | 29300 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 595 ms | 29312 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |