MohamedAbdel3al

A. Next Round

Sep 26th, 2021
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std ;
  4. #define sz(s) int(s.size())
  5. #define all(v) v.begin() , v.end()
  6. #define imin INT_MIN
  7. #define imax INT_MAX
  8. typedef long long ll ;
  9. #define Time cerr << "Time Taken: " << (float)clock() / CLOCKS_PER_SEC << " Secs" << "\n";
  10. #define all(s) s.begin(), s.end()
  11. #define cin(v) for (auto& i : v) cin >> i ;
  12. #define pb(x) push_back(x)
  13. #define getline(s) getline(cin >> ws, s)
  14.  
  15. void ABDEL3AL () {
  16. ios_base::sync_with_stdio(false); cin.tie(nullptr) , cout.tie(nullptr) ;
  17. #ifndef ONLINE_JUDGE
  18. freopen("input.txt" , "r" , stdin) , freopen("output.txt" , "w" , stdout) ;
  19. #endif
  20. Time
  21. }
  22.  
  23. int main() {
  24. ABDEL3AL() ;
  25. int n , k , cons ;
  26. vector < int > win ;
  27. cin >> n >> k ;
  28. for (int i = 1; i <= n; i++) {
  29. cin >> cons ;
  30. if (cons > k) win.push_back(cons) ;
  31. }
  32. cout << sz(win) ;
  33.  
  34.  
  35. return 0;
  36. }
  37.  
Advertisement
Add Comment
Please, Sign In to add comment