- 博客(39)
- 收藏
- 关注
转载 POJ题目分类 [转]
大佬博客:传送门初期:一.基本算法: (1)枚举. (poj1753,poj2965) (2)贪心(poj1328,poj2109,poj2586) (3)递归和分治法. (4)递推. (5)构造法.(poj3295) (6)模拟法.(poj1068,poj2632,poj1573,poj2993,poj2996)二.图算法: (1)图的深度...
2018-06-29 16:44:45
245
原创 最短路 Flyod
最短路 Flyod 时间复杂度 : n^3(n为点的个数)#include<stdio.h>#include<stdlib.h>#include<string.h>#include<math.h>#include<algorithm>#include<queue>#include<stack>#inc
2018-06-15 15:35:57
292
原创 Dijkstra 有向图
Dijkstra 有向图#include<stdio.h>#include<stdlib.h>#include<string.h>#include<math.h>#include<algorithm>#include<queue>#include<stack>#include<deque
2018-06-15 15:29:26
664
原创 Dijkstra 无向图
Dijkstra 无向图#include<stdio.h>#include<stdlib.h>#include<string.h>#include<math.h>#include<algorithm>#include<queue>#include<stack>#include<deque
2018-06-15 15:28:07
552
原创 Bellman有向图
Bellman有向图#include<stdio.h>#include<stdlib.h>#include<string.h>#include<math.h>#include<algorithm>#include<queue>#include<stack>#include<deque&a
2018-06-14 20:43:56
338
原创 Bellman无向图
Bellman无向图#include<stdio.h>#include<stdlib.h>#include<string.h>#include<math.h>#include<algorithm>#include<queue>#include<stack>#include<deque>#
2018-06-14 20:43:01
518
原创 最小生成树 Prime Kruskal 算法
#include<stdio.h>#include<stdlib.h>#include<string.h>#include<math.h>#include<algorithm>#include<queue>#include<stack>#include<deque>#include&am
2018-06-02 08:55:43
396
原创 POJ 1611 The Suspects 并查集 详细题解
The SuspectsTime Limit:1000MS Memory Limit:20000KB 64bit IO Format:%I64d & %I64uDescription Severe acute respiratory syndrome (SARS)...
2018-05-23 09:10:24
228
原创 并查集简单操作及经典例题题解
并查集包括并和查两部分。实际操作中有三个函数与两个数组构成。两个数组:int deep[N] //用来存储该门派的树的深度 int captain[n] //用来存储n的上级是谁三个函数:1、初始化函数void init(int n){ int i,j...
2018-05-19 15:26:11
1034
原创 第九届山东省ACM竞赛总结
第九届山东省ACM竞赛总结 时间飞逝,转眼间大一已经接近尾声了,我仍然记得刚开学时对ACM的崇敬之情,当时为能否进ACM而担心,然后为能否留在ACM而担心,后来为能否参加省赛而担心。 备战省赛。首先,我要感谢集训队的师哥们,我能感受到师哥们对这次省赛的看重,因为这会成为许多师哥的退役赛,在这样的情...
2018-05-13 07:44:46
440
原创 HDU - 6025 Coprime Sequence
Coprime SequenceDo you know what is called ``Coprime Sequence''? That is a sequence consists of n positive integers, and the GCD (Greatest Common Divisor) o...
2018-05-03 21:26:01
291
原创 Marjar Cola
Marjar ColaMarjar Cola is on sale now! In order to attract more customers, Edward, the boss of Marjar Company, decides to launch a promotion: If...
2018-05-03 19:10:59
280
原创 Intervals
Intervals Chiaki has n intervals and the i-th of them is [li, ri]. She wants to delete some intervals so that there does not exist thr...
2018-05-03 16:48:46
400
原创 Log Files
Log Files Nikolay has decided to become the best programmer in the world! Now he regularly takes part in various prog...
2018-05-03 15:27:03
294
原创 Linearization of the kernel functions in SVM
Linearization of the kernel functions in SVM SVM(Support Vector Machine)is an important classification tool, which has a wide range of applications in cluster analysis, commun...
2018-05-03 09:01:16
263
原创 HDU Game with Pearls
Game with Pearls Tom and Jerry are playing a game with tubes and pearls. The rule of the game is: 1) Tom and Jerry come up together with a number K. ...
2018-05-03 08:49:53
225
原创 Tic-Tac-Toe
Tic-Tac-Toe Kim likes to play Tic-Tac-Toe. Given a current state, and now Kim is going to take his next move. Please tell Kim if he can win the game in next 2 moves if both player are clever enough. ...
2018-05-03 08:37:39
558
原创 第四届趣味编程大赛 小国的游戏
小国的游戏Time Limit: 1 Sec Memory Limit: 64 MBSubmit: 91 Solved: 24[Submit][Status][Discuss]Description可怜的小国和小辉在双十一过后,吃饭都吃不起了,只能在吃饭时间玩会游戏来打发时间。可是时间久了之后,他们各种游戏都玩了一遍,所以他们两个打算合作出一个新奇的游戏。最终,他们决定先做四个纸箱,每个纸箱里...
2018-04-25 09:19:32
589
原创 CF Mirrored String II
I. Mirrored String IItime limit per test1.0 smemory limit per test256 MBinputstandard inputoutputstandard outputNote: this is a harder version of Mirrored string I.The gorillas have recently discovere...
2018-04-25 09:06:10
207
原创 CF Make Cents?
M. Make Cents?time limit per test6.0 smemory limit per test256 MBinputstandard inputoutputstandard outputEvery year, an elephant qualifies to the Arab Collegiate Programming Competition. He graduated ...
2018-04-25 08:45:47
209
原创 经典博弈集合题解
一、威佐夫博弈有两堆石子,数量任意,可以不同。游戏开始由两个人轮流取石子。游戏规定,每次有两种不同的取法,一是可以在任意的一堆中取走任意多的石子;二是可以在两堆中同时取走相同数量的石子。最后把石子全部取完者为胜者。现在给出初始的两堆石子的数目,如果轮到你先取,假设双方都采取最好的策略,问最后你是胜者还是败者。 核心:if((int((b-a)*c))==a)P...
2018-04-20 17:33:15
2574
原创 POJ 2393 Yogurt factory
Yogurt factoryTime Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Description The cows have purchased a yogurt factory that makes world-famous Yucky Yogurt. Over the next N...
2018-04-19 16:47:44
164
原创 CF Playing With Strings
I. Playing With Stringstime limit per test 2.0 smemory limit per test 64 MBstandard outputDani and Mike are two kids ,They are playing games all day and when they don't find a game t...
2018-04-19 16:17:16
253
原创 HDU 1798 Tell me the area
Tell me the area Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uDescription There are two circles in the plane (shown in the below picture),...
2018-04-19 16:03:15
194
原创 abs fabs fabsf 用法
int abs(int i); //处理int类型的取绝对值double fabs(double i); //处理double类型的取绝对值float fabsf(float i); //处理float类型的取绝对值还有些待学习的强大的函数,如:ssanf swap atof(这一类的函数);...
2018-04-19 15:41:42
2261
原创 HDU 1013 Digital Roots 九余定理
Digital Roots Time Limit: 1 Sec Memory Limit: 64 MBDescriptionThe digital root of a ...
2018-04-12 14:59:58
237
原创 KMP经典超简约模板
形象浅显的解释如何及为何应用KMP算法:传送门#include<stdio.h> #include<string.h> char small[10009],big[1000009]; int check[10009]; int a,b; void preview() { int k=-1,j=0; check[0]=-1; ...
2018-04-07 17:38:17
201
原创 SDIBT 2322 Sorting a Three-Valued Sequence
Sorting a Three-Valued Sequence Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%lld & %lluDescription排序是一种很频繁的计算任务。现在考虑最多只有三值的排序问题。一个实际的例子是,当我们给某项竞赛的优胜者按...
2018-04-04 21:50:28
171
原创 HDU 3951 Coin Game
Coin Game Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uDescription After hh has learned how to play Nim...
2018-03-31 10:05:20
368
原创 SDUT 3275 LCM的个数
LCM的个数 Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%lld & %lluDescription 对于我们来说求两个数的LCM(最小公倍数)是很容易的事,现在我遇到了一个问题需要大家帮助我来解决这问题,问题是:给你一个数n,然后统计有多少对(a&l...
2018-03-31 09:49:46
232
原创 SDUT 2886 Weighted Median
Weighted Median Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%lld & %lluDescriptionFor n elements x1, x2, ..., xn with positive integer weights w1, w2, ..., wn...
2018-03-30 15:25:22
209
原创 CodeForces 939A(水题)
DescriptionAs you could know there are no male planes nor female planes. However, each plane on Earth likes some other plane. There are n planes on Earth, numbered from 1 to n, and the plane with numb...
2018-03-28 09:18:25
491
原创 Counting-out Rhyme 约瑟夫环
Counting-out Rhyme Time Limit:1000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64uSubmit Status Practic...
2018-03-28 08:48:56
317
原创 Codefroces194A Exams
H - ExamsTime Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64uSubmit Status Practice CodeForces 194A DescriptionOne day the Codeforces round author sat exams. He had n exam...
2018-03-11 10:27:13
229
原创 HDU 1009 FatMouse' Trade 贪心菜鸟题
FatMouse' TradeTime Limit: 1 Sec Memory Limit: 64 MBSubmit: 203 Solved: 160[Submit][Status][Discuss]DescriptionFatMouse prepared M pounds of cat food, ready to trade with the cats guarding the wareh...
2018-02-20 15:16:10
368
原创 POJ 1007 DNA Sorting 多个数组代替结构体
DNA SortingTime Limit: 1 Sec Memory Limit: 64 MBSubmit: 327 Solved: 140[Submit][Status][Discuss]DescriptionOne measure of ``unsortedness'' in a sequence is the number of pairs of entries that are ou...
2018-02-19 21:10:16
254
原创 Adding Reversed Numbers 数的反转
Adding Reversed NumbersTime Limit: 1 Sec Memory Limit: 64 MBSubmit: 300 Solved: 143[Submit][Status][Discuss]DescriptionThe Antique Comedians of Malidinesia prefer comedies to tragedies. Unfortunatel...
2018-02-18 16:49:00
543
原创 日常错误
第二届南晓程序设计竞赛新年赛-外网dalao狂欢 个人总结问题 A: 集训队日常之JBB的烦恼时间限制: 1 Sec 内存限制: 32 MB提交: 402 解决: 235[提交][状态][讨论]题目描述JBB一直有个大大的烦恼。她总是认为自己的才能适合行政工作,不适合写代码,不敢考卓工班。但是又怕跟BigBaiZhou说了以后会收到
2017-12-21 08:21:29
482
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人