- 博客(98)
- 收藏
- 关注
原创 HDU 4616 Game (树形DP+枚举思维方法)*
GameTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 2520 Accepted Submission(s): 857 Problem Description Nowadays, there are more an...
2018-08-31 20:02:21 234
原创 Codeforces 597D Subsequences (二维树状数组入门+DP优化) 高清重制版
For the given sequence with n different elements find the number of increasing subsequences with k + 1 elements. It is guaranteed that the answer is not greater than 8·1018.InputFirst line contain...
2018-08-31 14:50:09 392
原创 HDU 4858 项目管理 (莫队思想分块优化+暴力)
项目管理Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3664 Accepted Submission(s): 1367 Problem Description我们建造了一个大项目!这个项目有n个节点,用很多边连接起...
2018-08-30 23:38:03 180
原创 HDU 3938 Portal(并查集构建MST+离线处理)*
PortalTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2063 Accepted Submission(s): 1008 Problem DescriptionZLGG found a magic theory ...
2018-08-30 21:41:47 149
原创 HDU 2586 How far away ? (LCA_Tarjan)
How far away ?Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 23711 Accepted Submission(s): 9434 Problem DescriptionThere are n house...
2018-08-30 14:04:28 158
原创 HDU 5382 GCD?LCM? (组合数学+筛法)*
GCD?LCM! Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 371 Accepted Submission(s): 233 Problem Description First we...
2018-08-30 06:45:34 447
原创 ZOJ 3903 Ants (纯数学知识)
AntTime Limit: 1 Second Memory Limit: 32768 KBThere is an ant named Alice. Alice likes going hiking very much. Today, she wants to climb a cuboid. The length of cuboid's longest edge is n, ...
2018-08-29 19:28:50 225
原创 HDU 4661 Message Passing (树形DP+组合数学知识+拓扑排序计数思维)*
Message PassingTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1461 Accepted Submission(s): 541 Problem DescriptionThere are n peo...
2018-08-29 17:58:31 361
原创 HDU 6435 Problem J. CSGO (二进制枚举曼哈顿距离+思维)
Problem J. CSGOTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 885 Accepted Submission(s): 465 Problem DescriptionYou are playing C...
2018-08-29 08:11:48 269
原创 HDU 4681 String (LCS+暴力枚举)
StringTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 1883 Accepted Submission(s): 694 Problem DescriptionGiven 3 strings A, B, C, fi...
2018-08-28 21:04:43 197
原创 HDU 5532 Almost Sorted Array (LIS水题)
Almost Sorted ArrayTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 7902 Accepted Submission(s): 1835 Problem DescriptionWe are all ...
2018-08-28 15:27:26 203
原创 HDU 6447 YJJ's Salesman (线段树优化DP)
#pragma comment(linker, "/STACK:102400000,102400000")#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define lrt ...
2018-08-28 08:57:58 212
原创 HDU 4790 Just Random (概率 + 容斥思想+数学)
Just RandomTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3415 Accepted Submission(s): 1103 Problem Description Coach Pang and Uncl...
2018-08-27 23:26:53 157
原创 HDU 6438 Buy and Resell (贪心好题+优先队列)*
Buy and Resell Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1580 Accepted Submission(s): 548 Problem Description Th...
2018-08-27 16:48:01 127
原创 HDU 5702 Coprime (莫比乌斯反演+反向思维)*
CoprimeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 3135 Accepted Submission(s): 1220 Problem DescriptionThere are n people stan...
2018-08-26 21:59:53 1110
原创 HDU 4602 Partition (计数方法+组合知识)*
PartitionTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3582 Accepted Submission(s): 1402 Problem DescriptionDefine f(n) as the numb...
2018-08-26 16:11:41 168
原创 HDU 6446 Tree and Permutation (树形DP经典)
Tree and Permutation Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 541 Accepted Submission(s): 182 Problem Description...
2018-08-26 11:13:08 768
原创 HDU 6440 Dream (数论常识题)
Dream Time Limit: 12000/6000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 882 Accepted Submission(s): 111Special Judge Problem Description ...
2018-08-26 11:02:20 327 2
原创 数论常用模板部分整理
#pragma comment(linker, "/STACK:102400000,102400000")#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define lrt ...
2018-08-25 11:19:21 308
原创 HDU 5514 Frogs (容斥思想+数论知识)*
Frogs Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 4142 Accepted Submission(s): 1396 Problem Description There are ...
2018-08-25 08:04:35 176
原创 HDU 6415 Rikka with Nash Equilibrium(计数多维DP+思维)好题。。
Rikka with Nash Equilibrium Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others) Total Submission(s): 1754 Accepted Submission(s): 717 Problem De...
2018-08-25 00:53:10 225
原创 HDU 5593 ZYB's Tree (树形DP)
ZYB's Tree Time Limit: 3000/1500 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 787 Accepted Submission(s): 265 Problem Description ZYB h...
2018-08-24 20:59:19 234
原创 HDU 4675 GCD of Sequence (莫比乌斯反演第二种形式+组合数学)*
GCD of SequenceTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 1979 Accepted Submission(s): 701 Problem DescriptionAlice is playing a...
2018-08-24 14:37:42 272
原创 牛客网多校练习9 E Music Game (概率与计数)*
链接:https://www.nowcoder.com/acm/contest/147/E来源:牛客网 题目描述Niuniu likes to play OSU!We simplify the game OSU to the following problem. Given n and m, there are n clicks. Each click may succes...
2018-08-24 13:55:57 266
原创 HDU 6053 TrickGCD (莫比乌斯反演+数学分段处理)*
TrickGCDTime Limit: 5000/2500 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 4147 Accepted Submission(s): 1509 Problem DescriptionYou are given an array...
2018-08-23 16:33:37 176
原创 HDU 4705 Y (树形DP+计数)*
YTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 2865 Accepted Submission(s): 835 Problem Description Sample Input 4 1...
2018-08-23 14:39:26 150
原创 HDU 6390 GuGuFishtion(莫比乌斯函数+积性函数)
GuGuFishtion Time Limit: 3000/1500 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1403 Accepted Submission(s): 543 Problem Description Today...
2018-08-22 21:15:48 204
原创 数论文章----关于逆元的求法(欧拉定理,阶乘逆元,费马小定理,模质数p的情况)
乘法逆元对于缩系中的元素,每个数a均有唯一的与之对应的乘法逆元x,使得ax≡1(mod n)一个数有逆元的充分必要条件是gcd(a,n)=1,此时逆元唯一存在逆元的含义:模n意义下,1个数a如果有逆元x,那么除以a相当于乘以x。 下面给出求逆元的几种方法:1.扩展欧几里得给定模数m,求a的逆相当于求解ax=1(mod m)这个方程可以转化为ax-my=1然后套用求二元一...
2018-08-22 09:57:36 2234
原创 BZOJ 2820 YY的GCD (莫比乌斯反演+前缀和+二维分块)*
神犇YY虐完数论后给傻×kAc出了一题给定N, M,求1<=x<=N, 1<=y<=M且gcd(x, y)为质数的(x, y)有多少对kAc这种傻×必然不会了,于是向你来请教……多组输入Input第一行一个整数T 表述数据组数接下来T行,每行两个正整数,表示N, MOutputT行,每行一个整数表示第i组数据的结果Sample Input...
2018-08-22 07:50:15 176
原创 BZOJ 2440 完全平方数(莫比乌斯反演+分块处理+二分答案)*
小 X 自幼就很喜欢数。但奇怪的是,他十分讨厌完全平方数。他觉得这些数看起来很令人难受。由此,他也讨厌所有是完全平方数的正整数倍的数。然而这丝毫不影响他对其他数的热爱。这天是小X的生日,小 W 想送一个数给他作为生日礼物。当然他不能送一个小X讨厌的数。他列出了所有小X不讨厌的数,然后选取了第 K个数送给了小X。小X很开心地收下了。然而现在小 W 却记不起送给小X的是哪个数了。你能帮他一...
2018-08-21 21:17:07 254
原创 Codeforces round 19D Points(离线处理+Set集合的运用+离散化数据)好题
Pete and Bob invented a new interesting game. Bob takes a sheet of paper and locates a Cartesian coordinate system on it as follows: point (0, 0) is located in the bottom-left corner, Ox axis is direc...
2018-08-21 08:42:17 163
原创 HDU 6400 Parentheses Matrix (数学打表找规律)*
Parentheses MatrixTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 973 Accepted Submission(s): 385Special Judge Problem DescriptionA...
2018-08-21 07:18:52 138
原创 HDU 4666 Hyperspace (线段树+曼哈顿距离+离线查询)
HyperspaceTime Limit: 20000/10000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 1450 Accepted Submission(s): 708 Problem DescriptionThe great Mr.Smith ha...
2018-08-20 08:12:23 226
原创 ZOJ 3911 Prime Query (线段树基本操作)
Prime QueryTime Limit: 5 Seconds Memory Limit: 196608 KBYou are given a simple task. Given a sequence A[i] with N numbers. You have to perform Q operations on the given sequence.Here are ...
2018-08-20 00:21:00 220
原创 莫比乌斯反演与积性函数部分(转载)
https://blog.csdn.net/consciousman/article/details/77888386https://blog.csdn.net/skywalkert/article/details/50500009(偏理论)莫比乌斯与积性函数之前做过不少的数论题,关于莫比乌斯与积性函数的数论题挺多的。。。特地过来总结一下。。当作自己的一个回顾了-_-先安利一下神犇...
2018-08-19 23:49:07 1270
原创 HDU 4407 Sum (容斥定理+DFS搜索)
SumTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4278 Accepted Submission(s): 1227 Problem DescriptionXXX is puzzled with the quest...
2018-08-19 11:58:41 173
原创 HDU 6386 Age of Moyu (最短路变形+堆优化)
Age of MoyuTime Limit: 5000/2500 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 3125 Accepted Submission(s): 981 Problem DescriptionMr.Quin love fishes ...
2018-08-19 08:55:18 321
原创 Codeforces 877E Danil and a Part-time Job (DFS序+线段树)
Danil decided to earn some money, so he had found a part-time job. The interview have went well, so now he is a light switcher.Danil works in a rooted tree (undirected connected acyclic graph) with ...
2018-08-18 16:45:57 250
原创 HDU 2204 Eddy's爱好 (容斥原理)
Eddy's爱好Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3031 Accepted Submission(s): 1491 Problem DescriptionIgnatius 喜欢收集蝴蝶标本和邮票,但是E...
2018-08-18 13:53:27 519
原创 HDU 1695 GCD (容斥定理+数论性质)*
GCDTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 15656 Accepted Submission(s): 6024 Problem DescriptionGiven 5 integers: a, b, c, d...
2018-08-18 10:19:00 131
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人