pragma + bit division pass O(n^2)

contest 77 problem 354 https://codeany.org/ru/submission/download/36921