- 博客(1485)
- 资源 (3)
- 收藏
- 关注
原创 hdoj 5211 Mutiple 【数学】
题目链接:hdoj 5211 Mutiple题意:给定n元素的序列a[],f[i]为最小的j满足a[j] % a[i] == 0,不存在为0。问你∑ni=1f[i]\sum_{i=1}^nf[i]。怎么搞都可以过,毕竟n太小。。。AC代码:#include #include #include #include #include #define CLR(a, b) mems
2016-04-07 17:22:49 288
原创 hdoj 5210 Delete 【水题】
题目链接:hdoj 5210 DeleteDeleteTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1049 Accepted Submission(s): 509Problem Description WLD l
2016-04-07 17:22:25 296
原创 hdoj 5256 序列变换 【LIS 变形】
题目链接:hdoj 5256 序列变换序列变换Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1184 Accepted Submission(s): 439Problem Description 我们有一个数列A1
2016-04-07 17:21:59 324
原创 hdoj 5253 连接的管道 【MST】
题目链接:hdoj 5253 连接的管道连接的管道Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1955 Accepted Submission(s): 685Problem Description 老 Jack
2016-04-07 17:21:37 370
原创 Codeforces 588E Duff in the Army 【树链剖分维护区间前k小】
题目链接:Codeforces 588E Duff in the ArmyE. Duff in the Army time limit per test4 seconds memory limit per test512 megabytes inputstandard input outputstandard output Recently Duff has been a soldi
2016-04-07 17:21:03 865
原创 Codeforces 588D Duff in Beach 【离散化 + dp】
题目链接:Codeforces 588D Duff in BeachD. Duff in Beach time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output While Duff was resting in the beach,
2016-04-07 17:20:16 565
原创 Codeforces 588C Duff and Weight Lifting 【数学】
题目链接:Codeforces 588C Duff and Weight LiftingC. Duff and Weight Lifting time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Recently, Duff ha
2016-04-07 17:19:40 472
原创 Codeforces 588B Duff in Love 【数学】
题目链接:Codeforces 588B Duff in Love B. Duff in Love time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Duff is in love with lovely numbers! A
2016-04-07 17:19:13 707
原创 Codeforces 588A Duff and Meat 【dp】
题目链接:Codeforces 588A Duff and MeatA. Duff and Meat time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Duff is addicted to meat! Malek wants to
2016-04-07 17:18:10 597
原创 Codeforces 616E Sum of Remainders 【数学分块】
题目链接:Codeforces 616E Sum of RemaindersE. Sum of Remainders time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Calculate the value of the sum
2016-04-05 16:58:57 499 1
原创 hdoj 1437 天气情况 【概率dp】
题目链接:hdoj 1437 天气情况天气情况Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 714 Accepted Submission(s): 291Problem Description 如果我们把天气分为雨...
2016-04-04 16:31:20 401 2
原创 hdoj 1434 幸福列车 【优先队列】
题目链接:hdoj 1434 幸福列车幸福列车Time Limit: 20000/10000 MS (Java/Others) Memory Limit: 131070/65535 K (Java/Others) Total Submission(s): 2134 Accepted Submission(s): 662Problem Description 一批幸福的列
2016-04-04 16:30:55 407
原创 hdoj 5656 CA Loves GCD 【dp】
题目链接:hdoj 5656 CA Loves GCD问题描述 CA喜欢是一个热爱党和人民的优秀同♂志,所以他也非常喜欢GCD(请在输入法中输入GCD得到CA喜欢GCD的原因)。 现在他有N个不同的数,每次他会从中选出若干个(至少一个数),求出所有数的GCD然后放回去。 为了使自己不会无聊,CA会把每种不同的选法都选一遍,CA想知道他得到的所有GCD的和是多少。 我们认为两种选法不同,
2016-04-04 16:30:28 364
原创 hdoj 1432 Lining Up 【思维】
题目链接:hdoj 1432 Lining UpLining UpTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 1255 Accepted Submission(s): 359Problem Description
2016-04-04 16:29:58 434
原创 hdoj 1428 漫步校园 【dp + 最短路】
题目链接:hdoj 1428 漫步校园漫步校园Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3754 Accepted Submission(s): 1140Problem Description LL最近沉迷于A
2016-04-04 16:29:28 562
原创 后缀数组模板
倍增:时间复杂度O(nlogn),数组均开n即可。int cmp(int *r, int a, int b, int l) { return (r[a] == r[b]) && (r[a+l] == r[b+l]);}int wa[MAXN], wb[MAXN], ws[MAXN], wv[MAXN];int R[MAXN];//下标0->n-1 存储的是1->n之间的数i
2016-04-04 16:28:56 324
原创 SPOJ DISUBSTR - Distinct Substrings or SUBST1 - New Distinct Substrings 【不同子串数目】
题目链接:SPOJ DISUBSTR - Distinct SubstringsDISUBSTR - Distinct Substrings no tags Given a string, we need to find the total number of its distinct substrings.InputT- number of test cases. TEach
2016-04-04 16:28:29 670
原创 poj 3261 Milk Patterns 【求重复k次的最长可重叠子串】
题目链接:poj 3261 Milk PatternsMilk Patterns Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 13092 Accepted: 5825 Case Time Limit: 2000MS DescriptionFarmer John has noticed
2016-04-04 16:28:04 328
原创 poj 1743 Musical Theme 【后缀数组 最长不重叠重复子串】
题目链接:poj 1743 Musical ThemeMusical Theme Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 24442 Accepted: 8233 DescriptionA musical melody is represented as a sequence of
2016-04-04 16:27:26 419
原创 Codeforces 367B Sereja ans Anagrams 【map维护queue】
题目链接:Codeforces 367B Sereja ans AnagramsB. Sereja ans Anagrams time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Sereja has two sequences
2016-04-01 19:06:06 620
原创 Codeforces 367A Sereja and Algorithm 【规律】
题目链接:Codeforces 367A Sereja and AlgorithmA. Sereja and Algorithm time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Sereja loves all sorts of
2016-04-01 19:04:53 722
原创 二维线段树和二维树状数组
二维线段树,支持单点更新、元素求和、查询最大值和最小值。代码:struct Nodey { int ly, ry, val, Max, Min, sum;//元素 最大值 最小值 元素和};int nx, ny;//横长 竖长int posx[MAXN], posy[MAXN];struct Nodex { int lx, rx; Nodey treey[MAXN<<
2016-04-01 12:22:57 981 3
原创 hdoj 4819 Mosaic 【二维线段树 单点更新 区间查询】
题目链接:hdoj 4819 MosaicMosaicTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 102400/102400 K (Java/Others) Total Submission(s): 1394 Accepted Submission(s): 601Problem Description The God o
2016-04-01 12:01:30 632
原创 Codeforces 659E New Reform 【DFS 求环】
题目链接:Codeforces 659E New ReformE. New Reform time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Berland has n cities connected by m bidirec
2016-04-01 10:49:00 487
原创 Codeforces 659D Bicycle Race 【判定点是否在多边形内部】
题目链接:Codeforces 659D Bicycle Race D. Bicycle Race time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Maria participates in a bicycle race.
2016-04-01 10:48:38 858
原创 Codeforces 659C Tanya and Toys 【水题】
题目链接:Codeforces 659C Tanya and ToysC. Tanya and Toys time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output In Berland recently a new collectio
2016-04-01 10:48:18 514
原创 Codeforces 659B Qualifying Contest 【模拟】
题目链接:Codeforces 659B Qualifying ContestB. Qualifying Contest time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Very soon Berland will hold
2016-04-01 10:47:57 487
原创 Codeforces 659A Round House 【小数学】
题目链接:Codeforces 659A Round HouseA. Round House time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Vasya lives in a round building, whose en
2016-04-01 10:47:33 397
原创 POJ 2019 Cornfields 【二维线段树】
题目链接:POJ 2019 CornfieldsCornfields Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 6269 Accepted: 3089 DescriptionFJ has decided to grow his own corn hybrid in order to help
2016-04-01 10:47:10 569
原创 hdoj 1823 Luck and Love 【二维线段树】
题目链接:hdoj 1823 Luck and LoveLuck and LoveTime Limit: 10000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 6172 Accepted Submission(s): 1557Problem De
2016-04-01 10:46:29 387
原创 Codeforces 366D Dima and Trap Graph 【并查集】
题目链接:Codeforces 366D Dima and Trap Graph D. Dima and Trap Graph time limit per test3 seconds memory limit per test256 megabytes inputstandard input outputstandard output Dima and Inna love spend
2016-03-31 15:08:00 717
原创 Codeforces 366C Dima and Salad 【dp】
题目链接:Codeforces 366C Dima and Salad C. Dima and Salad time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Dima, Inna and Seryozha have gather
2016-03-31 15:06:59 1008
原创 Codeforces 366B Dima and To-do List 【模拟】
题目链接:Codeforces 366B Dima and To-do List B. Dima and To-do List time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output You helped Dima to have a
2016-03-31 15:06:19 414
原创 Codeforces 366A Dima and Guards 【水题】
题目链接:Codeforces 366A Dima and Guards A. Dima and Guards time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Nothing has changed since the las
2016-03-31 15:05:00 373
原创 hdoj 5653 Bomber Man wants to bomb an Array. 【dp】
题目链接:hdoj 5653 Bomber Man wants to bomb an Array.
2016-03-29 15:26:39 364
原创 hdoj 5652 India and China Origins 【二分 + BFS】
题目链接:hdoj 5652 India and China Origins
2016-03-29 15:24:39 380
原创 hdoj 5651 xiaoxin juju needs help 【组合数学】
题目链接:hdoj 5651 xiaoxin juju needs help
2016-03-29 15:23:53 375
原创 Codeforces 652E Pursuit For Artifacts 【边双连通 缩点】
题目链接:Codeforces 652E Pursuit For ArtifactsE. Pursuit For Artifacts time limit per test3 seconds memory limit per test512 megabytes inputstandard input outputstandard output Johnny is playing a
2016-03-29 12:11:24 946
原创 Codeforces 652D Nested Segments 【树状数组 + 离散化】
题目链接:Codeforces 652D Nested SegmentsD. Nested Segments time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output You are given n segments on a li
2016-03-29 12:10:56 947
原创 Codeforces 652C Foe Pairs 【dp】
题目链接:Codeforces 652C Foe PairsC. Foe Pairs time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output You are given a permutation p of length n. Al
2016-03-29 12:10:22 634
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人