
ACM
文章平均质量分 82
fany3912
这个作者很懒,什么都没留下…
展开
-
Aizu 2251 Merry Christmas(二分图最大匹配+Floyd)
Merry ChristmasTime Limit : 8 sec, Memory Limit : 65536 KBProblem J: Merry ChristmasInternational Christmas Present Company (ICPC) is a company to employ Santa and deliver presents o原创 2015-05-30 12:23:39 · 580 阅读 · 0 评论 -
UVA 10765 (割点)
题意:给出一个无向图,求出鸽子值,鸽子值即是每删除一个点后有多少个连通块。思路:求割点,与割点相连的连通分量就是割点的鸽子值,非割点的点的鸽子值均为1。#include #include #include #include #include #include #include #include #include using namespace std;vec原创 2015-08-03 13:57:41 · 467 阅读 · 0 评论 -
HDU 5294 Tricks Device(最短路+最小割)
Tricks DeviceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1033 Accepted Submission(s): 250Problem DescriptionInnocent Wu follo原创 2015-07-22 17:18:19 · 421 阅读 · 0 评论 -
POJ 1144(求割点数)
NetworkTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 10624 Accepted: 4915DescriptionA Telephone Line Company (TLC) is establishing a new telephone cab原创 2015-08-02 19:18:31 · 337 阅读 · 0 评论 -
POJ 1961 (KMP)
PeriodTime Limit: 3000MS Memory Limit: 30000KTotal Submissions: 14739 Accepted: 7015DescriptionFor each prefix of a given string S with N characters (each charact原创 2015-08-16 23:25:26 · 300 阅读 · 0 评论 -
HDU 5353 Average(枚举)
AverageTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 678 Accepted Submission(s): 174Special JudgeProblem DescriptionThere原创 2015-08-06 23:00:19 · 358 阅读 · 0 评论 -
567D One-Dimensional Battle Ships(set)
D. One-Dimensional Battle Shipstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAlice and Bob love playing o原创 2015-08-08 11:57:58 · 425 阅读 · 0 评论 -
ZOJ 3790 Consecutive Blocks(尺取法)
Consecutive BlocksTime Limit: 2 Seconds Memory Limit: 65536 KBThere are N (1 ≤ N ≤ 105) colored blocks (numbered 1 to N from left to right) which are lined up in a row. And the i-th block原创 2015-08-21 18:17:24 · 409 阅读 · 0 评论 -
HDU 5416 CRB and Tree(dfs 异或逆运算)
CRB and TreeTime Limit: 8000/4000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 760 Accepted Submission(s): 248Problem DescriptionCRB has a tree,原创 2015-08-22 00:45:45 · 714 阅读 · 0 评论 -
UVA 1401 Remember the Word (trie + dp)
第一次写trie, 看别人的代码看懂的,顺便学了一下dp。#include #include #include #include #define mod 20071027;using namespace std;char str[300010], s[110];int dp[300010];struct Trie{ int ch[400010][26]; i原创 2015-10-24 19:05:34 · 403 阅读 · 0 评论 -
POJ 2001 Shortest Prefixes(字典树)
Shortest PrefixesTime Limit: 1000MS Memory Limit: 30000KB 64bit IO Format: %I64d & %I64uDescriptionA prefix of a string is a substring starting at the beginni原创 2015-10-27 13:19:51 · 455 阅读 · 0 评论 -
HDU 5288 OO’s Sequence (二分查找)
OO’s SequenceTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 569 Accepted Submission(s): 205Problem DescriptionOO has got a arr原创 2015-07-21 21:42:53 · 453 阅读 · 0 评论 -
HDU 5285 wyh2000 and pupil(染色法判断二分图)
wyh2000 and pupilTime Limit: 3000/1500 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 794 Accepted Submission(s): 260Problem DescriptionYoung theoret原创 2015-07-20 17:43:54 · 870 阅读 · 0 评论 -
zoj 3646 matrix transformer (二分匹配)
Matrix TransformerTime Limit: 2 Seconds Memory Limit: 65536 KBAlice and Bob meet again. This time they play a game named MATRIX TRANSFORMER.They got an n * n board. Every grid has two p原创 2015-05-30 10:52:09 · 341 阅读 · 0 评论 -
HDU 4496 D-City(并查集)
D-CityTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 2401 Accepted Submission(s): 841Problem DescriptionLuxer is a really ba原创 2015-05-31 18:40:44 · 442 阅读 · 0 评论 -
CodeForces 349B Color the Fence(完全背包)
B. Color the Fencetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIgor has fallen in love with Tanya. Now原创 2015-07-15 20:30:29 · 504 阅读 · 0 评论 -
Light OJ 1422 Halloween Costumes(区间DP)
1422 - Halloween CostumesPDF (English)StatisticsForumTime Limit: 2 second(s)Memory Limit: 32 MBGappu has a very busy weekend ahead of him. Because, next原创 2015-08-08 16:01:37 · 979 阅读 · 0 评论 -
codeforces 567C Geometric Progression
C. Geometric Progressiontime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp loves geometric progressio原创 2015-08-07 15:54:56 · 442 阅读 · 0 评论 -
POJ 3311 Hie with the Pie(状态压缩DP)
Hie with the PieTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 5323 Accepted: 2849DescriptionThe Pizazz Pizzeria prides itself in delivering pizzas to原创 2015-07-17 10:18:30 · 314 阅读 · 0 评论 -
HDU 5336 XYZ and Drops(bfs)
XYZ and DropsTime Limit: 3000/1500 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 736 Accepted Submission(s): 203Problem DescriptionXYZ is playing原创 2015-07-31 13:06:14 · 561 阅读 · 0 评论 -
UVALive 6800 The Mountain of Gold (bellman_ford判负环)
题意:给出一个有向图,问从0出发后能不能重新回到0并且总边权和为负。思路:以0为起点,用bellman_ford找负环,如果有负环,则说明0能走到负环,然后能再找一条从负环到0的路,则实现要求,因为在负权里可以多走几圈保证总边权为负。如何找有没有从负环到0的路:如果有负环,再跑一遍询问,如果进行松弛,则说明边的起点在负环内或负环能到达的点,把这些点标记,然后再扫一遍原来的边,如果边的起点和终点原创 2015-07-30 10:42:02 · 532 阅读 · 0 评论 -
HDU 1394 Minimum Inversion Number (线段数)
Minimum Inversion NumberTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 13951 Accepted Submission(s): 8519Problem Description转载 2015-07-31 14:47:34 · 382 阅读 · 0 评论 -
ZOJ 3620 Information(强联通分量)
InformationTime Limit: 2 Seconds Memory Limit: 32768 KB It is a war between Country Alpha and Country Beta. Country Alpha gets following information about Country Beta:Country Beta ha原创 2015-07-20 16:04:45 · 488 阅读 · 0 评论 -
UVa 11997 K Smallest Sums (优先队列)
题意:有 k 个整数数组,各包含 k 个元素。在每个数组中取一个元素加起来,可以得到哦 k^k 个和。求这些和中最小的 k 个值(重复的值算多次)思路:在《算法竞赛入门经典训练指南》中看到这道题,再自己写一写思路,加深理解。 从 k 个数组中各取一个元素之和中前 k 个最小的值为 k 个组合,则这 k 个组合一定来自前 k - 1 个数组中各取一个元素之和中前 k 个最原创 2016-04-08 20:54:36 · 452 阅读 · 0 评论