import strutils, sequtils, algorithm proc popcnt(n: int): int = result = (n and 0x55555555) + (n shr 1 and 0x55555555) result = (result and 0x33333333) + (result shr 2 and 0x33333333) result = (result and 0x0f0f0f0f) + (result shr 4 and 0x0f0f0f0f) result = (result and 0x00ff00ff) + (result shr 8 and 0x00ff00ff) result = (result and 0x0000ffff) + (result shr 16 and 0x0000ffff) proc ispow2(n: int): bool = result = false for i in 0..4: if n==(1 shl i): result = true proc main() = let n = 16 a = (0..0: if popcnt(sub)==(par_size div 2): let sub2 = bit xor sub for i in 0..