EricYang

Tech Spot of Eric

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2012年8月15日

摘要: 字符串比较函数,这个函数也比较常用:view plaincopy to clipboardprint?int strcmp(const char* str1,const char* str2){ assert(str1!=NULL&&str2!=NULL); while(*str1&&*str2&&*str1==*str2){ str1++; str2++; } if(*str1==*str2&&*str1==0) return 0;//equal else if(*str1... 阅读全文
posted @ 2012-08-15 23:17 Eric-Yang 阅读(756) 评论(0) 推荐(0) 编辑

摘要: Brackets SequenceTime Limit:1000MSMemory Limit:65536KTotal Submissions:19727Accepted:5465Special JudgeDescriptionLet us define a regular brackets sequence in the following way:1. Empty sequence is a regular sequence.2. If S is a regular sequence, then (S) and [S] are both regular sequences.3. If A a 阅读全文
posted @ 2012-08-15 16:04 Eric-Yang 阅读(175) 评论(0) 推荐(0) 编辑

摘要: Mondriaan's DreamTime Limit:3000MSMemory Limit:65536KTotal Submissions:7991Accepted:4605DescriptionSquares and rectangles fascinated the famous Dutch painter Piet Mondriaan. One night, after producing the drawings in his 'toilet series' (where he had to use his toilet paper to draw on, f 阅读全文
posted @ 2012-08-15 16:01 Eric-Yang 阅读(282) 评论(0) 推荐(0) 编辑