自定义博客皮肤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)
  • 收藏
  • 关注

原创 我的大一acm

从大一上学期接触acm已经有一年左右了,从大一9月份第一次知道acm到现在也有很大起伏,学了很多东西但是又感觉什么好像也没有学到,记得从第一次接触c语言到第一次接触算法,当时做出来一个并查集的题都觉得自己很牛逼后来随着时间的推移感觉算法很多自己根本学不完,每遇到一个题都是新题,同样的算法就有很多变形,算法那么多,变形那么多,我真的能学完么?我经常会问自己这个问题,答案当然是否定的,算法是无穷无尽的

2016-08-15 09:08:46 407 1

原创 UVa 11419 二分图最小点覆盖 续写 好题

第二次写这个还是一塌糊涂,说实话算法学了只会一个模板真的一点用也没有,需要不断的去再写再学再写才能巩固。理解比套多少次模板都强写一次优化不少的附上详细的解释匈牙利算法已经指出了从一端(A)的点出发寻找增广路找到最大的匹配数Konig定理指出最大匹配数等于最小点覆盖问题在于怎么输出这些点我们用r数组记行c数组记列当从已经匹配的图中A端未匹配的点出发寻找增广路标记沿途上的点

2016-07-13 11:03:47 268

原创 Uva 11374 最短路 好题

题目链接:点我题目大意:有n个点,求从s到e的最短路,有m条无向路可以随意走,k条无向路最多可以走一次也可以不走;真是不知道方法死也过不去了,知道了秒过,锻炼思维。代码很丑见谅。 #include#include#include#include#define text cout<<"text"<<endl;using namespace std;

2016-07-12 12:33:13 346

原创 poj 1321 简单搜索

Description在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数据。 每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及

2016-06-12 18:25:01 251

原创 poj 3009 深搜

Curling 2.0Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 17292 Accepted: 7117DescriptionOn Planet MM-21, after their Olympic games this year, curling

2016-06-07 18:50:07 198

原创 Uva 10801 最短路,搜索

A skyscraper has no more than 100 floors, numbered from 0 to 99. It has n (1 ≤ n ≤ 5) elevatorswhich travel up and down at (possibly) different speeds. For each i in {1, 2, . . . n}, elevator numberi

2016-06-03 20:02:16 304

原创 UVa 11419 二分图最小点覆盖

The world is in great danger!! Mental’s forces have returned toEarth to eradicate humankind. Our last hope to stop this greatevil is Sam “Serious” Stone. Equipped with various powerfulweapons, Serious

2016-06-03 19:54:03 367

原创 poj 2109 二分+大数乘法

DescriptionCurrent work in cryptography involves (among other things) large prime numbers and computing powers of numbers among these primes. Work in this area has resulted in the practical use of r

2016-05-24 20:43:53 192

原创 FZU2109:Mountain Number(数位DP)

DescriptionOne integer number x is called "Mountain Number" if:(1) x>0 and x is an integer;(2) Assume x=a[0]a[1]...a[len-2]a[len-1](0≤a[i]≤9, a[0] is positive). Any a[2i+1] is larger or equa

2016-05-24 18:38:12 222

原创 hdu 2572 水题

终曲Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1801    Accepted Submission(s): 542Problem Description最后的挑战终于到了!站在yifenfei和M

2016-05-20 18:32:38 452

原创 hdu 1518 poj 2362

SquareTime Limit: 10000/5000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12450    Accepted Submission(s): 3961Problem DescriptionGiven a set of st

2016-05-19 21:12:41 285

原创 hdu 2586

How far away ?Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 11351    Accepted Submission(s): 4139Problem DescriptionThere are

2016-05-19 19:52:16 186

原创 hdu 2089

题目链接附上详细解释的代码//发现自己还是这么弱,网上代码大多也都只有代码没有解释,这里附上解释防止以后忘记#include#include#include#include#include#includeusing namespace std;long long dp[25][6];long long pow(long long i){//求10的i次方

2016-05-18 19:20:57 229

原创 hdu 1736 水

题目链接这题有点小坑,看网上说出现 “ " 要输出 “ ” 。#include#include#include#include#include#include#include#include#include#define max(a,b) a>b?a:b#define min(a,b) a<b?a:busing namespace std;char ch[1

2016-05-12 08:53:18 648

原创 hdu 5641 水

题目链接实力RE好多次题目大意:给出一列数字在安卓手机上图案解锁,判断是否有效,经过的点不能再次经过,中间夹着点的也不能直接通过,并且一列数要大于等于4个。以为输入数组开小了,RE好多次,结果输入的数不仅有1-9,要判断一下。#include#include#include#include#include#include#include#inc

2016-05-12 08:09:43 189

原创 hdu 2523 水

题目链接 用了一次sort排序TLE了,以为1000000排序不会超时,后来看到每个数的大小最多2000。现在请你计算第K大的组合数是哪个(一个组合数为第K大是指有K-1个不同的组合数小于它)。这句话很重要,同时有两个一样的组合数也只算一个,所以标记数组标记出现的数字再遍历一次循环就好了#include#include#include#include#i

2016-05-12 07:10:57 420

原创 hdu 1556 线段树

题目链接本来做了个稍微难的线段树区间更新,发现自己还是太菜,感谢前人思路裸的区间更新这道题有点不一样,懒惰标记可以在最后向下增加#include #include #define max(a,b) a>b?a:b#define N 1005#includeusing namespace std;struct node { int l,r,

2016-05-11 17:42:03 189

原创 hdu 1084 水题

Problem Description“Point, point, life of student!”This is a ballad(歌谣)well known in colleges, and you must care about your score in this exam too. How many points can you get? Now, I told you t

2016-05-11 17:27:32 276

原创 poj 1050 dp

DescriptionGiven a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1*1 or greater located within the whole array. The sum of a rectangl

2016-05-10 20:22:36 186

原创 杭电2612

Problem DescriptionPass a year learning in Hangzhou, yifenfei arrival hometown Ningbo at finally. Leave Ningbo one year, yifenfei have many people to meet. Especially a good friend Merceki.Yifen

2016-04-24 18:20:29 254

原创 杭电5672

Problem DescriptionThere is a string S.S only contain lower case English character.(10≤length(S)≤1,000,000)How many substrings there are that contain at least k(1≤k≤26) distinct characters?

2016-04-23 18:02:40 204

原创 杭电3555

Problem DescriptionThe counter-terrorists found a time bomb in the dust. But this time the terrorists improve on the time bomb. The number sequence of the time bomb counts from 1 to N. If the curr

2016-04-23 17:44:02 190

原创 杭电1465

Problem Description大家常常感慨,要做好一件事情真的不容易,确实,失败比成功容易多了!做好“一件”事情尚且不易,若想永远成功而总从不失败,那更是难上加难了,就像花钱总是比挣钱容易的道理一样。话虽这样说,我还是要告诉大家,要想失败到一定程度也是不容易的。比如,我高中的时候,就有一个神奇的女生,在英语考试的时候,竟然把40个单项选择题全部做错了!大家都学过概率论,应该

2016-04-22 18:43:24 273

原创 杭电1418

非常抱歉,本来兴冲冲地搞一场练习赛,由于我准备不足,出现很多数据的错误,现在这里换一个简单的题目:前几天在网上查找ACM资料的时候,看到一个中学的奥数题目,就是不相交的曲线段分割平面的问题,我已经发到论坛,并且lxj 已经得到一个结论,这里就不多讲了,下面有一个类似的并且更简单的问题:如果平面上有n个点,并且每个点至少有2条曲线段和它相连,就是说,每条曲线都是封闭的,同时,

2016-04-22 18:35:35 243

原创 杭电1372

bfs水题#include#include#include#includeusing namespace std;int d[8][2]={-1,-2,-2,-1,1,-2,2,-1,-2,1,-1,2,1,2,2,1};struct node { char x; int y,t;}a,b;int vis[200][10];int vj(char x,int

2016-04-21 16:16:11 288

原创 杭电4548

Problem Description  小明对数的研究比较热爱,一谈到数,脑子里就涌现出好多数的问题,今天,小明想考考你对素数的认识。  问题是这样的:一个十进制数,如果是素数,而且它的各位数字和也是素数,则称之为“美素数”,如29,本身是素数,而且2+9 = 11也是素数,所以它是美素数。  给定一个区间,你能计算出这个区间内有多少个美素数吗? Input

2016-04-21 16:14:38 302

原创 杭电1180

3 4T...*-*S*.|.答案是4我的代码是5也AC了略长 不过复制粘贴,优先队列#include#include#include#include#include#include#includeusing namespace std;int m,n;struct node{

2016-04-21 16:11:04 239

空空如也

空空如也

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

TA关注的人

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