![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
poj初级
WY5421
这个作者很懒,什么都没留下…
展开
-
Radar Installation(poj)1328
DescriptionAssume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea side. And any radar installation, l原创 2016-09-23 21:54:04 · 382 阅读 · 0 评论 -
常用类型的范围
类型 长度 (byte)(32位系统) 范围 字符型 char 1 整型 int原创 2016-09-24 13:57:48 · 295 阅读 · 0 评论 -
Y2K Accounting Bug(poj-2586)
DescriptionAccounting for Computer Machinists (ACM) has sufferred from the Y2K bug and lost some vital data for preparing annual report for MS Inc. All what they remember is that MS Inc. posted原创 2016-09-24 15:18:10 · 446 阅读 · 0 评论 -
五大常用算法——分治法,动态规划,回溯法,分支界限法,贪心算法
分治算法一、基本概念 在计算机科学中,分治法是一种很重要的算法。字面上的解释是“分而治之”,就是把一个复杂的问题分成两个或更多的相同或相似的子问题,再把子问题分成更小的子问题……直到最后子问题可以简单的直接求解,原问题的解即子问题的解的合并。这个技巧是很多高效算法的基础,如排序算法(快速排序,归并排序),傅立叶变换(快速傅立叶变换)…… 任何一个可以用计算机求解的问题转载 2016-09-24 15:38:21 · 427 阅读 · 0 评论 -
Ubiquitous Religions(poj-2524)
并查集公式:int pre[51000];int fin(int x) // 查找{ int r=x; while(r!=pre[r]) { r=pre[r]; } int i=x,j; //路径压缩 while(pre[i]!=r) {原创 2016-09-24 20:36:38 · 243 阅读 · 0 评论 -
Tiling (poj-2506)
DescriptionIn how many ways can you tile a 2xn rectangle by 2x1 or 2x2 tiles? Here is a sample tiling of a 2x17 rectangle. InputInput is a sequence of lines, each line containing an原创 2016-09-26 20:03:54 · 370 阅读 · 0 评论 -
poj 3273 Monthly Expense
http://poj.org/problem?id=3273#include #include #include using namespace std;#define max 100001int day[max];int n,m;int main(){ int i,j; int sum,cnt,ma,low,high,mid;#include #includ原创 2016-10-15 20:17:06 · 312 阅读 · 0 评论 -
The Suspects poj1611
http://poj.org/problem?id=1611 并查集学习:l 并查集:(union-find sets)一种简单的用途广泛的集合. 并查集是若干个不相交集合,能够实现较快的合并和判断元素所在集合的操作,应用很多,如其求无向图的连通分量个数等。最完美的应用当属:实现Kruskar算法求最小生成树。l 并转载 2016-11-15 20:33:55 · 308 阅读 · 0 评论