自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(33)
  • 收藏
  • 关注

原创 J - Positive Negative Sign

Given two integers: n and m and n is divisible by 2m, you have to write down the first n natural numbers in the following form. At first take first m integers and make their sign negative, then take n

2016-08-23 19:18:56 256

原创 51nod 最长单增子序列(LIS)

输入第1行:1个数N,N为序列的长度(2 <= N <= 50000)第2 - N + 1行:每行1个数,对应序列的元素(-10^9 输出输出最长递增子序列的长度。输入示例8516824510输出示例5#include #include #i

2016-08-17 10:56:24 351

原创 51nod 编辑距离 (DP)

给定两个字符串S和T,对于T我们允许三种操作:(1) 在任意位置添加任意字符(2) 删除存在的任意字符(3) 修改任意字符 问最少操作多少次可以把字符串T变成S? 例如: S=  “ABCF”   T = “DBFG”那么我们可以(1) 把D改为A(2) 删掉G(3) 加入C所以答案是3。输入

2016-08-15 19:56:00 251

原创 2463 -- Bungee Jumping

Problem DescriptionOnce again, James Bond is fleeing from some evil people who want to see him dead. Fortunately, he has left a bungee rope on a nearby highway bridge which he can use to escape fr

2016-08-15 08:44:07 304

转载 51nod (dp)

输入第1行:字符串A第2行:字符串B(A,B的长度 输出输出最长的子序列,如果有多个,随意输出1个。输入示例abcicbaabdkscab输出示例abca这一题是51nod教程上面的题。 在lcs里面更多的是求最长公共子序列的长度。这里是要求输出最长公共子序列。 我们知道长度是一定

2016-08-12 19:49:49 237

转载 1902: 985的因子对难题

1902: 985的因子对难题Time Limit: 2 Sec  Memory Limit: 128 MBDescription985有n个正整数,他想知道存在多少个不同的因子对(a[i], a[j])使得1 特别地,他认为(a[i],a[j])与(a[j],a[i])是一样的因子对。Input第一行输入一个整数t,代表有t组测试数据。每组数据占两

2016-08-11 10:21:39 218

转载 1900: 985的“树”难题

1900: 985的“树”难题Time Limit: 1 Sec  Memory Limit: 128 MBDescription985给你一棵“树”以及它的根节点,要求你先判定它是否是一棵树,其次他想知道每个节点的“太子”数目以及它的父亲(root的话输出自己)。“太子判定条件”:一、若x是y的孩子节点,那么x是y的“太子”;二、若x是y的“太子”且y是z的“太子

2016-08-11 10:19:15 161

转载 1899: 985的最大和难题

1899: 985的最大和难题Time Limit: 1 Sec  Memory Limit: 128 MBDescription985有2 * n - 1个整数,他每次可以将其中n个数变号,操作次数不限,问他可以得到的最大和。Input第一行输入一个整数t,代表有t组测试数据。每组数据占两行,第一行输入一个整数n,下面一行输入2*n-1个整数a[]。

2016-08-11 10:17:41 187

原创 Problem G: 985的数字难题

Problem G: 985的数字难题Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 282  Solved: 103SubmitStatusWeb BoardDescription985有n个数,已知每次操作可以将其中不相同的两个数一个加一、一个减一,操作次数不限。问他最多可以得到多少个相同的数。I

2016-08-11 10:14:29 190

转载 Problem D: 985的0-1串难题

Problem D: 985的0-1串难题Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 260  Solved: 75SubmitStatusWeb BoardDescription985有一个长度为n的0-1串,已知他最多可以修改k次(每次修改一个字符即0->1 或者 1->0),他想知道连续的全1子串最长是多少

2016-08-11 10:12:03 217

转载 Problem C: 985的方格难题(dp)

Problem C: 985的方格难题Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 425  Solved: 93SubmitStatusWeb BoardDescription985走入了一个n * n的方格地图,他已经知道其中有一个格子是坏的。现在他要从(1, 1)走到(n, n),每次只可以向下或者向右走一步

2016-08-11 10:09:44 210

转载 Problem B: 985的数学难题(位运算)

Problem B: 985的数学难题Time Limit: 2 Sec  Memory Limit: 128 MBSubmit: 165  Solved: 40SubmitStatusWeb BoardDescription985有n个正整数,他想快速知道下面函数的返回值int a[N+1];long long Solve() {    int

2016-08-11 10:07:27 245

原创 1908: 小火山的围棋梦想(dfs)

1908: 小火山的围棋梦想Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 307  Solved: 80SubmitStatusWeb BoardDescription  小火山最近喜欢上了围棋。  对于围棋,其实小火山是一窍不通的。现在棋盘上,有很多小火山的棋子。 如果棋盘上有这样的一个位置, 那么这个位置也

2016-08-11 09:41:36 501

原创 1913: 小火山的计算能力

1913: 小火山的计算能力Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 463  Solved: 117SubmitStatusWeb BoardDescription别人说小火山的计算能力不行,小火山很生气,于是他想证明自己,现在有一个表达式,他想计算出来。Input首先是一个t(1Output输出运算结果。Sample Input2

2016-08-11 09:30:15 240

原创 多校--Problem A 小火山的跳子游戏

1905: 小火山的跳子游戏Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 423  Solved: 85SubmitStatusWeb BoardDescription  小火山和火山火山在一块玩跳子游戏。规则如下:  1:跳子的起始位置为0,棋盘大小从1到N  2:每次跳子跳k步。 例如当前位置为i, 那

2016-08-10 19:21:33 195

原创 HDU-1003 Max Sum

A - Max Sum Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u SubmitStatusPracticeHDU 1003 Description Given a sequence a[1],a[2],a[3]……a[n], your job is to calc

2016-08-09 18:03:31 211

原创 HDU 1231 最大连续子序列 &&HDU 1003Max Sum (区间dp问题)

HDU 1231 最大连续子序列 &&HDU 1003Max Sum (区间dp问题)阅读:134 时间:2015-11-21 16:30分享:C - 最大连续子序列 Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status P

2016-08-09 18:00:59 270

原创 Monkey and Banana

Monkey and BananaTime Limit: 2 Seconds Memory Limit: 65536 KBA group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof of a buildin

2016-08-09 17:53:07 293

原创 HD--1285 确定比赛名次

确定比赛名次Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7059    Accepted Submission(s): 2674Problem Description有N个比赛队(1 

2016-08-06 11:14:42 295

转载 HD--2647 Reward

RewardTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4767    Accepted Submission(s): 1456Problem DescriptionDandelion's unc

2016-08-05 17:10:11 229

原创 HD--2066 一个人的旅行

一个人的旅行Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 21552    Accepted Submission(s): 7503Problem Description虽然草儿是个路痴(就是在杭电

2016-08-05 11:07:09 339

原创 HD--1596 find the safest road

find the safest roadTime Limit: 10000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7777    Accepted Submission(s): 2759Problem Description

2016-08-04 20:23:39 229

原创 HD--1874畅通工程续 Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) To

畅通工程续Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 45933    Accepted Submission(s): 17082Problem Description某省自从实行了很多年的畅通工程计划后,终于修

2016-08-04 17:50:08 2708

原创 HD--2544最短路

最短路Time Limit: 5000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 54501    Accepted Submission(s): 24017Problem Description在每年的校赛里,所有进入决赛的同学都会获得一件很

2016-08-04 16:50:28 209

原创 HDU--1869六度分离

六度分离Time Limit: 5000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7904    Accepted Submission(s): 3231Problem Description1967年,美国著名的社会学家斯坦利·米尔格兰姆提

2016-08-04 16:44:07 217

原创 HD--1863畅通工程

畅通工程Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 25982    Accepted Submission(s): 11324Problem Description省政府“畅通工程”的目标是使全省任何两个村庄间

2016-08-04 16:03:57 190

原创 POJ--1287Networking

poj1287Networking-最小生成树primTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 4880 Accepted: 2641DescriptionYou are assigned to design network connec

2016-08-04 09:53:41 254

原创 POJ--2485

DescriptionThe island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has no public highways. So the traffic is difficult in Flatopia. The Flatopian government is aware of this probl

2016-08-03 21:11:00 183

原创 HDOJ--1233

还是畅通工程Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 40080    Accepted Submission(s): 18228Problem Description某省调查乡村交通状况,得到的统计表中列出了

2016-08-03 18:52:37 204

原创 Roads in the North

Roads in the NorthTime Limit:1000MS     Memory Limit:65536KB     64bit IO Format:%lld & %lluDescriptionBuilding and maintaining roads among communities in the far North is an expensi

2016-08-02 21:38:19 217

原创 Cow Marathon

Cow MarathonTime Limit: 2000MS Memory Limit: 30000KTotal Submissions: 4948 Accepted: 2407Case Time Limit: 1000MSDescriptionAfter hearing about the epidemi

2016-08-02 20:11:24 200

原创 Farthest Nodes in a Tree

DescriptionGiven a tree (a connected graph with no cycles), you have to find the farthest nodes in the tree. The edges of the tree are weighted and undirected. That means you have to find two node

2016-08-02 18:53:00 191

原创 Work

J - WorkTime Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64uSubmit StatusDescriptionIt’s an interesting experience to move from ICPC to work, end

2016-08-01 21:44:46 213

空空如也

空空如也

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

TA关注的人

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