POJ 入门】的更多相关文章

先复习一下C的一些基本概念 1.C标准化输出:scanf int m,n; scanf("%d%d",&n,&m); 实际上scanf是有返回值的,且返回值的类型为int,为输入的个数.如: int m,n; printf("%d", scanf("%d%d",&n,&m) ); //输入 12 56 //输出 2 //输入 2 a a输入失败 //输出 1 //输入 a 5 a输入失败,则后面的也失败,故输出为0…
1.poj 3254  Corn Fields    状态压缩dp入门题 2.总结:二进制实在巧妙,以前从来没想过可以这样用. 题意:n行m列,1表示肥沃,0表示贫瘠,把牛放在肥沃处,要求所有牛不能相邻,求有多少种放法. #include<iostream> #include<cstring> #include<cmath> #include<queue> #include<algorithm> #include<cstdio> #d…
/****************************************************************** 题目: Double Queue(poj 3481) 链接: http://poj.org/problem?id=3481 算法: avl树(入门) *******************************************************************/ #include<cstdio> #include<cstring&…
/***************************************************************** 题目: Sliding Window(poj 2823) 链接: http://poj.org/problem?id=2823 题意: 给一个数列,找所有连续k个数的最小值和最大值. 算法: 单调队列(入门) *******************************************************************/ #include<…
最短路问题此类问题类型不多,变形较少 POJ 2449 Remmarguts' Date(中等)http://acm.pku.edu.cn/JudgeOnline/problem?id=2449题意:经典问题:K短路解法:dijkstra+A*(rec),方法很多相关:http://acm.pku.edu.cn/JudgeOnline/showcontest?contest_id=1144该题亦放在搜索推荐题中 POJ 3013 - Big Christmas Tree(基础)http://ac…
Tree Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 18205   Accepted: 5951 Description Give a tree with n vertices,each edge has a length(positive integer less than 1001). Define dist(u,v)=The min distance between node u and v. Give an…
http://poj.org/problem?id=1562                                                                                                    Oil Deposits Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 12595   Accepted: 6868 Description The GeoSurv…
rt,计算几何入门: TOYS Calculate the number of toys that land in each bin of a partitioned toy box. Mom and dad have a problem - their child John never puts his toys away when he is finished playing with them. They gave John a rectangular box to put his toy…
题目传送门:http://poj.org/problem?id=1579 Function Run Fun Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 20560   Accepted: 10325 Description We all love recursion! Don't we? Consider a three-parameter recursive function w(a, b, c): if a <=…
链接: http://poj.org/problem?id=3259 http://acm.hust.edu.cn/vjudge/contest/view.action?cid=22010#problem/B Wormholes Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 25079   Accepted: 8946 Description While exploring his many farms, Farmer…