![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
暑假集训
文章平均质量分 78
DTL66
细节决定成败
展开
-
HDU-1247 Hat’s Words【字典树(逆向思维)】
F - Hat’s WordsTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u DescriptionA hat’s word is a word in the dictionary that is the concatenation of exactly two other words in原创 2016-08-18 23:06:47 · 855 阅读 · 0 评论 -
ZZULI-1905 小火山的跳子游戏 【GCD+LCM】
Contest - 多校训练2(小火山专场)Problem A: 小火山的跳子游戏Time Limit: 1 Sec Memory Limit: 128 MB Submit: 384 Solved: 65SubmitStatusWeb Board Description小火山和火山火山在一块玩跳子游戏。规则如下: 1:跳子的起始位置为0,棋盘大小从1到N 2:每次跳子跳k步。 例原创 2016-08-10 19:14:43 · 367 阅读 · 0 评论 -
ZZULI-1905 小火山的围棋梦想 【BFS or DFS】
1908: 小火山的围棋梦想Time Limit: 1 Sec Memory Limit: 128 MB Submit: 210 Solved: 51SubmitStatusWeb Board Description小火山最近喜欢上了围棋。 对于围棋,其实小火山是一窍不通的。现在棋盘上,有很多小火山的棋子。 如果棋盘上有这样的一个位置, 那么这个位置也会变成小火山 的棋子;这样的位置原创 2016-08-10 20:33:46 · 602 阅读 · 0 评论 -
POJ-3061 Subsequence 【尺取基础题】
A - SubsequenceTime Limit:1000MS Memory Limit:65536KB 64bit IO Format:%lld & %llu SubmitStatusPracticePOJ 3061 Description A sequence of N positive integers (10 < N < 100 000), each of them原创 2016-08-11 09:52:27 · 322 阅读 · 0 评论 -
ZZULI-1913 小火山的计算能力 【模拟加减】
Contest - 多校训练2(小火山专场)Problem J: 小火山的计算能力Time Limit: 1 Sec Memory Limit: 128 MB Submit: 443 Solved: 106SubmitStatusWeb Board Description别人说小火山的计算能力不行,小火山很生气,于是他想证明自己,现在有一个表达式,他想计算出来。Input首先是一个t(1<=原创 2016-08-10 19:39:20 · 442 阅读 · 0 评论 -
POJ 2891 Strange Way to Express Integers 【中国剩余定理线性模方程合并(模板)】
Strange Way to Express IntegersTime Limit:1000MS Memory Limit:131072KB 64bit IO Format:%lld & %llu DescriptionElina is reading a book written by Rujia Liu, which introduces a strange way to expr原创 2016-08-23 12:19:29 · 432 阅读 · 0 评论 -
POJ-3320 Jessica's Reading Problem 【尺取(or 二分)+STL】
B - Jessica’s Reading ProblemTime Limit:1000MS Memory Limit:65536KB 64bit IO Format:%lld & %llu SubmitStatusPracticePOJ 3320 Description Jessica’s a very lovely girl wooed by lots of boys. R原创 2016-08-11 13:49:28 · 365 阅读 · 0 评论 -
ZZULI-1912 小火山的爱情密码 【尺取(OR 二分)+map】
1912: 小火山的爱情密码Time Limit: 1 Sec Memory Limit: 128 MB Submit: 246 Solved: 64SubmitStatusWeb Board Description小火山获得了一个字符串,然而大火山让小火山从里面截取一段字符串,并且让小火山截取的字符串满足一些字符达到一定数量。 小火山觉得很容易,但是他想要知道他至少得截取多长的字符串。原创 2016-08-11 16:24:41 · 662 阅读 · 0 评论 -
LIGHTOJ 1045 - Digits of Factorial 【阶乘取对数】
1045 - Digits of Factorial Time Limit: 2 second(s) Memory Limit: 32 MBDescriptionFactorial of an integer is defined by the following functionf(0) = 1f(n) = f(n - 1) * n, if(n > 0)So, fac原创 2016-08-23 21:02:57 · 873 阅读 · 0 评论 -
CodeForces 653A Bear and Three Balls 【sort+去重(unique)】
Bear and Three Ballr Time Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u scription:Limak is a little polar bear. He has n balls, the i-th ball has size ti.Limak wants to g原创 2016-08-22 21:48:42 · 384 阅读 · 0 评论 -
CodeForces 554B Ohana Cleans Up 【思维+map】
Ohana Cleans UpTime Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u DescriptionOhana Matsumae is trying to clean a room, which is divided up into an n by n grid of squares.原创 2016-08-22 21:21:48 · 292 阅读 · 0 评论 -
CodeForces 632B Co-prime Array 【GCD(互质)】
Co-prime ArrayTime Limit:1000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u DescriptionYou are given an array of n elements, you must make it a co-prime array in as few moves as possib原创 2016-08-22 20:59:32 · 347 阅读 · 0 评论 -
HDU-1874 畅通工程续 【dijkstra模板】
畅通工程续Time Limit: 3000/1000 MS ( Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 46054 Accepted Submission(s): 17145Problem Description某省自从实行了很多年的畅通工程计划后,终于修建了很原创 2016-08-06 21:50:10 · 277 阅读 · 0 评论 -
HDU OJ-1084 数塔
A - 数塔Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u SubmitStatus Description 在讲述DP算法的时候,一个经典的例子就是数塔问题,它是这样描述的: 有如下所示的数塔,要求从顶层走到底层,若每一步只能走到相邻的结点,则经过的结点的数字之和最大是多少原创 2016-08-08 14:46:02 · 217 阅读 · 0 评论 -
HDU-1176 免费馅饼 【DP数塔】
免费馅饼Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 41761 Accepted Submission(s): 14335Problem Description都说天上不会掉馅饼,但有一天gameboy正走在回家的原创 2016-08-09 00:59:39 · 250 阅读 · 0 评论 -
ZZULI OJ-1894 985的方格难题 【DP or 组合数取余】
985的方格难题Time Limit: 1 Sec Memory Limit: 128 MB Submit: 395 Solved: 87SubmitStatusWeb Board Description985走入了一个n * n的方格地图,他已经知道其中有一个格子是坏的。现在他要从(1, 1)走到(n, n),每次只可以向下或者向右走一步,问他能否到达(n,n)。若不能到达输出-1,反之输原创 2016-08-09 19:49:47 · 427 阅读 · 0 评论 -
HDU-2602 Bone Collector 【01背包裸题】
Bone CollectorTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 51478 Accepted Submission(s): 21677Problem Description Many years ago , in Te原创 2016-08-09 20:21:40 · 336 阅读 · 0 评论 -
HDU-2546 饭卡 【01背包模板题】
B - 饭卡Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u SubmitStatusPracticeHDU 2546 Description 电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可以购买成功(即使购买后卡原创 2016-08-09 21:21:33 · 551 阅读 · 0 评论 -
POJ-1745 Divisibility 【数塔模型】
J - DivisibilityTime Limit:1000MS Memory Limit:10000KB 64bit IO Format:%lld & %llu SubmitStatus Description Consider an arbitrary sequence of integers. One can place + or - operators between原创 2016-08-10 10:34:31 · 364 阅读 · 0 评论 -
CodeForces-632B Alice, Bob, Two Teams 【dp】
Alice, Bob, Two TeamsTime Limit:1500MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u DescriptionAlice and Bob are playing a game. The game involves splitting up game pieces into two team原创 2016-08-22 20:39:52 · 308 阅读 · 0 评论 -
POJ-1458 Common Subsequence 【LCS模板】
A - Common SubsequenceTime Limit:1000MS Memory Limit:10000KB 64bit IO Format:%lld & %llu SubmitStatus Description A subsequence of a given sequence is the given sequence with some elements (原创 2016-08-11 22:42:53 · 233 阅读 · 0 评论 -
CodeForces 597A Divisibility【二元一次方程(区间解数) 讨论)】
A. Divisibilitytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputFind the number of k-divisible numbers on th原创 2016-08-24 00:32:06 · 411 阅读 · 0 评论 -
最短路径学习总结
问题描述:给定图,求两点间的最短距离。 主要有三种算法: 1.floyd算法:枚举任意点作为中间点动态更新剩余点间的距离。优点:可以求出所给图中任意两点间的最小距离;缺点:时间复杂度高,点如果有达到三位数或者更多则不适用。适用于点较少的图。 主要步骤:1.确定所给图是有向图还是无向图; 2.初始化所有点的距离无穷,将所给的图存到邻接矩阵之中; 3.从第一个点开始枚举,对剩余的所有的以枚举点原创 2016-08-05 00:20:21 · 1353 阅读 · 0 评论 -
LIGHT OJ 1006 - Hex-a-bonacci 【化简递推式(DP)】
1006 - Hex-a-bonacci PDF (English)StatisticsForumTime Limit: 0.5 second(s)Memory Limit: 32 MBGiven a code (not optimized), and necessary inputs, you h原创 2016-08-25 21:03:28 · 421 阅读 · 0 评论 -
LIGHT OJ 1109 - False Ordering 【因子个数】
1109 - False Ordering PDF (English)StatisticsForumTime Limit: 1 second(s)Memory Limit: 32 MBWe define b is a Divisor of a number a if a is divisible b原创 2016-08-25 21:24:30 · 360 阅读 · 0 评论 -
LIGHT OJ 1307 - Counting Triangles【二分枚举】
1307 - Counting Triangles PDF (English)StatisticsForumTime Limit: 2 second(s)Memory Limit: 32 MBYou are given N sticks having distinct lengths; you ha原创 2016-08-25 21:45:03 · 490 阅读 · 0 评论 -
LIGHT OJ 1047 - Neighbor House 【DP数塔】
1047 - Neighbor House PDF (English)StatisticsForumTime Limit: 0.5 second(s)Memory Limit: 32 MBThe people of Mohammadpur have decided to paint each of原创 2016-08-25 21:57:46 · 292 阅读 · 0 评论 -
HDU-4907 Task schedule
J - Task scheduleTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u SubmitStatus Description 有一台机器,并且给你这台机器的工作表,工作表上有n个任务,机器在ti时间执行第i个任务,1秒即可完成1个任务。 有m个询问,每个询问有一个数字q,表示如果原创 2016-07-27 17:06:57 · 358 阅读 · 0 评论 -
LIGHT OJ 1122 - Digit Count【DP数塔】
1122 - Digit Count PDF (English)StatisticsForumTime Limit: 2 second(s)Memory Limit: 32 MBGiven a set of digits S, and an integer n, you have to find h原创 2016-08-25 22:40:23 · 407 阅读 · 0 评论 -
LIGHT OJ 1064 - Throwing Dice 【dp数塔+打表】
1064 - Throwing Dice PDF (English)StatisticsForumTime Limit: 2 second(s)Memory Limit: 32 MBn common cubic dice are thrown. What is the probability tha原创 2016-08-26 01:29:22 · 343 阅读 · 0 评论 -
LIGHT OJ 1189 - Sum of Factorials【贪心+递归】
1189 - Sum of Factorials PDF (English)StatisticsForumTime Limit: 0.5 second(s)Memory Limit: 32 MBGiven an integer n, you have to find whether it can b原创 2016-08-26 22:18:12 · 731 阅读 · 1 评论 -
LIGHT OJ 1331 - Agent J 【余弦定理+海伦公式】
1331 - Agent J PDF (English)StatisticsForumTime Limit: 1 second(s)Memory Limit: 32 MBAgent J is preparing to steal an antique diamond piece from a mus原创 2016-08-25 20:27:49 · 507 阅读 · 0 评论 -
LIGHT OJ 1225 - Palindromic Numbers (II)【回文数】
1225 - Palindromic Numbers (II) PDF (English)StatisticsForumTime Limit: 0.5 second(s)Memory Limit: 32 MBA palindromic number or numeral palindrome is原创 2016-08-25 20:14:17 · 468 阅读 · 0 评论 -
LIGHT OJ 1136 - Division by 3【找规律】
1136 - Division by 3 PDF (English)StatisticsForumTime Limit: 2 second(s)Memory Limit: 32 MBThere is sequence 1, 12, 123, 1234, ..., 12345678910, ... .原创 2016-08-25 20:03:12 · 507 阅读 · 0 评论 -
HDU 2063 过山车 【二分图最大匹配(匈牙利模板)】
过山车Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 19030 Accepted Submission(s): 8304Problem DescriptionRPG girls今天和大家一起去游乐场玩,终于可以坐原创 2016-08-24 21:26:19 · 377 阅读 · 0 评论 -
HDU-1257 最少拦截系统 【LIS转化模型(vector应用)】
最少拦截系统Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 34773 Accepted Submission(s): 13735Problem Description 某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统.但是这种原创 2016-08-12 17:53:00 · 377 阅读 · 0 评论 -
HDU-5748 Bellovin 【LIS(STL应用)】
BellovinTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 1061 Accepted Submission(s): 476Problem Description Peter has a sequence a1,a2,…,原创 2016-08-12 20:49:47 · 281 阅读 · 0 评论 -
HDU-1051 Wooden Sticks 【二维LIS(STL应用)+排序】
D - Wooden SticksTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u SubmitStatus Description There is a pile of n wooden sticks. The length and weight of each stick ar原创 2016-08-12 23:12:01 · 389 阅读 · 0 评论 -
HDU-1513 Palindrome 【LCS+滚动数组】
PalindromeTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 5241 Accepted Submission(s): 1796Problem Description A palindrome is a symmetrica原创 2016-08-13 09:22:36 · 281 阅读 · 0 评论 -
LIGHT OJ-1182 - Parity 【按位与】
1182 - Parity PDF (English)StatisticsForumTime Limit: 0.5 second(s)Memory Limit: 32 MBGiven an integer n, first we represent it in binary. Then we cou原创 2016-08-25 18:55:10 · 323 阅读 · 0 评论