2015年7月19日

C++如何连续输入多个可能含空格的字符串

摘要: 可以尝试如下方案,亲测可行。int main(){ string s1,s2; while(getline(cin,s1)&&getline(cin,s2)) { cout<<s1<<endl; cout<<s2<<endl; } retur... 阅读全文

posted @ 2015-07-19 19:07 Tob__yuhong 阅读(955) 评论(0) 推荐(0)

pat 1050. String Subtraction (20)

摘要: 1050. String Subtraction (20)时间限制10 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueGiven two strings S1and S2, S = S1- S2is defined to be the remai... 阅读全文

posted @ 2015-07-19 18:50 Tob__yuhong 阅读(175) 评论(0) 推荐(0)

pat 1041. Be Unique (20)

摘要: 1041. Be Unique (20)时间限制100 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueBeing unique is so important to people on Mars that even their lottery i... 阅读全文

posted @ 2015-07-19 16:51 Tob__yuhong 阅读(130) 评论(0) 推荐(0)

pat 1084. Broken Keyboard (20)

摘要: 1084. Broken Keyboard (20)时间限制200 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueOn a broken keyboard, some of the keys are worn out. So when you t... 阅读全文

posted @ 2015-07-19 15:12 Tob__yuhong 阅读(141) 评论(0) 推荐(0)

pat 1092. To Buy or Not to Buy (20)

摘要: 1092. To Buy or Not to Buy (20)时间限制100 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueEva would like to make a string of beads with her favorite co... 阅读全文

posted @ 2015-07-19 14:36 Tob__yuhong 阅读(160) 评论(0) 推荐(0)

pat 1070. Mooncake (25)

摘要: 1070. Mooncake (25)时间限制100 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueMooncake is a Chinese bakery product traditionally eaten during the Mid-A... 阅读全文

posted @ 2015-07-19 11:21 Tob__yuhong 阅读(172) 评论(0) 推荐(0)

pat 1046. Shortest Distance (20)

摘要: 1046. Shortest Distance (20)时间限制100 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueThe task is really simple: given N exits on a highway which form... 阅读全文

posted @ 2015-07-19 10:42 Tob__yuhong 阅读(372) 评论(0) 推荐(0)

导航