
常用技巧
文章平均质量分 78
ummmmm
这个作者很懒,什么都没留下…
展开
-
[尺取法 (双指针)] Subsequence POJ 3061
SubsequenceTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 19633 Accepted: 8401DescriptionA sequence of N positive integers (10 < N < 100 000), each of them less than or equal 10000, a...原创 2018-07-08 19:23:00 · 110 阅读 · 0 评论 -
[AC自动机+矩阵快速幂] 求长度为m的不包含某些给定子串的字符串数量 POJ2778
DNA SequenceTime Limit: 1000MS Memory Limit: 65536K Total Submissions: 19748 Accepted: 7525 DescriptionIt's well known that DNA Sequence is a sequence only contains A, C, T and...原创 2018-09-28 21:26:23 · 409 阅读 · 0 评论 -
[求逆序对] Petr and Permutations CF987E
E. Petr and Permutationstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPetr likes to come up with problems about randomly gener...原创 2018-11-21 16:39:45 · 348 阅读 · 0 评论 -
[位运算] F. AND Graph CF987F
F. AND Graphtime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a set of size mm with integer elements between 00 and ...原创 2018-11-21 21:41:44 · 196 阅读 · 0 评论 -
[差分序列] 判断给出的牌能否只出顺子出完 101775L SOS
J. Straight Mastertime limit per test2.0 smemory limit per test256 MBinputstandard inputoutputstandard outputA straight is a poker hand containing five cards of sequential rank, not ...原创 2018-11-22 19:58:55 · 248 阅读 · 0 评论 -
【主席树/分块前缀】求矩阵中最少几个数之和≥给定数 洛谷P2468
题目描述幸福幼儿园B29班的粟粟是一个聪明机灵、乖巧可爱的小朋友,她的爱好是画画和读书,尤其喜欢Thomas H. Cormen的文章。粟粟家中有一个R行C列的巨型书架,书架的每一个位置都摆有一本书,上数第i行、左数第j列摆放的书有Pi,j页厚。粟粟每天除了读书之外,还有一件必不可少的工作就是摘苹果,她每天必须摘取一个指定的苹果。粟粟家果树上的苹果有的高、有的低,但无论如何凭粟粟自己的个头...原创 2019-01-13 00:16:01 · 152 阅读 · 0 评论 -
[单调队列] 求固定大小矩阵内最大最小值 洛谷P2216
题目描述有一个a*b的整数组成的矩阵,现请你从中找出一个n*n的正方形区域,使得该区域所有数中的最大值和最小值的差最小。输入输出格式输入格式: 第一行为3个整数,分别表示a,b,n的值第二行至第a+1行每行为b个非负整数,表示矩阵中相应位置上的数。每行相邻两数之间用一空格分隔。 输出格式: 仅一个整数,为a*b矩阵中所有“n*n正方形区域中的最大整数和最小整...原创 2019-01-16 17:05:52 · 563 阅读 · 0 评论 -
[交互式+随机] 询问求等差数列 CF1114E
E. Arithmetic Progressiontime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThis is an interactive problem!An arithmetic progress...原创 2019-02-27 16:32:43 · 229 阅读 · 0 评论 -
[线段树+欧拉函数+状态压缩] 区间修改 求区间积的欧拉函数 CF1114F
F. Please, another Queries on Array?time limit per test5.5 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an arraya1,a2,…,ana1,a2,…,a...原创 2019-02-28 19:37:02 · 371 阅读 · 0 评论 -
[二进制完全多重背包] Transport Ship 计蒜客
26.89% 1000ms 65536KThere are NN different kinds of transport ships on the port. The i^{th}ith kind of ship can carry the weight of V[i]V[i] and the number of the i^{th}ith kind of ship is 2^{C[...原创 2018-09-16 18:26:14 · 294 阅读 · 0 评论 -
[折半枚举] Difference HDU - 5936
DifferenceTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1467 Accepted Submission(s): 404 Problem DescriptionLittle Ruins is playing...原创 2018-09-15 19:22:36 · 179 阅读 · 0 评论 -
【树状数组求逆序对】Swaps and Inversions HDU6318 2018多校第二场
Swaps and InversionsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1489 Accepted Submission(s): 542 Problem DescriptionLong long ago...原创 2018-07-27 16:09:33 · 165 阅读 · 0 评论 -
[快速幂] K - Can you find it 2015 ACM/ICPC Asia Regional Shanghai Online K
Given a prime number C(1≤C≤2×105)C(1≤C≤2×105), and three integers k1, b1, k2 (1≤k1,k2,b1≤109)(1≤k1,k2,b1≤109). Please find all pairs (a, b) which satisfied the equation ak1⋅n+b1ak1⋅n+b1 + bk2⋅n−k2+1bk...原创 2018-07-08 21:01:03 · 113 阅读 · 0 评论 -
[反转(开关问题)] Face The Right Way POJ 3276
Face The Right WayTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 6478 Accepted: 3006DescriptionFarmer John has arranged his N (1 ≤ N ≤ 5,000) cows in a row and many of them are facing forwa...原创 2018-07-09 17:41:30 · 141 阅读 · 0 评论 -
[反转(开关问题)] Fliptile POJ3279
FliptileTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 15259 Accepted: 5610DescriptionFarmer John knows that an intellectually satisfied cow is a happy cow who will give more milk. He has a...原创 2018-07-09 20:06:24 · 138 阅读 · 0 评论 -
[折半枚举] 4 Values whose Sum is 0 POJ 2785
4 Values whose Sum is 0Time Limit: 15000MS Memory Limit: 228000KTotal Submissions: 27860 Accepted: 8383Case Time Limit: 5000MSDescriptionThe SUM problem can be formulated as follows: given four lists ...原创 2018-07-10 12:11:42 · 132 阅读 · 0 评论 -
【单调栈/离散化/树状数组】 Beautiful Pair 洛谷P4755
题目描述小D有个数列 {a}\{a\}{a} ,当一个数对 (i,j)(i≤j)(i,j)(i\le j)(i,j)(i≤j) 满足 aia_iai 和 aja_jaj 的积不大于 ai,ai+1,⋯,aja_i,a_{i+1},\cdots,a_jai,ai+1,⋯,aj 中的最大值时,小D认为这个数对是美丽的.请你求出美丽的数对的数量。输入输出格式输入格式: 第一...原创 2018-07-18 09:40:21 · 196 阅读 · 0 评论 -
【贪心、双指针】 Distinct Values HDU6301 2018多校第一场
Distinct ValuesTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1620 Accepted Submission(s): 509 Problem DescriptionChiaki has an arra...原创 2018-07-24 10:36:20 · 156 阅读 · 0 评论 -
[线段树\离散化] D - Mayor's posters POJ - 2528
Mayor's postersTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 74974 Accepted: 21627DescriptionThe citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campa...原创 2018-07-13 15:00:24 · 257 阅读 · 0 评论 -
【矩阵快速幂】 Blocks POJ3746
3744:Blocks总时间限制: 1000ms 内存限制: 65536kB描述Panda has received an assignment of painting a line of blocks. Since Panda is such an intelligent boy, he start to think of a math problem of pain...原创 2018-07-25 21:11:27 · 209 阅读 · 0 评论 -
【对偶问题 + 三分】C. Freelancer's Dreams
C. Freelancer's Dreamstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputMikhail the Freelancer dreams of two things: to become a c...原创 2019-02-19 23:48:35 · 224 阅读 · 0 评论