
POJ学习
文章平均质量分 56
code_idiot
这个作者很懒,什么都没留下…
展开
-
POJ1050-矩阵压缩
To the MaxTime Limit: 1000MS Memory Limit: 10000K Total Submissions: 52454 Accepted: 27741 DescriptionGiven a two-dimensional array of positive and negative integers, a sub-rec...原创 2018-08-22 11:18:58 · 141 阅读 · 0 评论 -
POJ1107解题心得-注意除零问题
W's CipherTime Limit: 1000MS Memory Limit: 10000K Total Submissions: 5759 Accepted: 2883 DescriptionWeird Wally's Wireless Widgets, Inc. manufactures an eclectic assortment of ...原创 2018-08-25 20:52:58 · 202 阅读 · 0 评论 -
POJ1157-动态规划
题目链接:http://poj.org/problem?id=1157由于花有摆放顺序的限制,即后一种花只能放在前一种花所放的花盆的后面的花盆,所以动态规划的状态转移就比较容易写出来了。状态dp[i][j]表示的是前i种花放入前j个花盆中时的最大权值。则dp[i][j]=max{dp[i][j-1],dp[i-1][j-1]+a[i][j]}。代码如下:#include<...原创 2018-09-03 17:25:29 · 244 阅读 · 0 评论 -
POJ1161-最短路径
题目链接:http://poj.org/problem?id=1161先以区域为结点建图,用floyd算法计算区域间相隔的墙壁数,再遍历每个区域找到给定点能到达的最短区域。但是感觉自己的代码太难懂了原创 2018-09-03 19:55:20 · 188 阅读 · 0 评论 -
POJ1163-递归动态规划?
题目链接:http://poj.org/problem?id=1163其实个人感觉这道题可以算是记忆化深度优先搜索,也可以算是动态规划。如果认识上有错误请轻喷。。和之前的某道题很相似,能做出这道题也算是自己的学习成果吧!#include<cstdio>#include<cstring>using namespace std;int s[101][101]...原创 2018-09-03 19:59:58 · 159 阅读 · 0 评论 -
POJ1218-根的意义?
题目链接:http://poj.org/problem?id=1218这道题的原理貌似之前在哪里看过。#include<cstdio>#include<cmath>using namespace std;int main(){ int m; scanf("%d",&m); while(m--) { int n; scanf("%d"...原创 2018-09-03 20:04:02 · 197 阅读 · 0 评论 -
POJ1230-贪心
题目链接:http://poj.org/problem?id=1230贪心策略是遍历每列,把不合格的列中往右延申最长的墙去掉。但是做完这道题发现自己总是需要比较大的空间复杂度呀,不太好。。#include<cstdio>#include<cstring>#include<vector>using namespace std;struct W...原创 2018-09-03 20:07:07 · 328 阅读 · 0 评论 -
POJ1032学习-数论
ParliamentTime Limit: 1000MS Memory Limit: 10000K Total Submissions: 19708 Accepted: 8334 DescriptionNew convocation of The Fool Land's Parliament consists of N delegates. Acco...原创 2018-08-21 21:29:56 · 197 阅读 · 0 评论 -
POJ1017
PacketsTime Limit: 1000MS Memory Limit: 10000K Total Submissions: 61851 Accepted: 20957 DescriptionA factory produces products packed in square packets of the same height h and...原创 2018-08-21 21:26:50 · 365 阅读 · 0 评论 -
POJ1065-dilworth定理?
Wooden SticksTime Limit: 1000MS Memory Limit: 10000K Total Submissions: 25985 Accepted: 11248 DescriptionThere is a pile of n wooden sticks. The length and weight of each stick...原创 2018-08-23 11:00:10 · 187 阅读 · 0 评论 -
POJ1006
DescriptionSome people believe that there are three cycles in a person's life that start the day he or she is born. These three cycles are the physical, emotional, and intellectual cycles, and they ...原创 2018-04-29 21:41:51 · 415 阅读 · 0 评论 -
POJ1005
DescriptionFred Mapper is considering purchasing some land in Louisiana to build his house on. In the process of investigating the land, he learned that the state of Louisiana is actually shrinking ...原创 2018-04-29 16:34:40 · 214 阅读 · 0 评论 -
POJ1002
DescriptionBusinesses like to have memorable telephone numbers. One way to make a telephone number memorable is to have it spell a memorable word or phrase. For example, you can call the University ...原创 2018-04-28 23:30:46 · 303 阅读 · 0 评论 -
POJ1012
JosephTime Limit: 1000MS Memory Limit: 10000K Total Submissions: 57612 Accepted: 21938 DescriptionThe Joseph's problem is notoriously known. For those who are not familiar with...原创 2018-08-21 21:13:42 · 621 阅读 · 0 评论 -
POJ1317-取余的运算规则
题目链接:http://poj.org/problem?id=1317对题目所给运算规则的逆运算,注意取余的运算规则。#include<cstdio>#include<cstring>#include<map>using namespace std;char dic[]="_abcdefghijklmnopqrstuvwxyz.";char ...原创 2018-09-03 20:13:59 · 356 阅读 · 0 评论