- 博客(4)
- 资源 (1)
- 收藏
- 关注
原创 hdu 4585 Shaolin
无聊发道水题,貌似电脑上的编译器有问题,只好多写了点代码 原理上就是set容器的应用 #include #include #include using namespace std; struct node { int num, grade; }; struct cpS{ bool operator()(const node &a,const node &b){return
2013-12-15 00:12:14 565
原创 hdu 4737 A Bit Fun
曾经有道题是说给出一个数组a0, a1 ... , an-1,一个数字m,设 f(i, j) = ai + ai+1 + ai+2 + ... + aj ,求(i,j)使f(i,j) 原理与这题一样,+ 换成 | ,需要换种数据结构,重载下运算符 #include #include #include #include #include #include // htt
2013-12-12 09:46:02 487
原创 hdu 4302 Holedox Eating
STL中priority_queue容器的应用,反正题目就是基于贪心的原则 #include #include #include #include #include #include using namespace std; // http://acm.hdu.edu.cn/showproblem.php?pid=4302 const int MAXN = 100005; prior
2013-12-06 17:32:23 505
原创 线段树合集 III
hdu 4747 Mex 这道题明显考的是思维方式,线段树作为成段更新求和的辅助。 #include #include #include #include using namespace std; /* http://acm.hdu.edu.cn/showproblem.php?pid=4747 */ const int MAXN = 200010; const int I
2013-12-01 23:14:20 715
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人