摘要:
Notice: unusual memory limit! After the war, destroyed cities in the neutral zone were restored. And children went back to school. The war changed the 阅读全文
摘要:
题意:给定一个N,让你把它拆成若干个只含素因子2和3的数之和,且两两之间没有倍数关系,比如10=4+6。 思路:即是2因子的幂递增,3因子的幂递减;或者反之。 对于当前N,我们拆分出的数为num=2^x*3^y;满足2^x|N,而且y最大,然后把继续拆分N-num。不难推出,N-num是个偶数,且至 阅读全文