![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
水题
KubeSpace
这个作者很懒,什么都没留下…
展开
-
hdu 1200 To and Fro
没什么好说的。。。#include #includeusing namespace std;int main(){// freopen("in.txt","r",stdin); char str[205]; char a[200][25]; int n,f; while(cin>>n&&n) { getchar(); cin>>str; int i原创 2013-04-03 18:31:16 · 612 阅读 · 0 评论 -
hdu 1321 ,小水。。。
#include #includeusing namespace std;int main(){// freopen("in.txt","r",stdin); char str[75]; int n; scanf("%d",&n); getchar(); while(n--) { gets(str); for(int i=strlen(str)-1;i>=0;i--原创 2013-04-07 20:39:45 · 478 阅读 · 0 评论 -
hdu1303 Doubles
虽然很水。但是,第一种过了,第二种竟然一直wa。。。#include using namespace std;int main(){ int a[20]; int x; while(scanf("%d",&x)==1&&(x!=-1)) { a[0]=x; int n=1; while(scanf("%d",&x)==1&&x) a[n++]=x;原创 2013-04-26 21:05:54 · 673 阅读 · 0 评论 -
hdu 1064
#include float s=0,a=0;int i=0;main(){ for(;i<12;i++,scanf("%f",&a),s+=a); printf("$%.2f\n",s/12.0);}原创 2013-04-21 17:36:29 · 465 阅读 · 0 评论 -
hdu Biker's Trip Odometer
知道了题意之后,很水的一道题。题意:给定一个轮子的直径,轮子转的圈数,和轮子转的时间。求轮子转的总的路程和速度!#includeusing namespace std;#define PI 3.1415927int main(){ double d,t; int res,x=1; while(scanf("%lf %d %lf",&d,&res,&t)==3&&res) {原创 2013-05-19 13:38:40 · 464 阅读 · 0 评论 -
hdu 1034 Candy Sharing Game
纯模拟题。。。#includeusing namespace std;int a[1000];int b[1000];bool flag;int main(){ int n,c; while(scanf("%d",&n)==1&&n) { for(int i=0;i<n;i++) scanf("%d",&a[i]); c=0; while(true)原创 2013-05-19 14:01:40 · 482 阅读 · 0 评论 -
poj 1003 && hdu 1056 HangOver
直接贴代码。水!#includedouble s,n;int c;main(){ while(scanf("%lf",&n)==1&&n>0) { for(c=1,s=0.5;s<n;c++) s+=(1.0/(c+2)); printf("%d card(s)\n",c); }}原创 2013-05-19 13:17:49 · 438 阅读 · 0 评论 -
hdu 1031 Design T-Shirt
两次排序搞定!第一次把总数排下序。第二次把前K个按照index排下序。。。 #include #includeusing namespace std;struct Element{ int num; float sum;}ele[1010];int n,m,k;int cmp1(Element a,Element b){ retu原创 2013-05-06 14:15:04 · 410 阅读 · 0 评论