Advertisement
Guest User

Untitled

a guest
Aug 24th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. #define int long long
  4. #define ii pair <int, int>
  5. #define app push_back
  6. #define all(a) a.begin(), a.end()
  7. #define bp __builtin_popcount
  8. #define ll long long
  9. #define mp make_pair
  10. #define f first
  11. #define s second
  12. mt19937 rnd(time(0));
  13. signed main() {
  14. #ifdef HOME
  15. freopen("input.txt", "r", stdin);
  16. #else
  17. ios_base::sync_with_stdio(0); cin.tie(0);
  18. #endif
  19. int t = 1000000;
  20. int ans = 0;
  21. while (t--) {
  22. int sum = 0;
  23. for (int i = 0; i < 100; ++i) {
  24. ++sum;
  25. while (rnd() & 1) ++sum;
  26. }
  27. ans = max(ans, sum);
  28. }
  29. cout << ans << '\n';
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement