上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 22 下一页
摘要: 插入排序View Code #include <iostream>#include <cstdio>#include <queue>#include <set>#include <map>#include <cstring>#include <algorithm>using namespace std;const int mod = 1000000007;const int MM = 111111;int N;int num[MM];void get_data() { int i,j,k; for(i=1;i& 阅读全文
posted @ 2013-03-12 21:09 zhang1107 阅读(108) 评论(0) 推荐(0) 编辑
摘要: View Code set<int ,less<int> > 集合中元素从小到大排序set<int ,greater<int> > 集合中元素从大到小排序 begin() 返回指向第一个元素的迭代器clear() 清除所有元素count() 返回某个值元素的个数empty() 如果集合为空,返回true(真)end() 返回指向最后一个元素之后的迭代器,不是最后一个元素erase() 删除集合中的元素insert() 在集合中插入元素size() 集合中元素的数目struct compare{ bool operator ()(string s1 阅读全文
posted @ 2013-03-12 13:42 zhang1107 阅读(140) 评论(0) 推荐(0) 编辑
摘要: View Code #include <iostream>#include <cstdio>#include <queue>#include <cstring>#include <cmath>#include <algorithm>using namespace std;const int MM = 111111; //处理字符串的最大长度#define debug puts("wrong")int Wa[MM], Wb[MM], Wv[MM], Ws[MM];int ran[MM], height[M 阅读全文
posted @ 2013-03-08 11:41 zhang1107 阅读(155) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=1469View Code //POJ1469#include <iostream>#include <cstdio>#include <cstring>using namespace std;const int MM=100010;int P,N;bool vis[MM];int pre[MM];int head[MM], NE;struct Edge{int v,next;}edge[MM];void add_edge(int u,int v) { edge[NE].v=v; edge[NE].next 阅读全文
posted @ 2013-03-08 11:37 zhang1107 阅读(168) 评论(0) 推荐(0) 编辑
摘要: View Code //POJ 1204#include <iostream>#include <cstdio>#include <cstring>using namespace std;#define ROOT 0#define debug puts("wrong")const int MM=1010;const int MAX_NODE=100100;const int CHI=26;int L,C,W;int cnt;int len[MM];int ansx[MM], ansy[MM], ansk[MM];char text[MAX 阅读全文
posted @ 2013-03-08 11:34 zhang1107 阅读(136) 评论(0) 推荐(0) 编辑
摘要: http://www.codeforces.com/problemset/problem/266/D资料:最小直径生成树 阅读全文
posted @ 2013-01-23 18:56 zhang1107 阅读(136) 评论(0) 推荐(0) 编辑
摘要: http://acm.hust.edu.cn:8080/judge/contest/view.action?cid=18807#problem/J水题一道,就是到最后啦,心情很复杂,给自己一个警示, 不要放过任何水题。code:这里 阅读全文
posted @ 2013-01-22 19:09 zhang1107 阅读(118) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2013-01-22 09:44 zhang1107 阅读(0) 评论(0) 推荐(0) 编辑
摘要: http://acm.hust.edu.cn:8080/judge/contest/view.action?cid=18541#problem/Hdp要搞懂 阅读全文
posted @ 2013-01-21 19:05 zhang1107 阅读(121) 评论(0) 推荐(0) 编辑
摘要: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4945变量写错悲剧。 阅读全文
posted @ 2013-01-21 18:58 zhang1107 阅读(202) 评论(0) 推荐(0) 编辑
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 22 下一页