Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <inttypes.h>
- #include <assert.h>
- typedef uint32_t uint_t;
- const uint32_t N = 1 << 11, P = 998244353;
- static uint32_t cubes[N];
- int main()
- {
- for (uint64_t i = 0; i < N; i++) {
- cubes[i] = (i * i % P) * i % P;
- }
- uint64_t res = 0;
- for (uint32_t n = 1; n < N; n++) {
- for (uint32_t j = 0; j < n; j++) {
- uint64_t rn = 0;
- for (uint32_t k = 0; k < j; k++) {
- rn += cubes[n ^ k] * (uint64_t) cubes[j ^ k] % P;
- }
- res = (res + rn * 6 % P * cubes[n ^ j]) % P;
- }
- printf("%4u: %9u \n", n, (uint32_t) res);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement