摘要: 仍旧裸敲并查集。有这两点注意:1.输入 0 0 时候要输出YES2.留心数组的初始化 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 10 using ... 阅读全文
posted @ 2014-07-22 14:36 Desgard_Duan 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 什么也不用说,并查集裸题,直接盲敲即可。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 using namespace std;10 11 int f... 阅读全文
posted @ 2014-07-22 03:51 Desgard_Duan 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=48113916935540Team QueueAcceptedC++0.3392014-07-21... 阅读全文
posted @ 2014-07-21 14:20 Desgard_Duan 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=32481391605812096The SetStack ComputerAcceptedC++0... 阅读全文
posted @ 2014-07-21 11:53 Desgard_Duan 阅读(412) 评论(0) 推荐(0) 编辑
摘要: 题目连接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=9213913904156AnanagramsAcceptedC++0.0092014-07-20 ... 阅读全文
posted @ 2014-07-20 23:41 Desgard_Duan 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=17561391360710815Andy's First DictionaryAcceptedC+... 阅读全文
posted @ 2014-07-20 22:33 Desgard_Duan 阅读(316) 评论(0) 推荐(0) 编辑
摘要: 3.1.4 无序链表中的顺序查找符号表中使用的数据结构的一个简单选择是链表,每个结点存储一个键值对,如以下代码所示。get()的实现即为遍历链表,用equals()方法比较需被查找的键和每个节点中的键。如果匹配成功我们就返回null。put()的实现也是遍历链表,用equals()方法比较需被查找的... 阅读全文
posted @ 2014-07-20 10:25 Desgard_Duan 阅读(328) 评论(0) 推荐(0) 编辑
摘要: 1 import java.io.*; 2 import java.math.*; 3 import java.util.*; 4 import java.text.*; 5 6 public class Main { 7 public static void main(String[]... 阅读全文
posted @ 2014-07-20 00:56 Desgard_Duan 阅读(420) 评论(0) 推荐(0) 编辑
摘要: 1 #define eps 1e-8 2 3 double fun(double x) { 4 /*函数部分*/ 5 } 6 7 double Definite_Integral(double a, double b) { 8 double p = eps + 1.0; 9 ... 阅读全文
posted @ 2014-07-20 00:52 Desgard_Duan 阅读(340) 评论(0) 推荐(0) 编辑
摘要: HDU1754 1 #include 2 3 using namespace std; 4 5 const int MaxSIZE = 2e6 + 10; 6 7 typedef struct { 8 int Max ; 9 int left, right ... 阅读全文
posted @ 2014-07-18 22:52 Desgard_Duan 阅读(163) 评论(0) 推荐(0) 编辑