- 博客(10)
- 收藏
- 关注
原创 zoj 3600
#include #include #include using namespace std; int t; double a,b; double run1() { return a*2+b*3+t*2.0/5.0; } double run2() { return a*2.5+3.75*b+t*2.5/4.0; } int sw(double a) { if((a-(int)a)>
2012-04-16 19:51:56 1003
原创 zoj 3610
很水的题目,但是没发现之前,打了很长的代码#include #include #include using namespace std; int main() { int t; string str1,str2,str; scanf("%d",&t); while(t--) { cin>>str1>>str2>>str; cout<<str2; printf(" will
2012-04-16 19:27:32 965
原创 zoj 3607
这题当时比赛的时候以为是dp,以为客人走了还会回来==! #include #include using namespace std; int main() { int pi[1001],ti[1001]; double temp,Maxtime,Max,Time; int t,n,i,sum; scanf("%d",&t); while(t--) { scanf("%d",&
2012-04-16 18:59:27 1293
原创 zoj 3609
比赛的时候卡在这里,都是我没有把题目看懂,m=1的情况没考虑好,直接当不存在处理了== 下面给一种暴力法 不过时间也是很快的 #include #include using namespace std; int t; int main() { int t,a,m,aa,ans,mm,i; scanf("%d",&t); while(t--) {
2012-04-15 18:45:53 727
原创 zoj 3203
题目 http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=3366 三分法 #include #include #include using namespace std; double H,h,D; double cal(double x) { return (h-x)*D/(H-x)+x; } int main
2012-04-13 13:28:58 1057
转载 算法艺术与信息学竞赛的相关题目
一.动态规划 参考资料: 刘汝佳《算法艺术与信息学竞赛》 《算法导论》 推荐题目: http://acm.pku.edu.cn/JudgeOnline/problem?id=1141 简单 http://acm.pku.edu.cn/JudgeOnline/problem?id=2288 中等,经典TSP问题 http://acm.pku.edu.cn/Judge
2012-04-13 09:39:15 1973
原创 zoj 2972
题目 http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2972 #include #include #include using namespace std; int Min(int a,int b) { if(a>b) return b; return a; } int main() { map mi[2];
2012-04-11 16:36:53 439
原创 zoj 3212
很简单的题目,不要想多就行 #include #include using namespace std; int main() { int num[16][16]; int t,sum,n,m,j,k,i; scanf("%d",&t); while(t--) { scanf("%d%d%d",&n,&m,&k); for(i=0;i<n;i++) { for(
2012-04-10 19:36:01 529
原创 zoj 3211
#include #include #include #include using namespace std; struct Node { int ai,bi; }tree[260]; bool cmp(Node a, Node b) { if(a.bi==b.bi) return a.ai>b.ai; return a.bi<b.bi; } int Max(int a,int
2012-04-10 18:44:43 500
原创 zoj 3204
最小生成树 Connect them Time Limit: 1 Second Memory Limit: 32768 KB You have n computers numbered from 1 to n and you want to connect them to make a small local area network (LAN). All con
2012-04-09 14:56:53 434
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人