Advertisement
Guest User

Untitled

a guest
Apr 11th, 2022
729
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6. constexpr uint32_t mask = (1 << 18) - 1;
  7. constexpr int N = 1e5, prefill = (1 << 15) + 1;
  8. cout << "1\n" << N << "\n";
  9. cout << mask + 1;
  10. uint32_t x = 1;
  11. for (int i = 1; i < prefill; ++i) {
  12. cout << " " << x;
  13. x = x * 5 + 1;
  14. x &= mask;
  15. }
  16. for (int i = prefill; i < N; ++i) {
  17. cout << " 0";
  18. }
  19. cout << "\n";
  20. }
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement