摘要: 题目1 : String reorder时间限制:10000ms单点时限:1000ms内存限制:256MBDescriptionFor this question, your program is required to process an input string containing only ASCII characters between ‘0’ and ‘9’, or between ‘a’ and ‘z’ (including ‘0’, ‘9’, ‘a’, ‘z’).Your program should reorder and split all input string ch 阅读全文
posted @ 2014-04-12 21:30 z陵 阅读(317) 评论(0) 推荐(0) 编辑
摘要: 一,c/c++字符串1.C/C++中每个字符串都以字符’\0‘作为结尾,这样我们就能很方便地找到字符串的最后尾部。由于这个原因每个字符串都有一个额外的开销,注意字符串越界的问题;2.C/C++内存模型把字符串常量放到单独的一个内存区域;当几个指针指向相同的字符串常量的时候,他们实际上会指向常量区那个的内存地址;但是用字符串常量初始化数组,情况却不一样,这点很重要,考察你C能力的筹码;test.c:1234567891011121314151617181920212223242526272829#includeintmain(){charstr1[]="helloworld" 阅读全文
posted @ 2014-04-12 10:00 z陵 阅读(2923) 评论(2) 推荐(1) 编辑