Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- using lli = long long;
- signed main() {
- ios_base::sync_with_stdio(false);
- cin.tie(nullptr);
- cout.tie(nullptr);
- lli n, p, c;
- cin >> n >> p >> c; p--;
- vector<lli> a(n);
- for (lli i = 0; i < n; i++) cin >> a[i];
- vector<lli> s = a;
- sort(s.begin(), s.end());
- for (lli i = 0; i < n; i++){
- if (a[i] >= s[p]) cout << "Pass";
- else if (a[i] + c >= s[p]) cout << "Short";
- else cout << "Fail";
- cout << '\n';
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement