Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int main() {
- constexpr uint32_t mask = (1 << 18) - 1;
- constexpr int N = 1e5, prefill = (1 << 15) + 1;
- cout << "1\n" << N << "\n";
- cout << mask + 1;
- uint32_t x = 1;
- for (int i = 1; i < prefill; ++i) {
- cout << " " << x;
- x = x * 5 + 1;
- x &= mask;
- }
- for (int i = prefill; i < N; ++i) {
- cout << " 0";
- }
- cout << "\n";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement