X-man

导航

2013年4月30日 #

硬币水题II

摘要: #include<stdio.h>int main(){ int _case; double p; scanf("%d",&_case); while(_case--) { scanf("%lf",&p); printf("%.2lf\n",1/p/(1-p)); } return 0;}http://www.bnuoj.com/bnuoj/problem_show.php?pid=29064 阅读全文

posted @ 2013-04-30 21:23 雨钝风轻 阅读(178) 评论(2) 推荐(0) 编辑

沙漠之旅

摘要: #include<stdio.h>#include<algorithm>#include<iostream>using namespace std;int a[1005];int main(){ int _case,l,x,n; int i,j,k,g; scanf("%d",&_case); while(_case--) { scanf("%d %d %d",&l,&x,&n); for(i=0;i<n;i++) scanf("%d",&a[i]); 阅读全文

posted @ 2013-04-30 21:11 雨钝风轻 阅读(214) 评论(2) 推荐(0) 编辑

DP汇总

摘要: 1.1010. Whack the Groundhog http://soj.me/show_problem.php?pid=1010&cid=1004 题解:http://www.cnblogs.com/A-way/2.团队建设 http://www.bnuoj.com/bnuoj/contest_show.php?cid=1605#problem/179593.Taiko taiko http://www.bnuoj.com/bnuoj/contest_show.php?cid=1605#problem/17960 阅读全文

posted @ 2013-04-30 19:52 雨钝风轻 阅读(181) 评论(0) 推荐(0) 编辑

sicily 8058. Matrix

摘要: #include<stdio.h>int a[1005][1005];int main(){ int n,m,q,_case; char c; int x,x1,x2,y1,y2,t; int ii,i,j; scanf("%d",&_case); while(_case--) { scanf("%d %d %d",&n,&m,&q); for(i=0;i<n;i++) for(j=0;j<m;j++) scanf("%d",&a[i][j]); for(i=0;i< 阅读全文

posted @ 2013-04-30 19:44 雨钝风轻 阅读(141) 评论(0) 推荐(0) 编辑

sicily 1001. Black Magic

摘要: #include<stdio.h>#include<string.h>int main(){ int _case; int n,m,k; scanf("%d",&_case); while(_case--) { scanf("%d %d %d",&n,&m,&k); int t,sum=0; //k=p; for(t=n;t>=0;t-=m) { sum+=t; if(k-sum<=0)break; } //printf("... 阅读全文

posted @ 2013-04-30 19:39 雨钝风轻 阅读(128) 评论(0) 推荐(0) 编辑

L. 斩

摘要: http://www.bnuoj.com/bnuoj/contest_show.php?cid=1605#problem/17966#include<stdio.h>#include<math.h>int main(){ int _case; int x1,x2,y1,y2,a,b,c; double x,xp,xm,xn,ym,yp,yn; double su; scanf("%d",&_case); while(_case--) { scanf("%d %d %d %d %d %d %d",&x1,&y 阅读全文

posted @ 2013-04-30 19:32 雨钝风轻 阅读(327) 评论(0) 推荐(0) 编辑