- 博客(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 268
原创 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 367
原创 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 268
原创 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 329
转载 51nod (dp)
输入第1行:字符串A第2行:字符串B(A,B的长度 输出输出最长的子序列,如果有多个,随意输出1个。输入示例abcicbaabdkscab输出示例abca这一题是51nod教程上面的题。 在lcs里面更多的是求最长公共子序列的长度。这里是要求输出最长公共子序列。 我们知道长度是一定
2016-08-12 19:49:49 256
转载 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 231
转载 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 171
转载 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 204
原创 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 206
转载 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 226
转载 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 221
转载 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 258
原创 1908: 小火山的围棋梦想(dfs)
1908: 小火山的围棋梦想Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 307 Solved: 80SubmitStatusWeb BoardDescription 小火山最近喜欢上了围棋。 对于围棋,其实小火山是一窍不通的。现在棋盘上,有很多小火山的棋子。 如果棋盘上有这样的一个位置, 那么这个位置也
2016-08-11 09:41:36 513
原创 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 249
原创 多校--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 208
原创 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 222
原创 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 282
原创 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 309
原创 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 307
转载 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 245
原创 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 349
原创 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 246
原创 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 2723
原创 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 224
原创 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 229
原创 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 200
原创 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 268
原创 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 196
原创 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 217
原创 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 227
原创 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 210
原创 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 204
原创 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 227
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人