自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 hrbustOJ 1787 New Fibonacci Number (矩阵快速幂+欧拉公式降幂)

New Fibonacci NumberTime Limit: 1000 MSMemory Limit: 32768 KTotal Submit: 40(18 users)Total Accepted: 14(11 users)Rating: Special Judge: NoDescription

2016-05-07 14:39:40 311

原创 ZOJ 3941 Kpop Music Party (有了思路就很好做)

Kpop Music PartyTime Limit: 2 Seconds      Memory Limit: 65536 KB Marjar University often hosts Kpop music festival. A Kpop music festival will last several days. During a Kpop festival, the

2016-05-05 16:18:55 489

原创 hrbustOJ 1042 过河卒 (dp 搜索应该也可以写)

过河卒Time Limit: 5000 MSMemory Limit: 65536 KTotal Submit: 152(35 users)Total Accepted: 33(21 users)Rating: Special Judge: NoDescriptionLda学会了中国

2016-05-05 16:10:06 345

原创 CodeForces 16D Logging

Hierarchytime limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard outputNick's company employed n people. Now Nick needs t

2016-03-31 20:16:58 277

原创 CodeForces 17B Hierarchy

Hierarchytime limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard outputNick's company employed n people. Now Nick needs t

2016-03-31 20:12:36 564

原创 CodeForces 25C Roads in Berland

Roads in Berlandtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n cities numbered from 1 to n in

2016-03-31 20:08:32 316

原创 CodeForces 25D Roads not only in Berland (并查集)

Roads not only in Berlandtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputBerland Government decided to imp

2016-03-31 20:05:19 253

原创 CodeForces 25D Roads not only in Berland (bingchaji

Roads not only in Berlandtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputBerland Government decided to imp

2016-03-31 20:02:05 63

原创 CodeForces 639B Bear and Forgotten Tree 3(水题)

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA tree is a connected undirected graph consisting of n vertices

2016-03-31 19:26:43 758

原创 CodeForces 18B Platforms (水题)

DescriptionIn one one-dimensional world there are n platforms. Platform with index k (platforms are numbered from 1) is a segment with coordinates [(k - 1)m, (k - 1)m + l], and l m. Grasshopper Bob st

2016-03-31 19:17:26 374

原创 CodeForces 18A Triangle (几何)

DescriptionAt a geometry lesson Bob learnt that a triangle is called right-angled if it is nondegenerate and one of its angles is right. Bob decided to draw such a triangle immediately: on a sheet

2016-03-31 19:14:28 401

原创 FZU 2095 水面高度 (数学题)

Descriptionkk手上有个长方体,三边长AC,AB,AD分别为a,b,c,现在里面的水高度为d(0Input第一行一个整数T,表示有T(1每组数据输入五个整数:a b c d x (10Output每组数据输出一行,表示水面高度,结果保留两位小数。Sample Input215 10 20

2016-03-16 10:05:25 193

原创 FZU 2098 刻苦的小芳 (DP)

Description小芳是一个努力用功的好孩子。快高考了,她正在努力备战中。她要完成n份作业,然后把完成的作业堆成老高的一堆。为了保证学习的效率,她总是在一份作业写完后还会回过头去复习一下。因此她总是在写完几份作业就从已写完的作业堆中从上到下拿几本来复习,要知道如果不这么做的话把作业弄乱就麻烦了。另外,她还发现,如果她的书叠得太高了就会因为重心不稳而倒下,所以她必须保证她叠的书不能超过k

2016-03-16 10:02:09 279

原创 FZU 2107 Hua Rong Dao (DFS)

DescriptionCao Cao was hunted down by thousands of enemy soldiers when he escaped from Hua Rong Dao. Assuming Hua Rong Dao is a narrow aisle (one N*4 rectangle), while Cao Cao can be regarded as one 2

2016-03-15 12:48:24 229

原创 UESTC 482 Charitable Exchange (线段树)

DescriptionHave you ever heard a star charity show called Charitable Exchange? In this show, a famous star starts with a small item which values 11yuan. Then, through the efforts of repeatedly e

2016-03-15 10:51:51 459

原创 ZOJ 3331-Process the Tasks (DP)

DescriptionThere are two machines A and B. There are n tasks, namely task 1, task 2, ..., task n. You must assign each task to one machine to process it. There are some facts you must know and com

2016-03-09 10:44:56 325

原创 HUST1605 - Gene recombination (BFS)

题意:有两个长度为N(N1、将字符串的第一位变成最后一位2、交换字符串前两位求将第一个字符串变为第二个字符串的最小次数 这是一个简单的BFS,ACGT表示成0123,这样有4^12种状态,BFS一下可得用bool比用map会快一些#include#include#include#includestring.h>#includeusing na

2016-03-09 10:44:52 229

原创 Codeforces 611D New Year and Ancient Prophecy DP

题意:把一个字符串分割成多个小串,小串组成严格递增序列,n 这是一个DP。s代表原串dp[i][j]代表当前到i位置最后一个串是以j为开头的方案数。答案就是dp[n][1]+...+dp[n][n]很容易得到dp[i][j]=dp[j-1][k]+dp[j-1][k+1]……dp[j-1][j-1]    (i-j=j-k) 如果s[k-1....j-1] >=s[j...

2016-03-09 10:44:47 221

原创 HDU计算机学院大学生程序设计竞赛(2015’12)1005 Bitwise Equations

题意:已知x,k求第k个使得x+y==x|y的正整数y x+y==x|y即x为1的位y为0可知y有几位可以为1详见代码#include#include#includestring>#include#include#includeusing namespace std;const int N=50005;int n,k;int se

2016-03-09 10:44:43 180

原创 HDU计算机学院大学生程序设计竞赛(2015’12)1007 Pick Game

题意:有n*m的格子 v[i][j]代表该位置的价值 (n,m两个人轮流选格子 只有相邻格子至少有两个为空的才能选选择之后该格子变空,得到v[i][j]求问先手能达到的最大价值 爆搜可过,状态不多。记忆化搜索用map记录4000ms过  无剪枝还可以加一些剪枝#include#include#include#include#include

2016-03-09 10:44:38 188

原创 HDU计算机学院大学生程序设计竞赛(2015’12)1008 Study Words

题意:输入一篇文章,输出出现最多的10个单词不包括old里的已有单词出现次数相同按字典序大小 简单模拟,map记录个数没有什么坑点然后sort一下用string 可以直接比较字典序大小#include#include#includestring>#include#include#include#includeusing names

2016-03-09 10:44:35 199

原创 HDU计算机学院大学生程序设计竞赛(2015’12)1006 01 Matrix

题意:有一个n*n(nQ次询问(1000) 每次询问有几个大于等于k的全为一的子矩形 从右下角往右上角预处理每个点有一个r x vr代表右边有多少连续1x代表下面有多少连续1v代表以这个为左上角的矩阵最大是多少所以v[i][j]= min(r[i][j+1], x[i+1][j],v[i+1][j+1]) +1r[i][j]=r[i][j+1]+1;x[i][j]=x[i+

2016-03-09 10:44:33 198

原创 hdu 4952 Number Transformation

题目给出一个n 一个k n k 小于等于10^10

2014-08-15 09:27:29 238

原创 HDU 4941 Magical Forest 多校

#include                                                         #include                                                       using namespace std;                                                

2014-08-12 18:48:23 258

原创 HDU 4930 Fighting the Landlords 多校第六场

两个人打牌,只要A可以打出一手牌B接不上,Yes 否则No。如果A可以zhi

2014-08-08 13:42:29 330

原创 hdu 2841 Visible Trees 寻找互质 容斥定理

题意是农夫站在(0,0) 在(1,1)-(m,n)的矩形的每个点上zh

2014-08-06 14:49:40 382

原创 hdu 4092 Nice boat (第四场多校)

看了题目觉得是线段树的题目想了一下觉得bu

2014-08-04 10:05:54 577

空空如也

空空如也

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

TA关注的人

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