- 博客(8)
- 收藏
- 关注
原创 大二上学期的规划~
又是一年开学时,莫名其妙就大二了,鉴于大一过的无比凄惨,大二规划一下。一:学好java和离散数学,其他课程尽量学好。二:算法竞赛入门经典和挑战程序设计看完,上面的题型尽量做一遍。三:看算法导论,尽量,能读多少读多少,大概一半,不求快,但求深入理解思考。四:每周去hdu刷题7道,数量多了自然会有有质量的题目。五:学好英语,毕竟不想再开翻译。最后,尽量完成吧。
2015-08-29 17:56:08 1101
原创 POJ 2653 线段位置关系判断模板
主要是利用了数学中的叉乘运算,学好数学还是很重要啊,都是泪#include #include #include #include #include using namespace std;struct node{ double x, y;};struct line{ node s, e;}p[100100];bool ya[100100];bool
2015-08-21 10:21:39 454
原创 无聊时候的思考
有时候会想,毕业以后到底去做哪个方向?现在的自己,其实什么都不会,有点无奈。其实并不是狂热的热爱ACM,只是喜欢,毕竟弱校,毕竟本人弱渣,不知道能在这条路上走多远,且行且珍惜吧。或许多年以后的自己,会回头看看当年的博客,微微一笑,风淡云轻~
2015-08-14 22:25:40 510
原创 HUD 3911 Black And White 线段树 区间更新 + 区间合并
Black And WhiteTime Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4178 Accepted Submission(s): 1227Problem DescriptionThere are
2015-08-08 10:58:33 562
原创 HDU 1829 A Bug's Life (并查集)
这道题的思路不是自己想的,参考了别人的代码。数组par为并查集数组,pre为辅助数组。pre[i]为i个体之前对应的异性,与当前的异性属于同性,因此合并。然后就是查看是否同一个根节点啦~#include #include #include using namespace std;int par[3000], pre[3000];int n, m;void init(){
2015-08-05 19:07:34 786
原创 POJ 3468 线段树区间更新求和模板
A Simple Problem with IntegersTime Limit: 5000MS Memory Limit: 131072KTotal Submissions: 75854 Accepted: 23373Case Time Limit: 2000MSDescriptionYou have N i
2015-08-04 20:19:18 1603
原创 HDU 1698 线段树区间更新模板
Just a HookTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 22156 Accepted Submission(s): 11100Problem DescriptionIn the game
2015-08-04 20:07:11 521
原创 HDU 1556 Color the ball
树状数组#include #include #include #include #include using namespace std;int bit[100100];int n;int sum(int i){ int s = 0; while(i > 0) { s += bit[i]; i -= i & - i;
2015-08-01 20:01:28 439
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人