摘要: 很多问题中,我们会遇到有关名字排字典序的问题,这时候strcmp函数就派上了用场。 1.函数原型: extern int strcmp(const char *s1,const char * s2); int strncmp (const char * str1, const char * str2 阅读全文
posted @ 2021-01-26 21:43 _翩若惊鸿 阅读(714) 评论(0) 推荐(0)
摘要: 这个题其实挺容易的,但是自己写的代码就是没往容易的地方去想,不管是用字符串去接收输入,还是最后的数字排列以达到最小值,自己都想的无比复杂,相比之下,题解的代码真是无比优美: #include<iostream> #include<algorithm> #include<iomanip> #inclu 阅读全文
posted @ 2021-01-26 09:36 _翩若惊鸿 阅读(136) 评论(0) 推荐(0)