摘要:
View Code programvarbeginread();readln();for i:=1 to 2 dobeginend;write();end. 阅读全文
摘要:
完全背包:Piggy-Bank猪猪储蓄罐Time Limit:1000MS Memory Limit:65536KTotal Submit:14 Accepted:6DescriptionBefore ACM can do anything, a budget must be prepared and the necessary financial support obtained.ACM要正常运转的前提,准备并提供好一定的财务预算费用是必需的。The main income for this action comes from Irreversibly Bound Money (IBM).这 阅读全文
摘要:
题目:01背包:Bone Collector骨骼收集家Time Limit:1000MS Memory Limit:65536KTotal Submit:44 Accepted:7DescriptionMany years ago , in Teddy’s hometown there was a man who was called “Bone Collector”.许多年前,在泰迪镇有这么一个骨骼收集家。This man like to collect varies of bones , such as dog’s , cow’s , also he went to the grave … 阅读全文
摘要:
题目:【培训习题.动态规划】8.7pasture三角形牧场Time Limit:1000MS Memory Limit:65536KTotal Submit:32 Accepted:6Description和所有人一样,奶牛喜欢变化。它们正在设想新造型的牧场。奶牛建筑师Hei想建造围有漂亮白色栅栏的三角形牧场。她拥有N(3≤N≤40)块木板,每块的长度Li(1≤Li≤40)都是整数,她想用所有的木板围成一个三角形使得牧场面积最大。请帮助Hei小姐构造这样的牧场,并计算出这个最大牧场的面积。Input第1行:一个整数N第2..N+1行:每行包含一个整数,即是木板长度。Output仅一个整数:最大 阅读全文
摘要:
题目:代码:#include<stdio.h>
#include<stdlib.h>
int f[501][501]={0},value[501]={0},book[501]={0},ans[501][501]={0};
int n,k;
int
max(int a,int b)
{ if(a>b)return a; return b;
}
int min(int a,int b)
{ if(a<b)return a; return b;
} void
printf_ans(int i,int e)
{ int j; if(i==1){ printf(&qu 阅读全文
摘要:
题目:http://60.191.162.158:8080/JudgeOnline/showproblem?problem_id=1230代码:#include<stdio.h>
int f[10001]={0},task[10001][3]={0},time[10001][3]={0};
int main()
{ int n,k,i,j,p; scanf("%d%d",&n,&k); p=0; for(i=1;i<=k;i++){ scanf("%d %d",&task[i][1],&task[i][2 阅读全文
摘要:
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
int bs(int a){ if(a<0)return -a; return a;
} int min
(int a,int b,int c){ int temp; temp=b; if(a<b)temp=a; if(c<temp)temp=c; return temp;
}
int f[2001][2001]={0};
int main()
{ int i,j,k,l1,l2... 阅读全文