Advertisement
Guest User

Untitled

a guest
Jan 21st, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4. using lli = long long;
  5.  
  6. signed main() {
  7. ios_base::sync_with_stdio(false);
  8. cin.tie(nullptr);
  9. cout.tie(nullptr);
  10. lli n, p, c;
  11. cin >> n >> p >> c; p--;
  12. vector<lli> a(n);
  13. for (lli i = 0; i < n; i++) cin >> a[i];
  14. vector<lli> s = a;
  15. sort(s.begin(), s.end());
  16. for (lli i = 0; i < n; i++){
  17. if (a[i] >= s[p]) cout << "Pass";
  18. else if (a[i] + c >= s[p]) cout << "Short";
  19. else cout << "Fail";
  20. cout << '\n';
  21. }
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement