上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 38 下一页

2018年7月25日

求解区间问题的三种做法的区别 线段树、树状数组、RMQ

摘要: 树状数组主要用于计算区间的和,在区间元素修改值的时候能够快速修改而不是以O(n)的复杂度进行修改; 线段树是把区间以树的形式分拆为若干个小区间,每个小区间存的都有一个值(树状数组的元素存的是区间值),所以线段树可以快速获得这个区间里面的所有的节点(元素),主要用于计算每个区间的最大最小元素(也可以快 阅读全文

posted @ 2018-07-25 11:37 九月旧约 阅读(202) 评论(0) 推荐(1) 编辑

徐州邀请赛 江苏 icpc I. T-shirt 矩阵快速幂

摘要: 题目 题目描述 JSZKC is going to spend his vacation! His vacation has N days. Each day, he can choose a T-shirt to wear. Obviously, he doesn’t want to wear a 阅读全文

posted @ 2018-07-25 10:45 九月旧约 阅读(196) 评论(0) 推荐(0) 编辑

2018年7月24日

江苏 徐州邀请赛 icpc B Array dp 滚动数组模板

摘要: 题目 题目描述 JSZKC is the captain of the lala team. There are N girls in the lala team. And their height is [1,N] and distinct. So it means there are no tw 阅读全文

posted @ 2018-07-24 22:02 九月旧约 阅读(216) 评论(0) 推荐(0) 编辑

icpc 江苏 D Persona5 组合数学 大数阶乘(分段阶乘) 大数阶乘模板

摘要: Persona5 is a famous video game. In the game, you are going to build relationship with your friends. You have NN friends and each friends have his upp 阅读全文

posted @ 2018-07-24 20:49 九月旧约 阅读(481) 评论(0) 推荐(0) 编辑

杭电2018暑假多校第一场 D Distinct Values hdu6301 贪心

摘要: Distinct Values Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1411 Accepted Submission(s): 439 阅读全文

posted @ 2018-07-24 10:33 九月旧约 阅读(139) 评论(0) 推荐(0) 编辑

2018年7月23日

牛客小白月赛5 D 阶乘 数学

摘要: 链接:https://www.nowcoder.com/acm/contest/135/D来源:牛客网 题目描述 输入描述: 输入数据共一行,一个正整数n,意义如“问题描述”。 输出描述: 输出一行描述答案:一个正整数k,表示S的末尾有k个0 <!-- <br/> <h5 style="font-s 阅读全文

posted @ 2018-07-23 10:49 九月旧约 阅读(220) 评论(0) 推荐(0) 编辑

2018年7月22日

J farm

摘要: #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define pb push_back #define mp make_pair #define fi first #define se se... 阅读全文

posted @ 2018-07-22 15:53 九月旧约 阅读(199) 评论(0) 推荐(0) 编辑

2018年7月21日

牛客网暑期ACM多校训练营(第二场) I Car 思维

摘要: 链接:https://www.nowcoder.com/acm/contest/140/I来源:牛客网 White Cloud has a square of n*n from (1,1) to (n,n). White Rabbit wants to put in several cars. Ea 阅读全文

posted @ 2018-07-21 20:32 九月旧约 阅读(212) 评论(0) 推荐(0) 编辑

牛客网暑期ACM多校训练营(第二场) D money 思维

摘要: 链接:https://www.nowcoder.com/acm/contest/140/D来源:牛客网 White Cloud has built n stores numbered from 1 to n. White Rabbit wants to visit these stores in t 阅读全文

posted @ 2018-07-21 17:34 九月旧约 阅读(230) 评论(0) 推荐(0) 编辑

牛客网暑期ACM多校训练营(第二场) 题解 A run 递推 dp

摘要: 链接:https://www.nowcoder.com/acm/contest/140/A来源:牛客网 White Cloud is exercising in the playground. White Cloud can walk 1 meters or run k meters per sec 阅读全文

posted @ 2018-07-21 17:22 九月旧约 阅读(309) 评论(0) 推荐(0) 编辑

上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 38 下一页

导航