
poj
dragoo1
这个作者很懒,什么都没留下…
展开
-
poj1001 Wrong Answer
#include#includeusing namespace std;string fun(string& s1, string& s2){ int size = s2.size()+s1.size(); char* pbuf2 = new char[size+1]; memset(pbuf2, '0', size); pbuf2[size]='\0'; int s1dot原创 2012-10-30 01:43:21 · 1417 阅读 · 0 评论 -
poj1002 Output Limit Exceeded
#include using namespace std;#include #include typedef struct node{ char pbuf[20]; int pcount; struct node* left; struct node* right;}node;void insertnode(node* ppar, node* pnew){ if(str原创 2012-11-12 22:25:46 · 1941 阅读 · 0 评论 -
poj 1005
#include #include int main(){ int i, n; std::vector v; std::cin>>n; v.resize(n*2); for(i=0; i<n; i++) std::cin>>v[i*2]>>v[i*2+1]; for(i=0; i<n; i++){ std::cout<<"Property "<<i+1<<": This原创 2012-12-01 16:20:26 · 870 阅读 · 0 评论 -
poj 1003
#include int main(){ float f = 1.0f; while(1) { scanf("%f", &f); if(f==0.00f) break; float sum = 0.0f; int i = 2; for(; sum<f; i++) sum += 1.0f/i; printf("%d card(s)\n",i-2);原创 2012-11-19 09:30:38 · 738 阅读 · 0 评论 -
poj 1006
#include #include int main(){ std::vector > vi; while(1) { std::vector vl(4); std::cin>>vl[0]>>vl[1]>>vl[2]>>vl[3]; if(vl[0]==-1 && vl[1]==-1 && vl[2]==-1 && vl[3]==-1) break; vi.push原创 2012-12-15 14:53:52 · 1054 阅读 · 0 评论 -
中国剩余定理
poj 1006是说一个数通过n个除数得到不同的余数,求总数http://poj.org/problem?id=1006&lang=zh-CN&change=true先看两个小学生题目1. 传说西汉大将韩信,由于比较年轻,开始他的部下对他不很佩服。有一次阅兵时,韩信要求士兵分三路纵队,结果末尾多2人,改成五路纵队,结果末尾多3人,再改成七路纵队,结果又余下2人,后来下级军官向他报告共有原创 2012-12-15 16:09:11 · 1004 阅读 · 0 评论 -
poj1007 Presentation Error
通过率:39% 难度:较难DNA SortingTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 46899 Accepted: 18311DescriptionOne measure of`原创 2013-03-10 23:18:37 · 2344 阅读 · 0 评论 -
poj1008
玛雅历Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 59578 Accepted: 18352Description上周末,M.A. Ya教授对古老的玛雅有了一个重大发现。从一个古老的节绳(玛雅人用于记事的工具)中,教授发现玛雅人使用了一个一年有365天的叫原创 2013-07-22 23:44:09 · 947 阅读 · 0 评论 -
poj 1004
#include int main(){ float f,sum=0.0f; int i=0; for(; i<12; i++){ scanf("%f", &f); sum+=f; } printf("$%.2f", sum/12);}下面是另一个人的 成绩,不知道代码怎么写的。想学习下52378916kingdom98760K0M原创 2012-11-28 09:27:12 · 666 阅读 · 0 评论