07 2018 档案

HDU5461 Largest Point 思维 2015沈阳icpc
摘要:Largest Point Time Limit: 1500/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 3065 Accepted Submission(s): 1078 P 阅读全文

posted @ 2018-07-31 21:55 九月旧约 阅读(439) 评论(0) 推荐(0)

HDU 5451 Best Solver 数论 快速幂 2015沈阳icpc
摘要:Best Solver Time Limit: 1500/1000 MS (Java/Others) Memory Limit: 65535/102400 K (Java/Others)Total Submission(s): 1115 Accepted Submission(s): 645 Pro 阅读全文

posted @ 2018-07-31 21:45 九月旧约 阅读(155) 评论(0) 推荐(0)

HDU 4565 So Easy! 广义斐波拉数 数论 (a+sqrt(b))^n%mod 模板
摘要:So Easy! Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5905 Accepted Submission(s): 1966 Proble 阅读全文

posted @ 2018-07-31 21:24 九月旧约 阅读(232) 评论(0) 推荐(0)

杜教模板 根据前几个数求线性递推得到的后几个结果
摘要:#include #include #include #include #include #include #include #include #include using namespace std; #define rep(i,a,n) for (int i=a;i=a;i--) #define pb push_back #define mp make_pair #defi... 阅读全文

posted @ 2018-07-31 18:53 九月旧约 阅读(161) 评论(0) 推荐(0)

牛客小白赛5 无关(relationship) 容斥原理(计算因子数的模板)
摘要:链接:https://www.nowcoder.com/acm/contest/135/A来源:牛客网 若一个集合A内所有的元素都不是正整数N的因数,则称N与集合A无关。 给出一个含有k个元素的集合A={a1,a2,a3,...,ak},求区间[L,R]内与A无关的正整数的个数。 保证A内的元素都是 阅读全文

posted @ 2018-07-30 10:41 九月旧约 阅读(215) 评论(0) 推荐(0)

ACM-ICPC 2017 Asia Urumqi:A. Coins(DP) 组合数学
摘要:Alice and Bob are playing a simple game. They line up a row of nn identical coins, all with the heads facing down onto the table and the tails upward. 阅读全文

posted @ 2018-07-29 21:07 九月旧约 阅读(263) 评论(0) 推荐(0)

牛客网暑期ACM多校训练营(第四场) G Maximum Mode 思维
摘要:链接:https://www.nowcoder.com/acm/contest/142/G来源:牛客网 The mode of an integer sequence is the value that appears most often. Chiaki has n integers a1,a2, 阅读全文

posted @ 2018-07-28 20:05 九月旧约 阅读(238) 评论(0) 推荐(0)

牛客网暑期ACM多校训练营(第三场) J Distance to Work 计算几何求圆与多边形相交面积模板
摘要:链接:https://www.nowcoder.com/acm/contest/141/J来源:牛客网 Eddy has graduated from college. Currently, he is finding his future job and a place to live. Sinc 阅读全文

posted @ 2018-07-27 20:45 九月旧约 阅读(537) 评论(0) 推荐(0)

杭电多校第二场 hdu 6315 Naive Operations 线段树变形
摘要:Naive Operations Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 502768/502768 K (Java/Others)Total Submission(s): 2114 Accepted Submission(s): 9 阅读全文

posted @ 2018-07-27 17:30 九月旧约 阅读(213) 评论(0) 推荐(0)

牛客网暑期ACM多校训练营(第三场) A PACM Team 01背包 记录路径
摘要:链接:https://www.nowcoder.com/acm/contest/141/A来源:牛客网 Eddy was a contestant participating in ACM ICPC contests. ACM is short for Algorithm, Coding, Math 阅读全文

posted @ 2018-07-27 15:07 九月旧约 阅读(338) 评论(0) 推荐(0)

牛客网暑期ACM多校训练营(第三场) E Sort String 哈希处理字符串(模板)
摘要:链接:https://www.nowcoder.com/acm/contest/141/E来源:牛客网 Eddy likes to play with string which is a sequence of characters. One day, Eddy has played with a 阅读全文

posted @ 2018-07-27 11:42 九月旧约 阅读(186) 评论(0) 推荐(0)

牛客网暑期ACM多校训练营(第三场) C Shuffle Cards 平衡树 rope的运用
摘要:链接:https://www.nowcoder.com/acm/contest/141/C来源:牛客网 Eddy likes to play cards game since there are always lots of randomness in the game. For most of t 阅读全文

posted @ 2018-07-26 20:36 九月旧约 阅读(231) 评论(0) 推荐(0)

hdu6312 2018杭电多校第二场 1004 D Game 博弈
摘要:Game Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 184 Accepted Submission(s): 132 Problem Desc 阅读全文

posted @ 2018-07-25 22:00 九月旧约 阅读(620) 评论(0) 推荐(1)

牛客小白月赛 G 异或 找规律
摘要:链接:https://www.nowcoder.com/acm/contest/135/G来源:牛客网 题目描述 从前,Apojacsleam家的水族箱里,养了一群热带鱼。 在这几条热带鱼里,Apojacsleam特别喜欢一条叫做TbGx(请勿人肉)的热带鱼,所以每次都让她第一个吃食物。对于每一条鱼 阅读全文

posted @ 2018-07-25 17:23 九月旧约 阅读(325) 评论(0) 推荐(0)

树状数组求区间和模板 区间可修改 参考题目:牛客小白月赛 I 区间
摘要:从前有个东西叫树状数组,它可以轻易实现一些简单的序列操作,比如单点修改,区间求和;区间修改,单点求值等. 但是我们经常需要更高级的操作,比如区间修改区间查询.这时候树状数组就不起作用了,只能选择写一个2000GB的线段树交上去然后被卡常—–或者另一个选择是写ZKW线段树,会好一些. 再但是…谁告诉你 阅读全文

posted @ 2018-07-25 16:42 九月旧约 阅读(267) 评论(0) 推荐(0)

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

posted @ 2018-07-25 11:37 九月旧约 阅读(226) 评论(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 九月旧约 阅读(209) 评论(0) 推荐(0)

江苏 徐州邀请赛 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 九月旧约 阅读(226) 评论(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 九月旧约 阅读(504) 评论(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 九月旧约 阅读(155) 评论(0) 推荐(0)

牛客小白月赛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 九月旧约 阅读(239) 评论(0) 推荐(0)

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 九月旧约 阅读(206) 评论(0) 推荐(0)

牛客网暑期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 九月旧约 阅读(230) 评论(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 九月旧约 阅读(245) 评论(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 九月旧约 阅读(320) 评论(0) 推荐(0)

染色 Wannafly挑战赛20 A 思维
摘要:链接:https://www.nowcoder.com/acm/contest/133/A来源:牛客网 现在有一棵被Samsara-Karma染了k种颜色的树,每种颜色有着不同的价值 Applese觉得Samsara-Karma染的太难看了,于是打算把整棵树重新染成同一种颜色 但是,由于一些奥妙重重 阅读全文

posted @ 2018-07-21 10:05 九月旧约 阅读(196) 评论(0) 推荐(0)

Symmetric Matrix 牛客网暑期ACM多校训练营(第一场) B dp 组合数学
摘要:Count the number of n x n matrices A satisfying the following condition modulo m. * Ai, j ∈ {0, 1, 2} for all 1 ≤ i, j ≤ n. * Ai, j = Aj, i for all 1 阅读全文

posted @ 2018-07-20 16:05 九月旧约 阅读(192) 评论(0) 推荐(0)

Different Integers 牛客网暑期ACM多校训练营(第一场) J 离线+线状数组或者主席树
摘要:Given a sequence of integers a1, a2, ..., an and q pairs of integers (l 1, r1), (l2, r2), ..., (lq, rq), find count(l1, r1), count(l2, r2), ..., count 阅读全文

posted @ 2018-07-20 10:37 九月旧约 阅读(143) 评论(0) 推荐(0)

Two Graphs 牛客网暑期ACM多校训练营(第一场)D 图论基础知识 全排列
摘要:链接:https://www.nowcoder.com/acm/contest/139/D来源:牛客网 Two undirected simple graphs and where are isomorphic when there exists a bijection on V satisfyin 阅读全文

posted @ 2018-07-19 21:27 九月旧约 阅读(536) 评论(0) 推荐(0)

CF1007B Pave the Parallelepiped 容斥原理
摘要:Pave the Parallelepiped time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Pave the Paralle 阅读全文

posted @ 2018-07-19 10:53 九月旧约 阅读(273) 评论(0) 推荐(1)

Relatively Prime Graph CF1009D 暴力 思维
摘要:Relatively Prime Graph time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Relatively Prime 阅读全文

posted @ 2018-07-18 20:11 九月旧约 阅读(164) 评论(0) 推荐(0)

Halloween treats HDU 1808 鸽巢(抽屉)原理
摘要:Halloween treats Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1097 Accepted Submission(s): 435 阅读全文

posted @ 2018-07-18 16:03 九月旧约 阅读(787) 评论(0) 推荐(0)

美团2018年CodeM大赛-资格赛 分数 暴力模拟
摘要:链接:https://www.nowcoder.com/acm/contest/138/D来源:牛客网 小胖参加了人生中最重要的比赛——MedoC资格赛。MedoC的资格赛由m轮构成,使用常见的“加权标准分”的规则。每位选手需要参加所有的m轮的比赛。在一轮中,能取得的分数为自己的成绩除掉最高分的成绩 阅读全文

posted @ 2018-07-18 10:43 九月旧约 阅读(435) 评论(0) 推荐(0)

hdu1521 排列组合 指数型母函数模板题
摘要:排列组合 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4891 Accepted Submission(s): 2122 Problem De 阅读全文

posted @ 2018-07-17 15:42 九月旧约 阅读(139) 评论(0) 推荐(0)

hdu 1028 Ignatius and the Princess III 母函数
摘要:Ignatius and the Princess III Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 24975 Accepted Subm 阅读全文

posted @ 2018-07-17 14:38 九月旧约 阅读(145) 评论(0) 推荐(0)

hdu2082 找单词 母函数模板
摘要:找单词 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 9239 Accepted Submission(s): 6445 Problem Des 阅读全文

posted @ 2018-07-17 14:25 九月旧约 阅读(153) 评论(0) 推荐(0)

POJ1833 排列 调用全排列函数 用copy函数节省时间 即使用了ios同步代码scanf还是比较快
摘要:排列 Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 21268 Accepted: 8049 Description 题目描述: 大家知道,给出正整数n,则1到n这n个数可以构成n!种排列,把这些排列按照从小到大的顺序(字典顺序 阅读全文

posted @ 2018-07-16 21:46 九月旧约 阅读(233) 评论(0) 推荐(0)

POJ2084 Game of Connections 卡特兰数 关于卡特兰数经典的几个问题
摘要:Game of Connections Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 9128 Accepted: 4471 Description This is a small but ancient game. You a 阅读全文

posted @ 2018-07-16 21:17 九月旧约 阅读(424) 评论(0) 推荐(1)

POJ3233 Matrix Power Series 矩阵快速幂 矩阵中的矩阵
摘要:Matrix Power Series Time Limit: 3000MS Memory Limit: 131072K Total Submissions: 27277 Accepted: 11143 Description Given a n × n matrix A and a positiv 阅读全文

posted @ 2018-07-16 17:19 九月旧约 阅读(291) 评论(0) 推荐(0)

HDU2276 Kiki & Little Kiki 2 矩阵快速幂
摘要:Kiki & Little Kiki 2 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3078 Accepted Submission(s): 阅读全文

posted @ 2018-07-16 16:36 九月旧约 阅读(173) 评论(0) 推荐(0)

计蒜客 ACM训练联盟周赛 第一场 Christina式方格取数 思维
摘要:助手Christina发明了一种方格取数的新玩法:在n*m的方格棋盘里,每个格子里写一个数。两个人轮流给格子染色,直到所有格子都染了色。在所有格子染色完后,计算双方的分数。对于任意两个相邻(即有公共边)的格子,如果它们都被同一个人染色,那么这个人将得到这两个格子中的数的异或的分数。所有的分数加和计算 阅读全文

posted @ 2018-07-16 14:26 九月旧约 阅读(345) 评论(0) 推荐(0)

计蒜客 ACM训练联盟周赛 第一场 从零开始的神棍之路 暴力dfs
摘要:题目描述 ggwdwsbs最近被Zeratul和Kyurem拉入了日本麻将的坑。现在,ggwdwsbs有13张牌,Kyurem又打了一张,加起来有14张牌。ggwdwsbs想拜托你帮他判断一下,这14张牌能否和。 为了方便起见,本题不考虑字牌,即只有万,筒,条三种类型的牌,牌上带有数字1~9,相同的 阅读全文

posted @ 2018-07-16 12:08 九月旧约 阅读(350) 评论(0) 推荐(0)

计蒜客 ACM训练联盟周赛 第一场 Alice和Bob的Nim游戏 矩阵快速幂
摘要:题目描述 众所周知,Alice和Bob非常喜欢博弈,而且Alice永远是先手,Bob永远是后手。 Alice和Bob面前有3堆石子,Alice和Bob每次轮流拿某堆石子中的若干个石子(不可以是0个),拿到所有石子中最后一个石子的人获胜。这是一个只有3堆石子的Nim游戏。 Bob错误的认为,三堆石子的 阅读全文

posted @ 2018-07-16 11:33 九月旧约 阅读(234) 评论(0) 推荐(0)

POJ 3070 Fibonacci 矩阵快速幂模板
摘要:Fibonacci Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 18607 Accepted: 12920 Description In the Fibonacci integer sequence, F0 = 0, F1 = 阅读全文

posted @ 2018-07-16 11:20 九月旧约 阅读(165) 评论(0) 推荐(0)

CodeM 美团资格赛 思维 dfs
摘要:链接:https://www.nowcoder.com/acm/contest/138/C来源:牛客网 世界杯就要开始啦!真真正正的战斗从淘汰赛开始,现在我们给出球队之间的胜负概率,来预测每支球队夺冠的可能性。 在接下来的篇幅中,我们将简单介绍淘汰赛阶段的规则。 淘汰赛阶段的90分钟常规时间内(含补 阅读全文

posted @ 2018-07-15 21:09 九月旧约 阅读(264) 评论(0) 推荐(0)

CodeM 资格赛 B 可乐 思维
摘要:分析: 我们假设购买一种可乐p瓶,我们可以得到期望:p*(m/n*a[i]+(n-m)/n*b[i]),由这个式子我们可以看出唯一的变量是i,所以可以遍历i找出式子的最大值 #include <map> #include <set> #include <stack> #include <cmath> 阅读全文

posted @ 2018-07-15 19:43 九月旧约 阅读(166) 评论(0) 推荐(0)

CF1009B Minimum Ternary String 思维
摘要:Minimum Ternary String time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given a te 阅读全文

posted @ 2018-07-15 16:39 九月旧约 阅读(173) 评论(0) 推荐(0)

CF1005E1 Median on Segments (Permutations Edition) 思维
摘要:Median on Segments (Permutations Edition) time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard outpu 阅读全文

posted @ 2018-07-15 16:09 九月旧约 阅读(422) 评论(0) 推荐(0)

CF1005C Summarize to the Power of Two 暴力 map
摘要:Summarize to the Power of Two time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output A sequence 阅读全文

posted @ 2018-07-15 15:13 九月旧约 阅读(279) 评论(0) 推荐(0)

CF1005D Polycarp and Div 3 思维
摘要:Polycarp and Div 3 time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output Polycarp and Div 3 ti 阅读全文

posted @ 2018-07-15 14:40 九月旧约 阅读(243) 评论(0) 推荐(0)

CF1003D Coins and Queries 贪心
摘要:Coins and Queries time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Coins and Queries time 阅读全文

posted @ 2018-07-15 14:33 九月旧约 阅读(196) 评论(0) 推荐(0)

循环求组合数 组合数打表模板
摘要:#include using namespace std; int c[1005][1005]; int main(){ memset(c,0,sizeof(c)); c[0][0] = 1; for(int i = 1; i <= 1000; i ++){ for(int j = 0; j <= i; j ++) if(j == 0 || j == i) c[i]... 阅读全文

posted @ 2018-07-14 22:26 九月旧约 阅读(243) 评论(0) 推荐(0)

Covered Points Count CF1000C 思维 前缀和 贪心
摘要:Covered Points Count time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output Covered Points Coun 阅读全文

posted @ 2018-07-14 20:10 九月旧约 阅读(581) 评论(0) 推荐(0)

Light It Up CF1000B 思维
摘要:Light It Up time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Light It Up time limit per te 阅读全文

posted @ 2018-07-14 17:27 九月旧约 阅读(191) 评论(0) 推荐(0)

CF980C Posterized 贪心 二十五
摘要:Posterized time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Professor Ibrahim has prepared 阅读全文

posted @ 2018-07-01 16:34 九月旧约 阅读(129) 评论(0) 推荐(0)

CF980B Marlin 构造 思维 二十四
摘要:Marlin time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output The city of Fishtopia can be imagi 阅读全文

posted @ 2018-07-01 16:01 九月旧约 阅读(173) 评论(0) 推荐(0)

CF981C Useful Decomposition 树 dfs 二十三 *
摘要:Useful Decomposition time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Ramesses knows a lot 阅读全文

posted @ 2018-07-01 15:27 九月旧约 阅读(237) 评论(0) 推荐(0)

CF981B Businessmen Problems map 模拟 二十二
摘要:Businessmen Problems time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Two famous competin 阅读全文

posted @ 2018-07-01 14:30 九月旧约 阅读(197) 评论(0) 推荐(0)

CF982C Cut 'em all! DFS 树 * 二十一
摘要:Cut 'em all! time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Cut 'em all! time limit per 阅读全文

posted @ 2018-07-01 14:14 九月旧约 阅读(211) 评论(0) 推荐(0)

导航