摘要: poj2104 题意:给出n个数,有m次查询,每次查询要你找出 l 到 r 中第 k 大的数; 思路:划分树模板题 上述图片展现了查询时如何往下递推的过程 其中ly表示 [sl,l) 中有多少个数进入了左子树,num[ceng][r]表示[sl,r]中有多少个数进入了左子树,total表示[l,r] 阅读全文
posted @ 2018-11-28 23:30 cglong 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://nanti.jisuanke.com/t/30991 Feeling hungry, a cute hamster decides to order some take-away food (like fried chicken for only 3030 Yuan). H 阅读全文
posted @ 2018-09-15 10:26 cglong 阅读(168) 评论(0) 推荐(0) 编辑
摘要: ACM-ICPC 2018 南京赛区网络预赛E: 题目链接https://www.jisuanke.com/contest/1555?view=challenges Dlsj is competing in a contest with n (0 < n \le 20)n(0<n≤20) probl 阅读全文
posted @ 2018-09-14 17:30 cglong 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 题意:给你一张n*m的图,其中: “ . ”代表可以走的空地 “ # ”代表不能走的墙 “ * ”代表传送门,当你从一个非传送们走到一个传送门的时候,你只能选择传送到除这个传送们外其他的传送门,如过没有其他传送们可以走,你就会死掉;当你到达传送门是由其他传送们传送到的,你既可以选择继续传送,也可以选 阅读全文
posted @ 2018-08-12 10:16 cglong 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Trucking Time Limit: 20000/10000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 11419 Accepted Submission(s): 1101 Pro 阅读全文
posted @ 2018-08-06 21:17 cglong 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 转载自:https://www.cnblogs.com/luruiyuan/p/5914909.html 目标 STL中的next_permutation 函数和 prev_permutation 两个函数提供了对于一个特定排列P,求出其后一个排列P+1和前一个排列P-1的功能。 这里我们以next 阅读全文
posted @ 2018-08-03 10:46 cglong 阅读(264) 评论(0) 推荐(0) 编辑
摘要: 转载自:https://blog.csdn.net/bone_ace/article/details/46239187 凸包问题的五种解法 凸包问题的五种解法 2015年05月29日 17:58:51 阅读数:33660 2015年05月29日 17:58:51 阅读数:33660 阅读数:3366 阅读全文
posted @ 2018-08-02 17:19 cglong 阅读(3602) 评论(1) 推荐(1) 编辑
摘要: The Fortified Forest Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 7291 Accepted: 2031 Description Once upon a time, in a faraway land, t 阅读全文
posted @ 2018-08-02 17:16 cglong 阅读(165) 评论(0) 推荐(0) 编辑
摘要: Polycarp has quite recently learned about email aliases. Of course, he used to suspect that the case of the letters doesn't matter in email addresses. 阅读全文
posted @ 2018-08-02 15:56 cglong 阅读(277) 评论(0) 推荐(0) 编辑
摘要: Dasha decided to bake a big and tasty layer cake. In order to do that she went shopping and bought n rectangular cake layers. The length and the width 阅读全文
posted @ 2018-08-02 15:05 cglong 阅读(386) 评论(0) 推荐(0) 编辑