上一页 1 2 3 4 5 6 ··· 11 下一页
摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 struct node 8 { 9 int x;10 int s;11 };12 bool prim[10005];13 ... 阅读全文
posted @ 2015-01-28 15:25 天I火 阅读(247) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 int x, y; 7 bool g[20][20]; 8 bool k[20][20]; 9 bool ans[20][20];10 bool flag;1... 阅读全文
posted @ 2015-01-28 13:44 天I火 阅读(646) 评论(0) 推荐(0) 编辑
摘要: 1 //Memory Time 2 //2236K 32MS 3 4 #include 5 using namespace std; 6 7 int mod[524286]; //保存每次mod n的余数 8 //由于198的余数序列是最长的 9 ... 阅读全文
posted @ 2015-01-27 20:56 天I火 阅读(387) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 int n, k, c, ans; 9 int num[100005];10 int main()11 {12 //... 阅读全文
posted @ 2015-01-27 18:24 天I火 阅读(533) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 struct node 9 {10 int x;11 int y;12 int z;13 ... 阅读全文
posted @ 2015-01-27 17:46 天I火 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 struct node 8 { 9 int x;10 int y;11 };12 int n, k, l, ans;13 ... 阅读全文
posted @ 2015-01-27 17:10 天I火 阅读(180) 评论(0) 推荐(0) 编辑
摘要: Description一棵树上有n个节点,编号分别为1到n,每个节点都有一个权值w。我们将以下面的形式来要求你对这棵树完成一些操作: I. CHANGE u t : 把结点u的权值改为t II. QMAX u v: 询问从点u到点v的路径上的节点的最大权值 III. QSUM u v: 询问从点u到... 阅读全文
posted @ 2014-12-29 18:55 天I火 阅读(169) 评论(0) 推荐(0) 编辑
摘要: C++中的const关键字的用法非常灵活,而使用const将大大改善程序的健壮性,本人根据各方面查到的资料进行总结如下,期望对朋友们有所帮助。Const是C++中常用的类型修饰符,常类型是指使用类型修饰符const说明的类型,常类型的变量或对象的值是不能被更新的。一、Const作用如下表所示:No... 阅读全文
posted @ 2014-12-03 21:03 天I火 阅读(297) 评论(0) 推荐(0) 编辑
摘要: 守恒法的问题,表示,刚刚看了一点点#include #include #include #include using namespace std;int main(){ int T, n; bool flag; int num[10005]; int ans[10005]; int sux[1000... 阅读全文
posted @ 2014-12-01 00:54 天I火 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=119解题思路:RMQ算法。不会的可以去看看我总结的RMQ算法。http://blog.csdn.net/niushuai666/article/details/6624672代码如下:#in... 阅读全文
posted @ 2014-11-13 20:56 天I火 阅读(131) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 11 下一页