上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 52 下一页
摘要: http://poj.org/problem?id=1026这道题题意是给你一个置换群,再给你一个字符串,输出经过k次置换的字符串。 就是找循环节。 1 #include 2 #include 3 #include 4 #define maxn 3000 5 using namespace s... 阅读全文
posted @ 2014-05-29 21:08 null1019 阅读(115) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=3270这道题就是给你一个无序序列转换成有序序列需要花费的代价最小,交换a和b代价为a+b; 1 #include 2 #include 3 #include 4 #define maxn 20000 5 using namespace st... 阅读全文
posted @ 2014-05-29 18:45 null1019 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 1 import java.math.BigInteger; 2 import java.util.*; 3 public class Main { 4 public static void main(String []args) 5 { 6 Scanner cin... 阅读全文
posted @ 2014-05-27 20:00 null1019 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 1 import java.math.BigInteger; 2 import java.util.*; 3 public class Main { 4 public static void main(String []args) 5 { 6 Scanner cin... 阅读全文
posted @ 2014-05-26 22:11 null1019 阅读(93) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1063 1 import java.math.BigDecimal; 2 import java.util.*; 3 public class Main { 4 public static void mai... 阅读全文
posted @ 2014-05-26 21:46 null1019 阅读(135) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3367 1 #include 2 #include 3 #include 4 #define maxn 20000 5 using namespace std; 6 7 int n,m; 8 int f[m... 阅读全文
posted @ 2014-05-26 21:18 null1019 阅读(155) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2489这道题就是n个点中选择m个点形成一个生成树使得生成树的ratio最小。暴力枚举+最小生成树。 1 #include 2 #include 3 #include 4 #define maxn 10... 阅读全文
posted @ 2014-05-23 21:10 null1019 阅读(126) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4009最小树形图。题意是有n个地方需要供水,每个地方都可以选择是自己挖井,还是从别的地方引水,根据方法不同和每个地方的坐标不同,花费也不同,现在给出每个地方的坐标,花费的计算方法,以及每个地方可以给哪些地方供水(即... 阅读全文
posted @ 2014-05-20 21:17 null1019 阅读(187) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=3164第一次做最小树形图,看着别人的博客写,还没弄懂具体的什么意思。 1 #include 2 #include 3 #include 4 #include 5 #define maxn 1000 6 using namesp... 阅读全文
posted @ 2014-05-19 22:42 null1019 阅读(138) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3926这道题是判断两个图是不是同构相似。只要判断图中环的个数和链的个数,和每个环的节点数和链的节点数是否相等。 1 #include 2 #include 3 #include 4 #define m... 阅读全文
posted @ 2014-05-18 21:33 null1019 阅读(165) 评论(0) 推荐(0) 编辑
上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 52 下一页