10 2016 档案

摘要:You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 ston 阅读全文
posted @ 2016-10-05 14:29 Bita 阅读(191) 评论(0) 推荐(0)
摘要:Write a function that takes a string as input and returns the string reversed. 翻译:写一个函数,输入一个字符串,返回反转的字符串。 分析: 大水题,转为字符数组,然后直接用系统内置函数反转后再变为字符串,顺利AC。 没想 阅读全文
posted @ 2016-10-05 14:00 Bita 阅读(188) 评论(0) 推荐(0)
摘要:Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements of nums except 阅读全文
posted @ 2016-10-04 16:44 Bita 阅读(160) 评论(0) 推荐(0)
摘要:废话不说,直接码代码: 阅读全文
posted @ 2016-10-04 12:28 Bita 阅读(232) 评论(0) 推荐(0)
摘要:虽然C++有cin函数,但看别人的程序,大多数人都用C的scanf来读入,其实是为了加快读写速度,难道C++还不如C吗!?其实cin效率之所以低,不是比C低级,是因为先把要输出的东西存入缓冲区,再输出,导致效率降低,而且是C++为了兼容C而采取的保守措施。 先讲一个cin中的函数——tie,证明ci 阅读全文
posted @ 2016-10-03 15:04 Bita 阅读(5126) 评论(1) 推荐(1)