CompetitiveProgramming/src/bin/test.py

39 lines
883 B
Python
Raw Normal View History

2024-05-28 02:28:12 +01:00
from math import lcm, ceil, log
from random import choice, randint
from os import system
2024-06-12 18:41:40 +01:00
from collections import defaultdict
2024-05-28 02:28:12 +01:00
import io
2024-06-12 18:41:40 +01:00
PRIME = 998_244_353
2024-05-28 02:28:12 +01:00
if __name__ == '__main__':
2024-06-30 13:21:18 +01:00
n = 4
k = 5
for i in range(1 << n * k):
j = i
cnt = (j & ((1 << n) - 1)).bit_count()
f = 1
for _ in range(k):
if (j & ((1 << n) - 1)).bit_count() != cnt:
f = 0
break
j >>= n
for j in range(n):
l = i >> j
c = 0
while l:
c += l & 1
l >>= n
if (c & 1) == 0:
f = 0
break
if f:
m = i
for j in range(k):
for l in range(n):
print(m & 1, end='')
m >>= 1
print()
print()