摘要: codeforces 910c 转自两位大佬:http://www.cnblogs.com/wkfvawl/p/9387634.html https://i.cnblogs.com/EditPosts.aspx?opt=1 You are given an array a consisting of 阅读全文
posted @ 2018-08-08 14:47 我的秘密小屋 阅读(203) 评论(0) 推荐(0)
摘要: codeforces 1003d n个硬币,q次询问。第二行给你n个硬币的面值(保证都是2的次幂!)。每次询问组成b块钱,最少需要多少个硬币? Example Input 5 42 4 8 2 4851410 Input Output 反向迭代器的rbegin和rend的位置 和正向迭代器的begi 阅读全文
posted @ 2018-08-08 10:43 我的秘密小屋 阅读(1581) 评论(0) 推荐(0)
摘要: 1.使用string.h中的strrev函数 2.使用algorithm中的reverse函数 1.strrev函数只对字符数组有效,对string类型是无效的。 2.reverse函数是反转容器中的内容,对字符数组无效。 阅读全文
posted @ 2018-08-08 10:17 我的秘密小屋 阅读(367) 评论(0) 推荐(0)