摘要:
传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=4423 【题解】 转对偶图,格子当成点,就相当于并查集裸题了。。 # include <stdio.h> # include <string.h> # include <iostream> # 阅读全文
摘要:
传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=3643 【题解】 n = p1^a1*p2^a2*...*pm^am phi(n) = p1(p1-1)^(a1-1)*p2(p2-1)^(a2-1)*...*pm^(am-1) 最多有10个不 阅读全文
摘要:
传送门:http://acm.hdu.edu.cn/showproblem.php?pid=1024 http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1053 【题解】 原来的解法:http://www.cnblogs.co 阅读全文
摘要:
传送门:http://acm.hdu.edu.cn/showproblem.php?pid=1024 http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1053 【题解】 本题也是51nod 1053 最大m子段和 和上题很像 阅读全文
摘要:
传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=3638 【题解】 看到k<=20就感觉很py了啊 我们用一棵线段树维护选段的过程,能选到>0的段就一直选,直到选到<0的段,每次选完把段内的数全部取相反数,意为下次取是“不取”的意思。 用线段树 阅读全文