- 博客(139)
- 资源 (4)
- 收藏
- 关注
原创 反转单链表
#include #include #include #include #include #include #include #include #include using namespace std;struct ListNode { int val; ListNode *next; ListNode(){}; ListNode(int x) :
2015-08-06 17:32:01
646
原创 hdu 2874 Connections between cities(LCA)
hdu 2874 Connections between cities
2014-10-19 16:19:31
588
原创 poj 1470 Closest Common Ancestors(LCA)
poj 1470 Closest Common Ancestors基础的LCA,但是输入ha
2014-10-19 13:38:11
501
原创 The 2014 ACM-ICPC Asia Mudanjiang Regional Contest - K Known Notation
*号能运算时必须栈里至少you
2014-10-12 16:29:49
522
原创 poj 3361 Gaussian Prime Factors(求高斯素数约数)
poj 3361 Gaussian Prime Factors题目要求
2014-08-03 12:50:59
1020
原创 poj 1436 Horizontally Visible Segments(线段树)
poj 1436 Horizontally Visible Segments太暴力了、、#include#include#includeusing namespace std;#define MAXN 8005#define lch p<<1#define rch p<<1|1#define mid (t[p].l+t[p].r)>>1struct no
2014-07-04 15:09:33
525
原创 poj 2886 Who Gets the Most Candies?(线段树、反素数)
poj 2886 Who Gets the Most Candies?此题线段树的思路倒是没什么问题,关键在于求
2014-07-02 13:27:53
533
原创 uva 10617 Again Palindrome(dp,容斥原理,求字符串内回文子序列的个数)
dp[i][j]表示s[i]到s[j]这一字串内回文串的个数
2014-06-27 17:49:31
1295
原创 uva 10453 Make Palindrome(dp,最小回文生成)
dp[i][j]表示s[i]到s[j]这一段字符串生成回文的最小添加字符个数决策:1.
2014-06-27 16:11:12
749
原创 uva 10069 Distinct Subsequences(dp,大数加法)
uva 10069 Distinct Subsequencesdp[i][j],
2014-06-26 09:48:19
701
原创 poj 1284 Primitive Roots(欧拉函数,原根定理)
poj 1284 Primitive Roots想了半天没想出来怎么zuo
2014-06-06 21:09:36
762
真正的qsort结构体多级排序,不是某个骗子qsort多级排序
2012-12-14
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人