LeeBlog

导航

2011年3月13日 #

hdu 1234 开门人和关门人

摘要: 这个地方要用string.h中的几个函数,特别是strcmp,可以比较两个时间;#include<stdio.h>#include<stdlib.h>#include<string.h>struct e{ char s1[20],s2[20],s3[20];}p[1000005];int main( ){ int t,n; scanf( "%d",&t ); while( t-- ) { scanf( "%d",&n ); for( int i = 0; i < n; ++i ) scanf( & 阅读全文

posted @ 2011-03-13 22:36 LeeBlog 阅读(573) 评论(0) 推荐(0) 编辑

HDU 2022 海选女主角

摘要: #include<stdio.h>#include<math.h>int main( ){ int x,y; while( scanf( "%d%d",&y,&x ) != EOF ) { int py ,px,min,t; min = t = 0; py = px = 0x7fffffff; for( int i = 1; i <= y; ++i ) { for( int j = 1; j <= x; ++j ) { scanf( "%d",&t ); if( fabs( t ) > f 阅读全文

posted @ 2011-03-13 18:36 LeeBlog 阅读(371) 评论(0) 推荐(0) 编辑

hdu 1161 Eddy's mistakes

摘要: #include<stdio.h>#include<string.h>int main( ){ char str[1024] = {0}; while( ( gets( str ) ) ) { int i = 0; while( str[i] ) { if( str[i] >= 'A' && str[i] <= 'Z' ) str[i] += 32; ++i; } printf( "%s\n",str ); memset( str,0,sizeof( str ) ); } return 0; 阅读全文

posted @ 2011-03-13 09:46 LeeBlog 阅读(225) 评论(0) 推荐(0) 编辑