06 2017 档案

UVALive2857 POJ2578 HDU1037 ZOJ2186 Keep on Truckin'【水题】
摘要:Keep on Truckin'Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 8462 Accepted: 6418DescriptionBoudreaux and Thibodeaux are o... 阅读全文

posted @ 2017-06-30 18:37 海岛Blog 阅读(113) 评论(0) 推荐(0)

HDU1219 AC Me【输入输出】
摘要:AC MeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 18568 Accepted Submiss... 阅读全文

posted @ 2017-06-30 18:06 海岛Blog 阅读(200) 评论(0) 推荐(0)

HDU2520 我是菜鸟,我怕谁【水题】
摘要:我是菜鸟,我怕谁Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 10988 Accepted Subm... 阅读全文

posted @ 2017-06-30 10:42 海岛Blog 阅读(425) 评论(0) 推荐(0)

HDU2078 复习时间【水题】
摘要:复习时间Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 8574 Accepted Submissio... 阅读全文

posted @ 2017-06-30 08:57 海岛Blog 阅读(262) 评论(0) 推荐(0)

HDU2537 8球胜负【水题】
摘要:8球胜负Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5491 Accepted Submissio... 阅读全文

posted @ 2017-06-30 07:41 海岛Blog 阅读(220) 评论(0) 推荐(0)

HDU2521 反素数【因子数量+打表】
摘要:反素数Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6686 Accepted Submission... 阅读全文

posted @ 2017-06-29 06:27 海岛Blog 阅读(367) 评论(0) 推荐(0)

HDU2547 无剑无我【水题】
摘要:无剑无我Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5435 Accepted Submissio... 阅读全文

posted @ 2017-06-28 15:40 海岛Blog 阅读(242) 评论(0) 推荐(0)

HDU1205 吃糖果【水题】
摘要:吃糖果Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 39753 Accepted Submissio... 阅读全文

posted @ 2017-06-28 12:13 海岛Blog 阅读(183) 评论(0) 推荐(0)

HDU2568 前进【水题】
摘要:前进Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7326 Accepted Submission(... 阅读全文

posted @ 2017-06-28 11:22 海岛Blog 阅读(183) 评论(0) 推荐(0)

HDU2519 新生晚会【组合计算】
摘要:新生晚会Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 14344 Accepted Submissi... 阅读全文

posted @ 2017-06-27 09:57 海岛Blog 阅读(230) 评论(0) 推荐(0)

NUC1776 Tiling Up Blocks【二维最长上升子序列+DP】
摘要:Tiling Up Blocks时间限制: 1000ms 内存限制: 10000KB通过次数: 2总提交次数: 2问题描述Michael The Kid receives an interesting game set from his grandparent as ... 阅读全文

posted @ 2017-06-27 06:27 海岛Blog 阅读(233) 评论(0) 推荐(0)

NUC1840 Graveyard Design【尺取法】
摘要:Graveyard Design时间限制: 10000ms 内存限制: 64000KB通过次数: 1总提交次数: 1问题描述King George has recently decided that he would like to have a new design... 阅读全文

posted @ 2017-06-27 06:11 海岛Blog 阅读(137) 评论(0) 推荐(0)

NUC1429 WERTYU【输入输出】
摘要:WERTYU时间限制: 1000ms 内存限制: 65535KB通过次数: 1总提交次数: 1问题描述A common typing error is to place the hands on the keyboard one row to the right of... 阅读全文

posted @ 2017-06-27 06:04 海岛Blog 阅读(240) 评论(0) 推荐(0)

NUC1131 Triangle【DP】
摘要:Triangle时间限制: 1000ms 内存限制: 65536KB通过次数: 1总提交次数: 1问题描述图1表示一个数字三角形。73 88 1 02 7 4 44 5 2 6 5(图1)编写一个程序可以按照一种路线求得所划数字... 阅读全文

posted @ 2017-06-27 05:54 海岛Blog 阅读(175) 评论(0) 推荐(0)

NUC1154 Vertical Histogram【打印图案】
摘要:Vertical Histogram时间限制: 1000ms 内存限制: 10000KB通过次数: 1总提交次数: 1问题描述Write a program to read four lines of upper case (i.e., all CAPITAL LET... 阅读全文

posted @ 2017-06-27 05:36 海岛Blog 阅读(173) 评论(0) 推荐(0)

NUC1158 Lake Counting【DFS】
摘要:Lake Counting时间限制: 1000ms 内存限制: 65536KB通过次数: 1总提交次数: 1问题描述Due to recent rains, water has pooled in various places in Farmer John's fie... 阅读全文

posted @ 2017-06-27 05:29 海岛Blog 阅读(224) 评论(0) 推荐(0)

UVALive5170 UVA231 POJ1887 Testing the CATCHER【最长下降子序列+DP+二分搜索】
摘要:Testing the CATCHERTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 18192 Accepted: 6687DescriptionA military contractor for ... 阅读全文

posted @ 2017-06-27 00:25 海岛Blog 阅读(167) 评论(0) 推荐(0)

POJ1609 UVALive2815 UVA1196 ZOJ1787 Tiling Up Blocks【二维最长上升子序列+DP】
摘要:Tiling Up BlocksTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 5882 Accepted: 2293DescriptionMichael The Kid receives an in... 阅读全文

posted @ 2017-06-26 23:27 海岛Blog 阅读(141) 评论(0) 推荐(0)

UVALive3638 UVA12100 POJ3125 HDU1972 Printer Queue【队列+模拟】
摘要:Printer QueueTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 5332 Accepted: 2739DescriptionThe only printer in the computer ... 阅读全文

posted @ 2017-06-26 10:23 海岛Blog 阅读(134) 评论(0) 推荐(0)

UVA10391 ZOJ1825 Compound Words【SET+暴力】
摘要:Compound WordsTime Limit: 5 Seconds Memory Limit: 32768 KBYou are to find all the two-word compound words in a dictionary. A two-... 阅读全文

posted @ 2017-06-26 08:46 海岛Blog 阅读(142) 评论(0) 推荐(0)

NUC1157 To the Max【最大子段和+DP】
摘要:To the Max时间限制: 1000ms 内存限制: 65536KB通过次数: 1总提交次数: 1问题描述Given a two-dimensional array of positive and negative integers, a sub-rectangl... 阅读全文

posted @ 2017-06-26 08:04 海岛Blog 阅读(165) 评论(0) 推荐(0)

NUC1399 Sum It Up【DFS】
摘要:Sum It Up时间限制: 1000ms 内存限制: 65535KB通过次数: 1总提交次数: 1问题描述Given a specified total t and a list of n integers, find all distinct sums using... 阅读全文

posted @ 2017-06-26 07:53 海岛Blog 阅读(148) 评论(0) 推荐(0)

NUC1742 Subsequence【前缀和+二分搜索+尺取法】
摘要:Subsequence时间限制: 1000ms 内存限制: 65536KB通过次数: 1总提交次数: 1问题描述A sequence of N positive integers (10 #include using namespace std;const int N... 阅读全文

posted @ 2017-06-26 07:48 海岛Blog 阅读(320) 评论(0) 推荐(0)

NUC1371 Who's in the Middle【中位数+排序】
摘要:Who's in the Middle时间限制: 1000ms 内存限制: 65535KB通过次数: 1总提交次数: 1问题描述FJ is surveying his herd to find the most average cow. He wants to kno... 阅读全文

posted @ 2017-06-26 07:39 海岛Blog 阅读(156) 评论(0) 推荐(0)

NUC1312 Sum【水题+数学题】
摘要:Sum时间限制: 1000ms 内存限制: 65536KB通过次数: 1总提交次数: 1问题描述认为自然数是从1—N。将每个数和+或-联系起来,然后计算这个表达式的值我们得到一个和S。这个问题就是怎样用1-N之间的数来得到给定的和S,并且使N最小。对于给定的S,根据题... 阅读全文

posted @ 2017-06-26 07:33 海岛Blog 阅读(177) 评论(0) 推荐(0)

POJ2100 Graveyard Design【尺取法】
摘要:Graveyard DesignTime Limit: 10000MS Memory Limit: 64000KTotal Submissions: 7094 Accepted: 1733Case Time Limit: 2000MSDescriptionKing G... 阅读全文

posted @ 2017-06-25 21:10 海岛Blog 阅读(151) 评论(0) 推荐(0)

UVALive3399 UVA1210 POJ2739 Sum of Consecutive Prime Numbers【素数筛选+尺取法】
摘要:Sum of Consecutive Prime NumbersTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 25286 Accepted: 13793DescriptionSome positiv... 阅读全文

posted @ 2017-06-25 15:56 海岛Blog 阅读(123) 评论(0) 推荐(0)

POJ3320 Jessica's Reading Problem【尺取法】
摘要:Jessica's Reading ProblemTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 12441 Accepted: 4234DescriptionJessica's a very lov... 阅读全文

posted @ 2017-06-25 12:22 海岛Blog 阅读(119) 评论(0) 推荐(0)

POJ2566 ZOJ1964 Bound Found【前缀和+排序+尺取法】
摘要:Bound FoundTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 4085 Accepted: 1266 Special JudgeDescriptionSignals of most proba... 阅读全文

posted @ 2017-06-25 10:36 海岛Blog 阅读(151) 评论(0) 推荐(0)

POJ3061 ZOJ3123 Subsequence【前缀和+二分搜索+尺取法】
摘要:SubsequenceTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 14836 Accepted: 6272DescriptionA sequence of N positive integers ... 阅读全文

posted @ 2017-06-25 07:48 海岛Blog 阅读(198) 评论(0) 推荐(0)

UVALive2678 UVA1121 Subsequence【前缀和+二分搜索+尺取法】
摘要:SequenceA sequence of N positive integers (10 > Europe - Southeastern问题链接:UVALive2678 UVA1121 Subsequence。题意简述:求长度为n的序列的一个子序列的最小长度,满足该... 阅读全文

posted @ 2017-06-25 07:33 海岛Blog 阅读(203) 评论(0) 推荐(0)

NUC1196 Sum【水题+数学题】
摘要:Sum时间限制: 1000ms 内存限制: 65536KB通过次数: 1总提交次数: 1问题描述Consider the natural numbers from 1 to N. By associating to each number a sign (+ or -... 阅读全文

posted @ 2017-06-25 05:24 海岛Blog 阅读(155) 评论(0) 推荐(0)

NUC1177 排序【排序】
摘要:排序时间限制: 1000ms 内存限制: 65536KB通过次数: 1总提交次数: 1问题描述排序正整数,按从小到大的顺序输出。输入描述输入数据只有1组第一行一个正整数n(1 ≤ n ≤ 100)下边n行每行一个正整数。输出描述从小到大输出排序后的结果样例输入5310... 阅读全文

posted @ 2017-06-25 05:18 海岛Blog 阅读(148) 评论(0) 推荐(0)

NUC1474 Ants【水题】
摘要:Ants时间限制: 1000ms 内存限制: 65535KB通过次数: 1总提交次数: 1问题描述An army of ants walk on a horizontal pole of length l cm, each with a constant speed ... 阅读全文

posted @ 2017-06-25 05:08 海岛Blog 阅读(118) 评论(0) 推荐(0)

NUC1373 Bank Interest【水题】
摘要:Bank Interest时间限制: 1000ms 内存限制: 65535KB通过次数: 1总提交次数: 1问题描述Farmer John made a profit last year! He would like to invest it well but won... 阅读全文

posted @ 2017-06-25 05:01 海岛Blog 阅读(143) 评论(0) 推荐(0)

UVALive2953 POJ1775 ZOJ2358 Sum of Factorials【打表+穷尽搜索】
摘要:Sum of FactorialsTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 13792 Accepted: 4537DescriptionJohn von Neumann, b. Dec. 28... 阅读全文

posted @ 2017-06-24 10:40 海岛Blog 阅读(167) 评论(0) 推荐(0)

NUC1013 阶乘结果末尾有多少零【分析思维】
摘要:阶乘结果末尾有多少零时间限制: 1000ms 内存限制: 65536KB通过次数: 4总提交次数: 14问题描述1000的阶乘1*2*3*...*1000结果是一个超过2500位的数,求这么大的数末尾有多少个连续的零。输入描述本题有多组测试数据,每组测试数据占一行。 ... 阅读全文

posted @ 2017-06-24 09:15 海岛Blog 阅读(173) 评论(0) 推荐(0)

UVALive2158 POJ1401 HDU1124 ZOJ2024 Factorial【分析思维】
摘要:FactorialTime Limit: 1500MS Memory Limit: 65536KTotal Submissions: 16314 Accepted: 10052DescriptionThe most important part of a GSM ne... 阅读全文

posted @ 2017-06-24 09:04 海岛Blog 阅读(192) 评论(0) 推荐(0)

NUC1419 位操作【位运算+STL】
摘要:位操作时间限制: 8000ms 内存限制: 65535KB通过次数: 2总提交次数: 2问题描述假设你工作在一个32位的机器上,你需要将某一个外设寄存器的第X位设置成0(最低位为第0位,最高位为第31位),将第Y位开始的连续三位设置成110(从高位到低位的顺序),而其... 阅读全文

posted @ 2017-06-24 07:42 海岛Blog 阅读(150) 评论(0) 推荐(0)

NUC1422 字母旋转游戏【水题】
摘要:字母旋转游戏时间限制: 1000ms 内存限制: 65535KB通过次数: 2总提交次数: 5问题描述给定两个整数M,N,生成一个M*N的矩阵,矩阵中元素取值为A至Z的26个字母中的一个,A在左上角,其余各数按顺时针方向旋转前进,依次递增放置,当超过26时又从A开始填... 阅读全文

posted @ 2017-06-24 07:37 海岛Blog 阅读(320) 评论(0) 推荐(0)

NUC1421 时间日期格式转换【日期计算】
摘要:时间日期格式转换时间限制: 1000ms 内存限制: 65535KB通过次数: 1总提交次数: 1问题描述世界各地有多种格式来表示日期和时间。对于日期的常用格式,在中国常采用格式的是“年年年年/月月/日日”或写为英语缩略表示的”yyyy/mm/dd”,此次编程大赛的启... 阅读全文

posted @ 2017-06-22 07:55 海岛Blog 阅读(369) 评论(0) 推荐(0)

NUC1077 Humble Numbers【数学计算+打表】
摘要:Humble Numbers时间限制: 1000ms 内存限制: 65536KB通过次数: 1总提交次数: 1问题描述A number whose only prime factors are 2,3,5 or 7 is called a humble number.... 阅读全文

posted @ 2017-06-22 07:46 海岛Blog 阅读(274) 评论(0) 推荐(0)

NUC1657 All in All【字符串匹配】
摘要:All in All时间限制: 1000ms 内存限制: 30000KB通过次数: 1总提交次数: 1问题描述You have devised a new encryption technique which encodes a message by insertin... 阅读全文

posted @ 2017-06-22 07:38 海岛Blog 阅读(166) 评论(0) 推荐(0)

POJ3748 位操作【位运算+STL】
摘要:位操作Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 9433 Accepted: 3796Description假设你工作在一个32位的机器上,你需要将某一个外设寄存器的第X位设置成0(最低位为第0... 阅读全文

posted @ 2017-06-22 00:10 海岛Blog 阅读(181) 评论(0) 推荐(0)

POJ3750 小孩报数问题【模拟】
摘要:小孩报数问题Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 14909 Accepted: 6647Description有N个小孩围成一圈,给他们从1开始依次编号,现指定从第W个开始报数,报到第S个... 阅读全文

posted @ 2017-06-21 20:02 海岛Blog 阅读(205) 评论(0) 推荐(0)

HDU1492 The number of divisors(约数) about Humble Numbers【约数】
摘要:The number of divisors(约数) about Humble NumbersTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Tota... 阅读全文

posted @ 2017-06-21 06:24 海岛Blog 阅读(184) 评论(0) 推荐(0)

POJ2247 HDU1058 UVA443 ZOJ1095 Humble Numbers【数学计算+打表】
摘要:Humble NumbersTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 10731 Accepted: 5015DescriptionA number whose only prime facto... 阅读全文

posted @ 2017-06-21 05:52 海岛Blog 阅读(217) 评论(0) 推荐(0)

NUC1372 Bull Math【大数】
摘要:Bull Math时间限制: 1000ms 内存限制: 65535KB通过次数: 1总提交次数: 1问题描述Bulls are so much better at math than the cows. They can multiply huge integers ... 阅读全文

posted @ 2017-06-20 22:38 海岛Blog 阅读(176) 评论(0) 推荐(0)

NUC1333 Knight Moves【DFS】
摘要:Knight Moves时间限制: 1000ms 内存限制: 65535KB问题描述A friend of you is doing research on the Traveling Knight Problem (TKP) where you are to fin... 阅读全文

posted @ 2017-06-20 00:38 海岛Blog 阅读(207) 评论(0) 推荐(0)

NUC1003 Hangover【数学计算】
摘要:Hangover时间限制: 1000ms 内存限制: 65536KB问题描述 How far can you make a stack of cards overhang a table? If you have one card, you can create... 阅读全文

posted @ 2017-06-19 00:19 海岛Blog 阅读(262) 评论(0) 推荐(0)

NUC1011 Financial Management【数学计算】
摘要:Financial Management时间限制: 1000ms 内存限制: 10000KB问题描述Larry graduated this year and finally has a job. He's making a lot of money, but som... 阅读全文

posted @ 2017-06-19 00:13 海岛Blog 阅读(164) 评论(0) 推荐(0)

UVALive2287 POJ1047 HDU1313 ZOJ1073 Round and Round We Go【大数+数学计算】
摘要:Round and Round We GoTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 12934 Accepted: 6050DescriptionA cyclic number is an in... 阅读全文

posted @ 2017-06-17 19:42 海岛Blog 阅读(205) 评论(0) 推荐(0)

HDU1559 最大子矩阵【DP】
摘要:最大子矩阵Time Limit: 30000/10000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5010 Accepted Submis... 阅读全文

posted @ 2017-06-17 18:21 海岛Blog 阅读(204) 评论(0) 推荐(0)

51Nod-1050 循环数组最大段和【最大子段和+最小子段和+DP】
摘要:1050 循环数组最大子段和基准时间限制:1 秒 空间限制:131072 KB 分值: 10 难度:2级算法题N个整数组成的循环序列a[1],a[2],a[3],…,a[n],求该序列如a[i]+a[i+1]+…+a[j]的连续的子段和的最大值(循环序列是指n个数围成... 阅读全文

posted @ 2017-06-17 11:09 海岛Blog 阅读(258) 评论(0) 推荐(0)

51Nod-1051 最大子矩阵和【最大子段和+DP】
摘要:1051 最大子矩阵和基准时间限制:2 秒 空间限制:131072 KB 分值: 40 难度:4级算法题一个M*N的矩阵,找到此矩阵的一个子矩阵,并且这个子矩阵的元素的和是最大的,输出这个最大的值。例如:3*3的矩阵:-1 3 -12 -1 3-3 1 2和最大的子矩... 阅读全文

posted @ 2017-06-17 08:28 海岛Blog 阅读(217) 评论(0) 推荐(0)

UVALive2288 POJ1050 HDU1081 ZOJ1074 To The Max【最大子段和+DP】
摘要:To the MaxTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 48948 Accepted: 25895DescriptionGiven a two-dimensional array of p... 阅读全文

posted @ 2017-06-17 08:02 海岛Blog 阅读(167) 评论(0) 推荐(0)

UVALive2363 POJ1005 HDU1065 ZOJ1049 I Think I Need a Houseboat【数学计算】
摘要:I Think I Need a HouseboatTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 104215 Accepted: 45370DescriptionFred Mapper is co... 阅读全文

posted @ 2017-06-17 01:19 海岛Blog 阅读(151) 评论(0) 推荐(0)

UVALive6050 Primes【素数筛选+前缀和】
摘要:PrimesLet m and n be two integers, 2 ≤ m > Europe - Southeastern问题链接:UVALive6050 Primes。题意简述:参见上文。问题分析:用Eratosthenes筛选法筛选素数,然后计算素数数量的前... 阅读全文

posted @ 2017-06-15 08:57 海岛Blog 阅读(98) 评论(0) 推荐(0)

POJ3978 Primes【素数筛选+前缀和】
摘要:PrimesTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 4075 Accepted: 1579DescriptionA pretty straight forward task, calculat... 阅读全文

posted @ 2017-06-15 08:18 海岛Blog 阅读(178) 评论(0) 推荐(0)

HDU2161 Primes【筛选法+打表】
摘要:PrimesTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 12512 Accepted Submis... 阅读全文

posted @ 2017-06-15 07:51 海岛Blog 阅读(142) 评论(0) 推荐(0)

ZOJ2723 Semi-Prime【素数筛选+试探法】
摘要:Semi-PrimeTime Limit: 2 Seconds Memory Limit: 65536 KBPrime Number Definition An integer greater than one is called a prime numbe... 阅读全文

posted @ 2017-06-15 00:18 海岛Blog 阅读(222) 评论(0) 推荐(0)

ZOJ1160 Biorhythms【中国剩余定理】
摘要:BiorhythmsTime Limit: 10 Seconds Memory Limit: 32768 KBSome people believe that there are three cycles in a person's life that st... 阅读全文

posted @ 2017-06-14 22:20 海岛Blog 阅读(259) 评论(0) 推荐(0)

UVALive2356 ZOJ1061 Web Navigation【堆栈+模拟】
摘要:Web NavigationTime Limit: 2 Seconds Memory Limit: 65536 KBStandard web browsers contain features to move backward and forward amo... 阅读全文

posted @ 2017-06-14 08:21 海岛Blog 阅读(134) 评论(0) 推荐(0)

POJ1028 Web Navigation【堆栈+模拟】
摘要:Web NavigationTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 34314 Accepted: 15322DescriptionStandard web browsers contain ... 阅读全文

posted @ 2017-06-14 08:07 海岛Blog 阅读(174) 评论(0) 推荐(0)

UVa10276 HDU1329 ZOJ1239 Hanoi Tower Troubles Again!【递推函数+打表】
摘要:Hanoi Tower Troubles Again!People stopped moving discs from peg to peg after they know the number of steps needed to complete the enti... 阅读全文

posted @ 2017-06-14 00:07 海岛Blog 阅读(264) 评论(0) 推荐(0)

UVALive5369 UVa732 HDU1515 ZOJ1004 Anagrams by Stack【DFS+堆栈】
摘要:Anagrams by StackTime Limit: 2 Seconds Memory Limit: 65536 KBHow can anagrams result from sequences of stack operations? There ar... 阅读全文

posted @ 2017-06-12 17:07 海岛Blog 阅读(277) 评论(0) 推荐(0)

HDU5776 sum【前缀和+模除】
摘要:sumTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 2530 Accepted Submissi... 阅读全文

posted @ 2017-06-11 23:07 海岛Blog 阅读(477) 评论(0) 推荐(0)

POJ1844 Sum【水题+数学题】
摘要:SumTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 10839 Accepted: 7107DescriptionConsider the natural numbers from 1 to N. ... 阅读全文

posted @ 2017-06-11 19:10 海岛Blog 阅读(170) 评论(0) 推荐(0)

AOJ0558 Cheese【BFS】
摘要:問題今年も JOI 町のチーズ工場がチーズの生産を始め,ねずみが巣から顔を出した.JOI 町は東西南北に区画整理されていて,各区画は巣,チーズ工場,障害物,空き地のいずれかである.ねずみは巣から出発して全てのチーズ工場を訪れチーズを 1 個ずつ食べる.この町には,N ... 阅读全文

posted @ 2017-06-11 10:36 海岛Blog 阅读(234) 评论(0) 推荐(0)

POJ3009 Curling 2.0【DFS】
摘要:On Planet MM-21, after their Olympic games this year, curling is getting popular. But the rules are somewhat different from ours. The ... 阅读全文

posted @ 2017-06-10 22:51 海岛Blog 阅读(148) 评论(0) 推荐(0)

HDU1163 Eddy's digital Roots(解法二)【快速模幂+九余数定理】
摘要:问题链接:HDU1163 Eddy's digital Roots。问题简述:参见上述链接。问题分析:计算n^n的数根,一要快,二要简单。使用快速模幂计算,加上数论中的九余数定理就完美了。程序说明:(略)参考链接:HDU1163 Eddy's digital Root... 阅读全文

posted @ 2017-06-08 14:14 海岛Blog 阅读(99) 评论(0) 推荐(0)

HDU1210 Eddy's 洗牌问题【递推函数+模拟】
摘要:问题链接:HDU1210 Eddy's 洗牌问题。问题简述:Eddy是个ACMer,他不仅喜欢做ACM题,而且对于纸牌也有一定的研究,他在无聊时研究发现,如果他有2N张牌,编号为1,2,3..n,n+1,..2n。这也是最初的牌的顺序。通过一次洗牌可以把牌的序列变为n... 阅读全文

posted @ 2017-06-08 10:23 海岛Blog 阅读(139) 评论(0) 推荐(0)

Vijos P1571 笨笨的导弹攻击【最长上升子序列+DP】
摘要:背景在那遥远的地方,有个小目标~~笨笨:导弹准备!路人甲:(这么小个目标都要欺负……)老大,导弹只有一部分可以用……笨笨:不管那么多,有多少就打多少!描述为了彻底打击目标,笨笨要使用足够多的导弹去打击目标。每个导弹有各自的编号,这些编号有可能重复……现在需要将其中一部... 阅读全文

posted @ 2017-06-05 10:32 海岛Blog 阅读(171) 评论(0) 推荐(0)

UVA11854 HDU4156 Egypt【水题】
摘要:问题链接:UVA11854 HDU4156 Egypt。问题简述:输入3个数,判定是否构成直角三角形。问题分析:(略)程序说明:如果使用数组或排序,那是浮云。找出三个数中最大的数才是关键。题记:(略)AC的C++语言程序如下:/* UVA11854 HDU4156 E... 阅读全文

posted @ 2017-06-05 09:53 海岛Blog 阅读(90) 评论(0) 推荐(0)

Vijos P1127 级数求和【数列】
摘要:描述已知:Sn= 1+1/2+1/3+…+1/n。显然对于任意一个整数K,当n足够大的时候,Sn大于K。现给出一个整数K(1using namespace std;int main(){ int k; long n = 0; double sum =... 阅读全文

posted @ 2017-06-05 09:26 海岛Blog 阅读(135) 评论(0) 推荐(0)

Vijos P1303 导弹拦截【最长上升子序列+DP】
摘要:背景实中编程者联盟为了培养技术精湛的后备人才,必须从基础题开始训练。描述某国为了防御敌国的导弹袭击,研发出一种导弹拦截系统。但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能高于前一发的高度。某天,雷达捕捉到敌国的导弹来袭。... 阅读全文

posted @ 2017-06-05 09:03 海岛Blog 阅读(260) 评论(0) 推荐(0)

HDU3421 Max Sum II【序列处理】
摘要:问题链接:HDU3421 Max Sum II。问题简述:整数序列分为几个子段,其各个子段和为最大。问题分析:需要考虑0的情况,可能是单独的一个子段,也可能是一个子段中的一个元素。程序说明:常规的处理,因为需要排除负数并且计数子段的数量,所有使用变量flag。题记:(... 阅读全文

posted @ 2017-06-05 07:34 海岛Blog 阅读(130) 评论(0) 推荐(0)

HDU1231 最大连续子序列【最大子段和+DP】
摘要:问题链接:HDU1231 最大连续子序列。问题简述:参见上述链接。问题分析:计算最大子段和问题,是一个经典的动态规划问题。程序说明:这个算法可以说是最为快速简洁的算法,其计算复杂度为O(n),而且没有使用存储空间来存储序列数据。这里给出两个程序,有一个程序使用了数组。... 阅读全文

posted @ 2017-06-03 17:13 海岛Blog 阅读(213) 评论(0) 推荐(0)

HDU1257 最少拦截系统【最长上升子序列+DP】
摘要:问题链接:HDU1257 最少拦截系统。问题简述:参见上述问题描述。问题分析:这个问题的本质是求最长上升子序列。与《POJ2533 Longest Ordered Subsequence【最长上升子序列+DP】》是同一个问题,其两个不同的代码拿来都可以直接用。这是一个... 阅读全文

posted @ 2017-06-03 08:52 海岛Blog 阅读(236) 评论(0) 推荐(0)

HDU1087 Super Jumping! Jumping! Jumping!【最长上升子序列+DP】
摘要:问题链接:HDU1087 Super Jumping! Jumping! Jumping!。问题简述:参见上述问题描述。问题分析:这是一个最长上升子序列问题,使用DP算法实现。定义dp[i]=以a[i]为末尾的最长上升子序列的和。那么,以a[i]为末尾的最长上升子序列... 阅读全文

posted @ 2017-06-03 08:24 海岛Blog 阅读(127) 评论(0) 推荐(0)

UVALive2931 POJ1631 HDU1950 ZOJ1986 Bridging signals【最长上升子序列+二分+堆栈】
摘要:Bridging signalsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 14226 Accepted: 7696Description'Oh no, they've done it again... 阅读全文

posted @ 2017-06-03 00:18 海岛Blog 阅读(200) 评论(0) 推荐(0)

51Nod-1134 最长递增子序列【LIS】
摘要:1134 最长递增子序列基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题给出长度为N的数组,找出这个数组的最长递增子序列。(递增子序列是指,子序列的元素是递增的)例如:5 1 6 8 2 4 5 10,最长递增子序列是1 2 4 5 10。... 阅读全文

posted @ 2017-06-02 23:55 海岛Blog 阅读(154) 评论(0) 推荐(0)

POJ2533 Longest Ordered Subsequence【最长上升子序列+DP】
摘要:Longest Ordered SubsequenceA numeric sequence of ai is ordered if a1 using namespace std;const int N = 1000;int a[N], dp[N];int lis(in... 阅读全文

posted @ 2017-06-02 21:51 海岛Blog 阅读(179) 评论(0) 推荐(0)

POJ1845 Sumdiv【快速模幂+素因子分解+等比数列+二分法】
摘要:问题链接:POJ1845 Sumdiv。问题简述:参见上述链接。问题分析:计算a^b的因子数,首先要对a进行因子分解,然后再进行计算。程序说明:计算过程中用到了快速模幂函数。题记:(略)AC的C++语言程序如下:/* POJ1845 Sumdiv */#include... 阅读全文

posted @ 2017-06-01 18:21 海岛Blog 阅读(345) 评论(0) 推荐(0)

51Nod-1013 3的幂的和【快速模幂+逆元】
摘要:1013 3的幂的和基准时间限制:1 秒 空间限制:131072 KB 分值: 20 难度:3级算法题求:3^0 + 3^1 +...+ 3^(N) mod 1000000007Input输入一个数N(0 using namespace std;const int M... 阅读全文

posted @ 2017-06-01 16:38 海岛Blog 阅读(183) 评论(0) 推荐(0)

51Nod-1082 与7无关的数【进制+打表】
摘要:1082 与7无关的数基准时间限制:1 秒 空间限制:131072 KB 分值: 5 难度:1级算法题一个正整数,如果它能被7整除,或者它的十进制表示法中某个位数上的数字为7,则称其为与7相关的数。求所有小于等于N的与7无关的正整数的平方和。例如:N = 8,#inc... 阅读全文

posted @ 2017-06-01 10:26 海岛Blog 阅读(213) 评论(0) 推荐(0)

51Nod-1080 两个数的平方和【暴力法】
摘要:1080 两个数的平方和基准时间限制:1 秒 空间限制:131072 KB 分值: 5 难度:1级算法题给出一个整数N,将N表示为2个整数i j的平方和(i #include using namespace std;int main(){ int n, as, ... 阅读全文

posted @ 2017-06-01 09:39 海岛Blog 阅读(267) 评论(0) 推荐(0)

51Nod-1015 水仙花数【进制+查表搜索】
摘要:1015 水仙花数基准时间限制:1 秒 空间限制:131072 KB 分值: 5 难度:1级算法题水仙花数是指一个 n 位数 ( n >= 3 ),它的每个位上的数字的 n 次幂之和等于它本身。(例如:1^3 + 5^3 + 3^3 = 153)给出一个整数M,求 >... 阅读全文

posted @ 2017-06-01 08:19 海岛Blog 阅读(356) 评论(0) 推荐(0)

51Nod-1003 阶乘后面0的数量【分析思维】
摘要:1003 阶乘后面0的数量基准时间限制:1 秒 空间限制:131072 KB 分值: 5 难度:1级算法题n的阶乘后面有多少个0?6的阶乘 = 1*2*3*4*5*6 = 720,720后面有1个0。Input一个数N(1 using namespace std;in... 阅读全文

posted @ 2017-06-01 00:10 海岛Blog 阅读(203) 评论(0) 推荐(0)

导航