- 博客(33)
- 资源 (2)
- 收藏
- 关注
原创 (HDU 5792)World is Exploding <树状数组+去重> 多校训练5
World is Exploding Problem Description Given a sequence A with length n,count how many quadruple (a,b,c,d) satisfies: a≠b≠c≠d,1≤a< b≤n,1≤c< d≤n,Aa< Ab,Ac>Ad.Input The input consists of multiple test
2017-01-18 11:41:44 438
原创 (HDU 5783)Divide the Sequence <思维水题> 多校训练5
Divide the Sequence Problem Description Alice has a sequence A, She wants to split A into as much as possible continuous subsequences, satisfying that for each subsequence, every its prefix sum is no
2017-01-17 21:02:43 436
原创 (HDU 5791)Two <DP求公共子序列的个数> 多校训练5
Two Problem Description Alice gets two sequences A and B. A easy problem comes. How many pair of sequence A’ and sequence B’ are same. For example, {1,2} and {1,2} are same. {1,2,4} and {1,4,2} are n
2017-01-17 20:26:33 532
原创 (POJ 1054)The Troublesome Frog <暴力枚举+剪枝 || DP>
题目链接:http://poj.org/problem?id=1054题意: 给定一个行数和列数固定的网格,再给定若干个点,这些点是使用矩形上网格线交叉点的坐标来唯一确定的R行C列的网格,左上角的坐标为(1,1)右下角的坐标为(R,C),问给定的这些点能够组成最长可能路径是多长. 路径的定义的如下的:由若干连续且间隔相等的点组成,方向可任意,起始点和结束点均在网格之外的任意空间.也就是只要满足网格
2017-01-17 20:13:48 700
原创 (POJ 2029)Get Many Persimmon Trees <二维树状数组>
Get Many Persimmon Trees DescriptionSeiji Hayashi had been a professor of the Nisshinkan Samurai School in the domain of Aizu for a long time in the 18th century. In order to reward him for his merito
2017-01-17 20:01:33 451
原创 (HDU 5763)Another Meaning <KMP + dp> 多校训练4
Another Meaning As is known to all, in many cases, a word has two meanings. Such as “hehe”, which not only means “hehe”, but also means “excuse me”. Today, ?? is chating with MeiZi online, MeiZi sen
2017-01-15 19:42:52 493
原创 (HDU 5775)Bubble Sort <树状数组> 多校训练4
Bubble Sort P is a permutation of the integers from 1 to N(index starting from 1). Here is the code of Bubble Sort in C++.for(int i=1;i<=N;++i) for(int j=N,t;j>i;—j) if(P[j-1] > P[j])
2017-01-15 19:33:12 347
原创 (HDU 5774)Where Amazing Happens <水题> 多校训练4
Where Amazing Happens As the premier men’s professional basketball league in the world, the National Basketball Association (NBA) has witnessed many superstars, legendary teams and precious friendship
2017-01-15 19:18:56 464
原创 (HDU 5773)The All-purpose Zero <最长上升子序列 + 思维题> 多校训练4
The All-purpose Zero Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1950 Accepted Submission(s): 920Problem Description ?? gets an sequen
2017-01-15 12:57:33 555
转载 (POJ 2965)The Pilots Brothers' refrigerator <大神:神思维>
The Pilots Brothers’ refrigerator Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 25211 Accepted: 9733 Special Judge DescriptionThe game “The Pilots Brothers: following t
2017-01-12 19:07:53 351
原创 (POJ 1753)Flip Game <状压+BFS>
Flip Game Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 42341 Accepted: 18250 DescriptionFlip game is played on a rectangular 4x4 field with two-sided pieces placed on each
2017-01-12 19:02:31 437
原创 (POJ 1947)Rebuilding Roads <树型DP>
Rebuilding Roads DescriptionThe cows have reconstructed Farmer John’s farm, with its N barns (1 <= N <= 150, number 1..N) after the terrible earthquake last May. The cows didn’t have time to rebuild a
2017-01-10 19:26:58 366
原创 (HDU 5738) <计算几何 ,在n个点中找所有共线的集合> 2016 Multi-University Training Contest 2
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5738 Eureka Time Limit: 8000/4000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 3059 Accepted Submission(s): 86
2017-01-10 14:33:50 732
原创 (HDU 5734)Acperience <数学题> 2016 Multi-University Training Contest 2
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5734 Acperience Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1239 Accepted Submission(s)
2017-01-09 16:55:43 366
原创 (HDU 5742) It's All In The Mind <思维水题> 2016 Multi-University Training Contest 2
It’s All In The Mind Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1608 Accepted Submission(s): 749Problem Description Professor Zhang h
2017-01-09 11:41:59 522
原创 (HDU 5744)Keep On Movin <回文数,思维水题> 2016 Multi-University Training Contest 2
Keep On Movin Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1040 Accepted Submission(s): 733Problem Description Professor Zhang has kind
2017-01-09 10:46:26 477
原创 (HDU 5733) tetrahedron <几何公式>
tetrahedronProblem Description Given four points ABCD, if ABCD is a tetrahedron, calculate the inscribed sphere of ABCD.Input Multiple test cases (test cases ≤100).Each test cases contains a line of
2017-01-07 19:57:26 507
原创 (HDU 5727)Necklace <二部图匹配,匈牙利算法> 多校训练1
NecklaceTime Limit: 3000/1500 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 2705 Accepted Submission(s): 846Problem Description SJX has 2*N magic gems. N of th
2017-01-07 15:45:08 494
原创 (HDU 5726)GCD <RMQ + map + 二分> 多校训练1
GCD Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 3087 Accepted Submission(s): 1116Problem Description Give you a sequence of N(N≤100,0
2017-01-07 11:32:20 562
原创 (HDU 5723)Abandoned country <最小生成树 + 树上所有两点之间的距离的期望> 多校训练1
Abandoned country Time Limit: 8000/4000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 4941 Accepted Submission(s): 1249Problem Description An abandoned countr
2017-01-06 20:43:24 922
原创 (POJ 1185)炮兵阵地 <状压DP经典题目>
炮兵阵地 司令部的将军们打算在N*M的网格地图上部署他们的炮兵部队。一个N*M的地图由N行M列组成,地图的每一格可能是山地(用”H” 表示),也可能是平原(用”P”表示),如下图。在每一格平原地形上最多可以布置一支炮兵部队(山地上不能够部署炮兵部队);一支炮兵部队在地图上的攻击范围如图中黑色区域所示: 如果在地图中的灰色所标识的平原上部署一支炮兵部队,则图中的黑色的网格表示它能够攻击到的区
2017-01-06 15:04:44 644
原创 (POJ 3254)Corn Fields <状态压缩DP 好题>
Corn Fields DescriptionFarmer John has purchased a lush new rectangular pasture composed of M by N (1 ≤ M ≤ 12; 1 ≤ N ≤ 12) square parcels. He wants to grow some yummy corn for the cows on a number of
2017-01-05 16:43:03 486
原创 (POJ 3280)Cheapest Palindrome <DP> 回文数变形
Cheapest Palindrome DescriptionKeeping track of all the cows can be a tricky task so Farmer John has installed a system to automate it. He has installed on each cow an electronic ID tag that the syste
2017-01-05 11:17:22 541
原创 (POJ 1159)Palindrome <最长公共子序列 / 滚动数组优化 / 记忆化搜索> 简单回文数
Palindrome DescriptionA palindrome is a symmetrical string, that is, a string read identically from left to right as well as from right to left. You are to write a program which, given a string, deter
2017-01-05 11:02:59 653
原创 (POJ 1191)棋盘分割 <DFS>
棋盘分割 Description将一个8*8的棋盘进行如下分割:将原棋盘割下一块矩形棋盘并使剩下部分也是矩形,再将剩下的部分继续如此分割,这样割了(n-1)次后,连同最后剩下的矩形棋盘共有n块矩形棋盘。(每次切割都只能沿着棋盘格子的边进行) Input第1行为一个整数n(1 < n < 15)。 第2行至第9行每行为8个小于100的非负整数,表示棋盘上相应格子的分值。每行相邻两数之
2017-01-04 20:50:01 431
原创 (POJ 1691)Painting A Board <top序列 + DFS>
Painting A Board DescriptionThe CE digital company has built an Automatic Painting Machine (APM) to paint a flat board fully covered by adjacent non-overlapping rectangles of different sizes each with
2017-01-04 17:01:40 485
原创 (POJ 1724)ROADS <DFS + 简单剪枝>
ROADS DescriptionN cities named with numbers 1 … N are connected with one-way roads. Each road has two parameters associated with it : the road length and the toll that needs to be paid for the road (
2017-01-04 14:13:34 502
原创 (POJ 3411)Paid Roads <DFS>
Paid Roads DescriptionA network of m roads connects N cities (numbered from 1 to N). There may be more than one road connecting one city with another. Some of the roads are paid. There are two ways to
2017-01-04 13:15:56 863
原创 (HDU 5929)Basic Data Structure 双端队列+模拟 <2016CCPC东北地区大学生程序设计竞赛 - 重现赛 >
Basic Data Structure Time Limit: 7000/3500 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1102 Accepted Submission(s): 290 Problem Description Mr. Frog learne
2017-01-03 20:11:59 1131
原创 (HDU 5927)Auxiliary Set 思维题 <2016CCPC东北地区大学生程序设计竞赛 - 重现赛 >
Auxiliary Set Problem Description Given a rooted tree with n vertices, some of the vertices are important.An auxiliary set is a set containing vertices satisfying at least one of the two conditions:∙
2017-01-03 19:55:17 765
原创 (HDU 5926)Mr. Frog’s Game 水题 <2016CCPC东北地区大学生程序设计竞赛 - 重现赛 >
Mr. Frog’s Game One day, Mr. Frog is playing Link Game (Lian Lian Kan in Chinese). In this game, if you can draw at most three horizontal or vertical head-and-tail-connected lines over the empty grid
2017-01-03 19:40:37 978
原创 (HDU 5924)Mr. Frog’s Problem 思维水题 <2016CCPC东北地区大学生程序设计竞赛 - 重现赛 >
题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=5924Mr. Frog’s Problem Problem Description One day, you, a clever boy, feel bored in your math class, and then fall asleep without your control. In your
2017-01-03 19:23:55 784
原创 (HDU 5922)Minimum’s Revenge 思维水题 <2016CCPC东北地区大学生程序设计竞赛 - 重现赛 >
Minimum’s Revenge Problem Description There is a graph of n vertices which are indexed from 1 to n. For any pair of different vertices, the weight of the edge between them is the least common multipl
2017-01-03 19:18:06 954
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人