自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

海岛Blog

海是无垠的,岛在海中是独立的,有一片自己的天空

  • 博客(89)
  • 收藏
  • 关注

原创 NUC1421 时间日期格式转换【日期计算】

时间日期格式转换时间限制: 1000ms 内存限制: 65535KB通过次数: 1总提交次数: 1问题描述世界各地有多种格式来表示日期和时间。对于日期的常用格式,在中国常采用格式的是“年年年年/月月/日日”或写为英语缩略表示的”yyyy/mm/dd”,此次编程大赛的启动日期“2009/11/07”就是符合这种格式的一个日期,而北美所用的日期格式则为“月月/日日/年年年年”或

2017-06-22 07:54:50 805

原创 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. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14,

2017-06-22 07:46:01 743

原创 NUC1657 All in All【字符串匹配】

All in All时间限制: 1000ms 内存限制: 30000KB通过次数: 1总提交次数: 1问题描述You have devised a new encryption technique which encodes a message by inserting between its characters randomly generated strings in

2017-06-22 07:37:57 1190 1

原创 POJ3748 位操作【位运算+STL】

位操作Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 9433 Accepted: 3796Description假设你工作在一个32位的机器上,你需要将某一个外设寄存器的第X位设置成0(最低位为第0位,最高位为第31位),将第Y位开始的连续三位设置成11

2017-06-22 00:10:14 1694

原创 POJ3750 小孩报数问题【模拟】

小孩报数问题Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 14909 Accepted: 6647Description有N个小孩围成一圈,给他们从1开始依次编号,现指定从第W个开始报数,报到第S个时,该小孩出列,然后从下一个小孩开始报数,仍是报到S个出

2017-06-21 20:01:43 1927

原创 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)Total Submission(s): 4105    Accepted Submission(s): 2012Pro

2017-06-21 06:23:34 690

原创 POJ2247 HDU1058 UVA443 ZOJ1095 Humble Numbers【数学计算+打表+水题】

Humble NumbersTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 10731 Accepted: 5015DescriptionA number whose only prime factors are 2,3,5 or 7 is called

2017-06-21 05:52:28 1096

原创 NUC1372 Bull Math【大数】

Bull Math时间限制: 1000ms 内存限制: 65535KB通过次数: 1总提交次数: 1问题描述Bulls are so much better at math than the cows. They can multiply huge integers together and get perfectly precise answers ... or so t

2017-06-20 22:37:39 509

原创 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 find the shortest closed tour of knight moves that visits ea...

2017-06-20 00:38:02 627

原创 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 a maximum overhang of half a card length. (We are assum

2017-06-19 00:19:00 632

原创 NUC1011 Financial Management【数学计算+水题】

Financial Management时间限制: 1000ms 内存限制: 10000KB问题描述Larry graduated this year and finally has a job. He's making a lot of money, but somehow never seems to have enough. Larry has decided that he

2017-06-19 00:12:47 556

原创 UVALive2287 POJ1047 HDU1313 ZOJ1073 Round and Round We Go【大数+数学计算+水题】

 Round and Round We GoTime Limit: 1000MS   Memory Limit: 10000K Total Submissions: 12934   Accepted: 6050  DescriptionA cyclic number is an integer n digits in length which, wh...

2017-06-17 19:41:54 1154

原创 HDU1559 最大子矩阵【DP】

最大子矩阵Time Limit: 30000/10000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5010    Accepted Submission(s): 2620Problem Description给你一个m×n的整数矩阵,在上面找一个x×y

2017-06-17 18:21:03 891

原创 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个数围成一个圈,因此需要考虑a[n-1],a[n],a[1],a[2]这样的序列)。当所给的整数均为负数时和为0。

2017-06-17 11:08:49 481

原创 51Nod-1051 最大子矩阵和【最大子段和+DP】

1051 最大子矩阵和基准时间限制:2 秒 空间限制:131072 KB 分值: 40 难度:4级算法题一个M*N的矩阵,找到此矩阵的一个子矩阵,并且这个子矩阵的元素的和是最大的,输出这个最大的值。例如:3*3的矩阵:-1 3 -12 -1 3-3 1 2和最大的子矩阵是:3 -1-1 31 2

2017-06-17 08:28:25 820

原创 UVALive2288 POJ1050 HDU1081 ZOJ1074 To The Max【最大子段和+DP】

To the MaxTime Limit:1000MS Memory Limit:10000K Total Submissions:48948 Accepted:25895 DescriptionGiven a two-dimensional array of positive and negative integers, a s...

2017-06-17 08:01:44 1281

原创 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 considering purchasing some la

2017-06-17 01:19:01 1101

原创 UVALive6050 Primes【素数筛选+前缀和】

PrimesLet m and n be two integers, 2 ≤ m < n ≤ 10000000. Consider the following set:P rime(m, n) = {p|p prime and m ≤ p ≤ n}.Compute the cardinal of the set P rime(m, n).InputThe input consist...

2017-06-15 08:56:34 1039

原创 POJ3978 Primes【素数筛选+前缀和】

PrimesTime Limit:1000MS Memory Limit:65536K Total Submissions:4075 Accepted:1579 DescriptionA pretty straight forward task, calculate the number of primes between 2 i...

2017-06-15 08:17:50 1364

原创 HDU2161 Primes【筛选法+打表】

PrimesTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 12512Accepted Submission(s): 5178Problem DescriptionWrite a program...

2017-06-15 07:50:59 808

原创 ZOJ2723 Semi-Prime【素数筛选+试探法】

Semi-PrimeTime Limit:2 Seconds Memory Limit:65536 KBPrime Number DefinitionAn integer greater than one is called a prime number if its only positive divisors (factors) are one and i...

2017-06-15 00:17:51 1465

原创 ZOJ1160 Biorhythms【中国剩余定理】

BiorhythmsTime Limit: 10 Seconds      Memory Limit: 32768 KBSome people believe that there are three cycles in a person's life that start the day he or she is born. These three cycles are the

2017-06-14 22:19:55 833

原创 UVALive2356 ZOJ1061 Web Navigation【堆栈+模拟】

Web NavigationTime Limit: 2 Seconds      Memory Limit: 65536 KBStandard web browsers contain features to move backward and forward among the pages recently visited. One way to implement these

2017-06-14 08:21:16 1011 2

原创 POJ1028 Web Navigation【堆栈+模拟】

Web NavigationTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 34314 Accepted: 15322DescriptionStandard web browsers contain features to move backward an

2017-06-14 08:06:52 1664

原创 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 entire task. But on the other hand, they didn't not stopped thinki

2017-06-14 00:06:32 1678

原创 UVALive5369 UVa732 HDU1515 ZOJ1004 Anagrams by Stack【DFS+堆栈】

 Anagrams by StackTime Limit: 2 Seconds      Memory Limit: 65536 KB How can anagrams result from sequences of stack operations? There are two sequences of stack operators which can convert TRO...

2017-06-12 17:06:36 1208

原创 HDU5776 sum【前缀和+模除+水题】

sumTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 2530    Accepted Submission(s): 966Problem DescriptionGiven a sequence, you're asked whethe...

2017-06-11 23:06:58 1196

原创 POJ1844 Sum【水题+数学题】

SumTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 10839 Accepted: 7107DescriptionConsider the natural numbers from 1 to N. By associating to each numbe

2017-06-11 19:09:52 1109

原创 AOJ0558 Cheese【BFS】

 問題 今年も JOI 町のチーズ工場がチーズの生産を始め,ねずみが巣から顔を出した.JOI 町は東西南北に区画整理されていて,各区画は巣,チーズ工場,障害物,空き地のいずれかである.ねずみは巣から出発して全てのチーズ工場を訪れチーズを 1 個ずつ食べる.この町には,N 個のチーズ工場があり,どの工場も1種類のチーズだけを生産している.チーズの硬さは工場によって異なっており,硬さ ...

2017-06-11 10:35:39 1086

原创 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 game is played on an ice game board on which a square mesh is m...

2017-06-10 22:50:42 839

原创 HDU1163 Eddy's digital Roots(解法二)【快速模幂+九余数定理】(废除!!!)

问题链接:HDU1163 Eddy's digital Roots。问题简述:参见上述链接。问题分析:计算n^n的数根,一要快,二要简单。使用快速模幂计算,加上数论中的九余数定理就完美了。程序说明:(略)参考链接:HDU1163 Eddy's digital Roots题记:(略)AC的C++语言程序如下:/* HDU

2017-06-08 14:14:10 837

原创 HDU1210 Eddy's 洗牌问题【递推函数+模拟】

Eddy's 洗牌问题Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4890    Accepted Submission(s): 3275Problem DescriptionEddy是个ACMer,他不仅喜欢做

2017-06-08 10:22:35 2190

原创 Vijos P1571 笨笨的导弹攻击【最长上升子序列+DP】

背景在那遥远的地方,有个小目标~~笨笨:导弹准备!路人甲:(这么小个目标都要欺负……)老大,导弹只有一部分可以用……笨笨:不管那么多,有多少就打多少!描述为了彻底打击目标,笨笨要使用足够多的导弹去打击目标。每个导弹有各自的编号,这些编号有可能重复……现在需要将其中一部分导弹按顺序抽调出来并按原顺序排列,使得这些被抽取出来的导弹奇数位置的编号大于其前一个的编号,偶

2017-06-05 10:32:19 671

原创 UVA11854 HDU4156 Egypt【水题】

Max Sum IITime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2003    Accepted Submission(s): 618Problem DescriptionGiven a sequence a[1

2017-06-05 09:53:12 701

原创 Vijos P1127 级数求和【数列】

描述已知:Sn= 1+1/2+1/3+…+1/n。显然对于任意一个整数K,当n足够大的时候,Sn大于K。现给出一个整数K(1格式输入格式输入 k输出格式输出 n样例1样例输入11样例输出12限制每个测试点1s来源noip2002普及组第一题问题链接:Vijos P1127级数求和问题分析:简单的求和

2017-06-05 09:25:34 3136

原创 Vijos P1303 导弹拦截【最长上升子序列+DP】

背景实中编程者联盟为了培养技术精湛的后备人才,必须从基础题开始训练。描述某国为了防御敌国的导弹袭击,研发出一种导弹拦截系统。但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能高于前一发的高度。某天,雷达捕捉到敌国的导弹来袭。由于该系统还在试验阶段,所以只有一套系统,因此有可能不能拦截所有的导弹。格式输入格式输入数据只有一行,该

2017-06-05 09:02:54 908 2

原创 HDU3421 Max Sum II【子段和】

Max Sum IITime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2003    Accepted Submission(s): 618Problem DescriptionGiven a sequence a[1

2017-06-05 07:33:30 809

原创 优麒麟Ubuntu18.04.5安装各种问题

UbuntuKilin18.04.5安装完毕,系统预装了以下程序:1)Firefox浏览器2)Chromium浏览器3)WPS2019套件4)微信Ubuntu版本5)各种常用软件0.使用麒麟软件商店删除和安装以下软件:删除:Thunderbird 邮件安装:1)新立得软件包管理器2)FTP客户端3)信使(iptux)4)XDot5)Meld(比较工具软件)6)GVim7)Code::Blocks8)Qt Creator1.安..

2017-06-03 17:12:32 5237 2

原创 HDU1257 最少拦截系统【最长上升子序列+DP】

问题链接:HDU1257 最少拦截系统。问题简述:参见上述问题描述。问题分析:这个问题的本质是求最长上升子序列。与《POJ2533 Longest Ordered Subsequence【最长上升子序列+DP】》是同一个问题,其两个不同的代码拿来都可以直接用。这是一个最长上升子序列问题,使用DP算法实现。定义dp[i]=以a[i]为末尾的最长上升子序列的长度。

2017-06-03 08:52:08 3785

原创 HDU1087 Super Jumping! Jumping! Jumping!【最长上升子序列+DP】

问题链接:HDU1087 Super Jumping! Jumping! Jumping!。问题简述:参见上述问题描述。问题分析:这是一个最长上升子序列问题,使用DP算法实现。定义dp[i]=以a[i]为末尾的最长上升子序列的和。那么,以a[i]为末尾的最长上升子序列有以下两种情形:1.只包含a[i]的子序列2.满足j得:dp[i]=max{a[

2017-06-03 08:23:58 951

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除