随笔分类 - 构造
摘要:最简单的就是变成1~n的序列; 我们可以先加一个极大的数防止出现负数; 然后对于每一个%(a[ i ] - i);
阅读全文
摘要:For each string s consisting of characters '0' and '1' one can define four integers a00, a01, a10 and a11, where axy is the number of subsequences of
阅读全文
摘要:Mahmoud was trying to solve the vertex cover problem on trees. The problem statement is: Given an undirected tree consisting of n nodes, find the mini
阅读全文