- 博客(24)
- 资源 (3)
- 收藏
- 关注
原创 hdu 1849 Rabbit and Grass Nim博弈
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1849题意:游戏的规则是这样的:棋盘包含1*n个方格,方格从左到右分别编号为0,1,2,…,n-1;m个棋子放在棋盘的方格上,方格可以为空,也可以放多于一个的棋子;双方轮流走棋;每一步可以选择任意一个棋子向左移动到任意的位置(可以多个棋子位于同一个方格),当然,任何棋子不能超出棋盘边
2016-07-29 23:05:12 548
原创 2016 Multi-University Training Contest 3 1010 Rower Bo
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5761题目:Problem DescriptionThere is a river on the Cartesian coordinate system,the river is flowing along the x-axis direction.Rower Bo is place
2016-07-27 10:42:01 666
原创 2016 Multi-University Training Contest 3 1011 Teacher Bo
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5762题目:Problem DescriptionTeacher BoBo is a geography teacher in the school.One day in his class,he markedN points in the map,the i-th point
2016-07-27 09:30:46 454
原创 2016 Multi-University Training Contest 3 1002 Permutation Bo
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5753题目:Problem DescriptionThere are two sequences h1∼hn and c1∼cn.h1∼hn is a permutation of 1∼n. particularly, h0=hn+1=0.We define th
2016-07-26 22:47:20 491
原创 2016 Multi-University Training Contest 3 1001 Sqrt Bo
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5752题目:Problem DescriptionLet's define the function f(n)=⌊n−−√⌋.Bo wanted to know the minimum number y which satisfies fy(n)=1.note:f1(
2016-07-26 22:32:47 561
原创 hdu 2147 kiki's game 巴什博弈
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2147题目:Problem DescriptionRecently kiki has nothing to do. While she is bored, an idea appears in his mind, she just playes the checkerboard game
2016-07-26 11:29:29 589
原创 hdu 1846 Brave Game 巴什博奕
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1846题意:本游戏是一个二人游戏,有一堆石子一共有n个,两人轮流进行,每走一步可以取走1…m个石子,最先取光石子的一方为胜,如果游戏的双方使用的都是最优策略,请输出哪个人能赢。分析我们称先进行游戏的人为先手,另一个人为后手。+1、如果,那么由于一次最多
2016-07-26 09:11:08 481
原创 hdu 1992 Tiling a Grid With Dominoes
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1992题目:Problem DescriptionWe wish to tile a grid 4 units high and N units long with rectangles (dominoes) 2 units by one unit (in either orientatio
2016-07-25 10:37:41 575
原创 2016 Multi-University Training Contest 1 1001 Abandoned country
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5723题目:Problem DescriptionAn abandoned country has n(n≤100000) villages which are numbered from 1 to n. Since abandoned for a long time, th
2016-07-24 13:59:48 460
原创 2016 Multi-University Training Contest 2 1011 Keep On Movin
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5744题目:Problem DescriptionProfessor Zhang has kinds of characters and the quantity of thei-th character is ai. Professor Zhang wants to use a
2016-07-21 22:29:53 459
原创 2016 Multi-University Training Contest 2 1009 It's All In The Mind
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5742题目:Problem DescriptionProfessor Zhang has a number sequence a1,a2,...,an. However, the sequence is not complete and some elements are missi
2016-07-21 22:25:47 404
原创 2016 Multi-University Training Contest 2 1001 Acperience
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5734题目:Problem DescriptionDeep neural networks (DNN) have shown significant improvements in several application domains including computer vision a
2016-07-21 22:22:36 445
原创 BestCoder 2nd Anniversary 1002/hdu5719 Arrange
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5719题目:Problem DescriptionAccidentally, Cupid, god of desire has hurt himself with his own dart and fallen in love with Psyche.This has drawn
2016-07-18 19:24:52 544
原创 BestCoder 2nd Anniversary 1001/hdu5718 Oracle
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5718题目:Problem DescriptionThere is once a king and queen, rulers of an unnamed city, who have three daughters of conspicuous beauty.The younges
2016-07-18 19:22:36 534
原创 hdu 5578 Friendship of Frog
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5578题目:Problem DescriptionN frogs from different countries are standing in a line. Each country is represented by a lowercase letter. The distanc
2016-07-17 13:06:24 534
原创 hdu 5583 Kingdom of Black and White
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5583题目:Problem DescriptionIn the Kingdom of Black and White (KBW), there are two kinds of frogs: black frog and white frog.Now N frogs are st
2016-07-17 12:43:44 474
原创 hdu 4007 Dave
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4007题意:给n个点的坐标,给一个边长为r的正方形,求正方形内最多有多少点。这题给的正方形实际上是平行于x轴的,题意没表达清楚。所以用暴力就可以过,排序,平行x轴,排序,然后再平移y。#include#define N 1100using namespace std;st
2016-07-04 07:48:06 565
原创 hdu 4001 To Miss Our Children Time
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4001题意:给你些积木,分三类,0:只能放在小于等于它的长和宽的积木上,1:只能放在长和宽小于等于它且面积小于他的木块上,2:只能放在长和宽偶小于它的木块上。求积木的最高高度。其实就是个最长上升子序列。处理一下排序就好。有几个细节写错了,debug了一上午。伤心。#include
2016-07-03 11:28:10 510
原创 hdu 4009 Transfer water 最小树形图
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4009题目大意:在山上有N户人家,每家的坐标为(xi, yi, zi)。每户人家要吃水,要么自己打井,花费为A zi,要么从别人的家引水渠代价为B两家的曼哈顿距离,如果这家的海拔比供水的低,还要另外再买一个价值为C的水泵。问每家都有水吃的最低花费是多少。每家都有水的目标一定能达成
2016-07-03 01:04:57 633
原创 hdu 4004 The Frog's Games 二分+贪心
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4004题意:一条长L,(1思路:二分跳跃的最小距离,然后贪心判断是否能跳过。#include #includeusing namespace std;int a[550000],n,m,L;int ok(int k){ int num=1,last0=a[0]
2016-07-02 09:53:57 494
原创 hdu 4006 The kth great number
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4006题目大意:n次操作,每次操作可以插入一个数,或者询问第k大的数。回答每个询问。 (1=思路:因为要求第k大的数,所以小于第k个数不插入。由于k和n的数据量挺大的,所以用优先队列来存储前k个数,维护小根堆顶为第k大的数。每次插入需要O(logk)的复杂度,查询只需要O(1)的复杂度。
2016-07-02 08:44:54 497
原创 51nod 1096 距离之和最小
题目链接:https://www.51nod.com/onlineJudge/questionCode.html#!problemId=1096题目:X轴上有N个点,求X轴上一点使它到这N个点的距离之和最小,输出这个最小的距离之和。Input第1行:点的数量N。(2 <= N <= 10000)第2 - N + 1行:点的位置。(-10^9 Output
2016-07-01 20:39:40 696
原创 51nod 1396 还是01串
题目链接:https://www.51nod.com/onlineJudge/questionCode.html#!problemId=1396题目:给定一个0-1串s,长度为n,下标从0开始,求一个位置k,满足0<=k<=n, 并且子串s[0..k - 1]中的0的个数与子串s[k..n - 1]中1的个数相等。 注意:(1) 如果k = 0, s[0..k - 1]视为空串(2
2016-07-01 19:57:00 614
原创 51nod 1270 数组的最大代价 dp
题目链接:https://www.51nod.com/onlineJudge/questionCode.html#!problemId=1270题目:数组A包含N个元素A1, A2......AN。数组B包含N个元素B1, B2......BN。并且数组A中的每一个元素Ai,都满足1 (公式表示所有两个相邻元素的差的绝对值之和)给出数组B,计算可能的最大代价S。
2016-07-01 16:47:42 591
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人