自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Grit_ICPC的博客

凡物之骤为之而追成焉者,其器小也;物之一览而易尽者,其中无有也

  • 博客(117)
  • 资源 (4)
  • 收藏
  • 关注

原创 最长01串(贪心)

一行一个整数,最长的0与1的个数相等的子串的长度。101111111010示例输出204思路:统计0与1的个数在串里相同且最大长度。可以见0就让ans--,1就++,当值为0的时候就比较一下当前的ma与i+1的大小,但是有个问题就是当为000000000001111111111111(0的个数=1的个数)时会输出0,而不是20(假设1=

2015-08-30 21:34:43 1347

原创 codeforces 2184 B. Chilly Willy(规律)

outputstandard outputChilly Willy loves playing with numbers. He only knows prime numbers that are digits yet. These numbers are2, 3, 5 and 7. But Willy grew rather bored of such numbers, so

2015-08-30 19:55:06 1094

原创 SDUT 3315 a

We have a graph with size = N like that in Figure 1. Then we are going to find a downward path from the top node to one bottom node.  First, we select the top node as the beginning. Then at any no

2015-08-30 18:39:19 631

原创 Chef and Prime Divisors Problem code: CHAPD (GCD问题)

题目大意:  给定两个数,n,m,找到如果m的所有质因数可以被n,整处的话输出"Yes",OR   "No".text:3120 75128 167 8Output:YesYesNo直到,最大公约数为1,时看后者是否为1,即可。#include#include#include#include#include#include#i

2015-08-30 08:54:41 936

原创 线段树求解区间最大最小值(模板)

题目描述第一行:输入两个正整数;第二行:输入n个整数 大小范围为[1,100000];接下来的m行,每次两个正整数l,r (1输出[l,r]. 示例输入6 31734251 54 62 2示例输出630#include#include#include#include#de

2015-08-29 22:54:05 1459

原创 CodeForces 288A

A. Polo the Penguin and Stringstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle penguin Polo adores st

2015-08-29 19:38:22 616

原创 (BFS 多个数通过运算符查找是否等于某一个固定的值)

如果最后的运算结果可以等于23,输出Yes,不能的话输出No1 1 1 1 11 2 3 4 52 3 5 7 11示例输出NoYesYes比赛的时候弱都没看出用BFS,看的提交的人数也不多,就没有再审题。。。- -!赛后知道了用BFS,但写的时候也遇到了困难,刚开始的时候直接先传进去了per[0],但是感觉不对,总是第一个数和其他的数进行,运算并且,标记

2015-08-29 13:13:31 535

原创 4970 Killing Monsters(前缀和问题)(类线段树)

Problem DescriptionKingdom Rush is a popular TD game, in which you should build some towers to protect your kingdom from monsters. And now another wave of monsters is coming and you need again to kn

2015-08-29 09:45:35 679

原创 非背包

SDUT 3033  (坑)#include#include#include#include#define LL long longusing namespace std;struct node{    LL  s,p,w;}q[10];int main(){    LL n,v,i,j,k;    while(~scanf("%ll

2015-08-28 21:30:39 748

原创 HDOJ 4502 吉哥系列故事——临时工计划(DP)

Problem Description  俗话说一分钱难倒英雄汉,高中几年下来,吉哥已经深深明白了这个道理,因此,新年开始存储一年的个人资金已经成了习惯,不过自从大学之后他不好意思再向大人要压岁钱了,只能把唯一的希望放到自己身上。可是由于时间段的特殊性和自己能力的因素,只能找到些零零碎碎的工作,吉哥想知道怎么安排自己的假期才能获得最多的工资。  已知吉哥一共有m天的假期,每天的编号从1到m

2015-08-27 19:41:19 869

原创 POJ 3258 River Hopscotch(二分求最小中的最大)

DescriptionEvery year the cows hold an event featuring a peculiar version of hopscotch that involves carefully jumping from rock to rock in a river. The excitement takes place on a long, straight

2015-08-27 10:51:39 696

原创 HDOJ 2252 三足鼎立

#include#include#include#include#include#include#define LL long long#define inf 0x3f3f3f3fusing namespace std;int main(){ int n,m,j,k; double s,u,v; scanf("%d",&n); while(n-

2015-08-26 21:28:19 476

原创 HDOJ 2674 N!Again(找规律)

Problem DescriptionWhereIsHeroFrom:             Zty, what are you doing ?Zty:                                     I want to calculate N!......WhereIsHeroFrom:             So easy! How big N is ?

2015-08-26 19:45:25 554

原创 HDOJ 1097 A hard puzzle(循环节||快速幂)

Problem Descriptionlcy gives a hard puzzle to feng5166,lwg,JGShining and Ignatius: gave a and b,how to know the a^b.everybody objects to this BT problem,so lcy makes the problem easier than begin.

2015-08-26 19:16:12 874

原创 HDOJ 1010 Tempter of the Bone(DFS奇偶剪枝)

Problem DescriptionThe doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could feel the ground sinking. He re

2015-08-26 16:00:13 795

转载 失业七个月,面试六十家公司的深圳体验

首先,坦白的讲,如果我现在不是找到了一份还合适的工作,我是根本不愿意再去回想那七个月的事情的。    失业整整七个月,简直是噩梦一场。很辛酸,很痛苦,也很无奈。由刚开始的自信满满,多方挑剔,到最后的完全没有了自信,觉得自己是废物,这个过程让我经历了太多,如果不是有家人与好朋友一直支持着,应该是早就彻底放弃了的。    事情过后,再回过头去看这段简历,开始有点感谢这样一次机会,感谢这次有磨练

2015-08-26 13:48:40 2633

原创 HDOJ 1028 Ignatius and the Princess III(DP)

Problem Description"Well, it seems the first problem is too easy. I will let you know how foolish you are later." feng5166 says."The second problem is, given an positive integer N, we define an

2015-08-26 11:25:48 880

原创 HDOJ 1284 钱币兑换问题(DP)

在一个国家仅有1分,2分,3分硬币,将钱N兑换成硬币有很多种兑法。请你编程序计算出共有多少种兑法。 Input每行只有一个正整数N,N小于32768。 Output对应每个输入,输出兑换方法数。 Sample Input293412553 Sample Output71883113137761#incl

2015-08-26 11:17:47 468

原创 HDOJ 2095 find your present (2) 位运算

Problem DescriptionIn the new year party, everybody will get a "special present".Now it's your turn to get your special present, a lot of presents now putting on the desk, and only one of them will

2015-08-26 10:47:14 506

原创 POJ 1061 青蛙的约会(拓展的欧几里得)

Description两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事情,既没有问清楚对方的特征,也没有约定见面的具体位置。不过青蛙们都是很乐观的,它们觉得只要一直朝着某个方向跳下去,总能碰到对方的。但是除非这两只青蛙在同一时间跳到同一点上,不然是永远都不可能碰面的。

2015-08-26 09:47:41 1595

原创 POJ 2115 C Looooops (拓展的欧几里得) 拓展的欧几里得详解

DescriptionA Compiler Mystery: We are given a C-language style for loop of typefor (variable = A; variable != B; variable += C) statement;I.e., a loop which starts by setting variable to

2015-08-25 20:58:11 574

原创 数论题集

转自:http://blog.sina.com.cn/s/blog_6635898a0100magq.html1.burnside定理,polya计数法    这个大家可以看brudildi的《组合数学》,那本书的这一章写的很详细也很容易理解。最好能完全看懂了,理解了再去做题,不要只记个公式。    *简单题:(直接用套公式就可以了)    pku2409 Let it Bea

2015-08-25 19:16:18 496

原创 POJ 1850 Code(组合数学)

DescriptionTransmitting and memorizing information is a task that requires different coding systems for the best use of the available space. A well known system is that one where a number is associa

2015-08-25 17:02:24 423

原创 416B - Art Union (DP)

A well-known art union called "Kalevich is Alive!" manufactures objects d'art (pictures). The union consists ofn painters who decided to organize their work as follows.Each painter uses only the c

2015-08-25 14:59:59 434

原创 POJ 1159 Palindrome(DP LCS&滚动数组)

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, determines the

2015-08-25 11:07:01 701

原创 POJ 1080 Human Gene Functions(DP LCS)

DescriptionIt is well known that a human gene can be considered as a sequence, consisting of four nucleotides, which are simply denoted by four letters, A, C, G, and T. Biologists have been interest

2015-08-25 10:12:16 586

原创 POJ 3176 Cow Bowling(DP 数字三角形)

The cows don't use actual bowling balls when they go bowling. They each take a number (in the range 0..99), though, and line up in a standard bowling-pin-like triangle like this: 7

2015-08-25 08:36:30 388

原创 POJ 1260 Pearls(DP)

DescriptionIn Pearlania everybody is fond of pearls. One company, called The Royal Pearl, produces a lot of jewelry with pearls in it. The Royal Pearl has its name because it delivers to the royal f

2015-08-24 21:30:24 600

原创 SDUTOJ 2080 最长公共子序列问题(LCS)

题目描述 给定两个序列X=输入输入数据有多组,每组有两行 ,每行为一个长度不超过500的字符串(输入全是大写英文字母(A,Z)),表示序列X和Y。输出每组输出一行,表示所求得的最长公共子序列的长度,若不存在公共子序列,则输出0。示例输入ABCBDABBDCABA示例输出4#include#include#includ

2015-08-24 20:04:31 516

原创 POJ 1836 Alignment(DP LIS)

DescriptionIn the army, a platoon is composed by n soldiers. During the morning inspection, the soldiers are aligned in a straight line in front of the captain. The captain is not satisfied with the

2015-08-24 19:49:39 522

原创 SDUTOJ 3131 A回(多重背包)

题目描述新年伊始,我飞瞅准机会要大赚一笔,于是我飞换了一个体积为V的背包。 现在有N种商品,每种商品有Mi件,可以带来的收益为Pi,体积为Vi。那么问题来了,在所装物品不超过V的前提下的最大收益是多少?谁能快速的做帮我飞算出来,我飞就让谁出任UFO,迎娶高富帅,走上人生巅峰233。各位准Final巨巨加油啊。输入 第一行输入一个T,代表有T(1 组数据。对于

2015-08-24 18:19:58 504

原创 POJ 1276 Cash Machine(多重背包)

DescriptionA Bank plans to install a machine for cash withdrawal. The machine is able to deliver appropriate @ bills for a requested cash amount. The machine uses exactly N distinct bill denominatio

2015-08-24 17:18:34 592

原创 POJ 1837 Balance(01背包)

DescriptionGigel has a strange "balance" and he wants to poise it. Actually, the device is different from any other ordinary balance.It orders two arms of negligible weight and each arm's length i

2015-08-24 15:10:21 541

原创 SDUTOJ 2826 小P寻宝记——好基友一起走(完全背包)

小P寻宝记——好基友一起走Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^题目描述话说,上次小P到伊利哇呀国旅行得到了一批宝藏。他是相当开心啊,回来就告诉了他的好基友小鑫,于是他们又结伴去伊利哇呀国寻宝。这次小P的寻宝之路可没有那么的轻松,他们走到了一个森林,小鑫一不小心被触发了机关,被困在了一个大笼子里面,

2015-08-24 10:54:26 945

原创 SDUTOJ 1381 小P寻宝记——粗心的基友 (01背包)

题目描述这对好基友他们在经历无数的艰难险阻后,终于找到了宝藏。无奈的是这一对好基友竟然是一样的粗心,又忘记了带一个大一点的包包,可惜啊、、选择又出现了啊、、已知包的体积是v,每种宝贝只有一种,宝贝的体积是pi,价值是wi。求出这对粗心的基友可以最多带走价值多少的宝藏。输入输入数据有多组。每组第一行有两个正整数n(n 接下来n行,每行有两个正整数vi, wi。

2015-08-24 10:42:09 876

原创 dd大牛--背包九讲

P01: 01背包问题题目有N件物品和一个容量为V的背包。第i件物品的费用是c[i],价值是w[i]。求解将哪些物品装入背包可使价值总和最大。基本思路这是最基础的背包问题,特点是:每种物品仅有一件,可以选择放或不放。 用子问题定义状态:即f[i][v]表示前i件物品恰放入一个容量为v的背包可以获得的最大价值。则其状态转移方程便是: f[i][v]=max{f[i-1][v],f

2015-08-24 09:23:00 1942

原创 HDOJ 5417 Victor and Machine

Problem DescriptionVictor has a machine. When the machine starts up, it will pop out a ball immediately. After that, the machine will pop out a ball everyw seconds. However, the machine has some

2015-08-24 09:15:45 675

原创 Problem 2184 逆序数还原

Problem Description有一段时间Eric对逆序数充满了兴趣,于是他开始求解许多数列的逆序数(对于由1...n构成的一种排列数组a,逆序数即为满足iaj的数字对数),但是某天他发现自己遗失了原来的数列,只留下之前计算过程中留下的各个数字对应的逆序数,现在请你帮他还原出原序列。 Input数据有多组,请处理到文件结尾。每组数据第一行为一个整数N(1第二行

2015-08-23 21:07:10 718

原创 HOJ 3729 I'm Telling the Truth

Problem DescriptionYou are given a string S consisting of lowercase letters, and your task is counting the number of substring that the number of each lowercase letter in the substring is no more th

2015-08-23 20:08:04 752

原创 hdu 5056 Boring count (窗口滑动)

You are given a string S consisting of lowercase letters, and your task is counting the number of substring that the number of each lowercase letter in the substring is no more than K.  Input

2015-08-23 17:46:59 718

orecal考试试题

Orecal的JAVA证书考试原题,需要的同志建议看一下!!

2018-11-03

rar密码破解

密码破解

2017-06-23

根据浏览器宽度调整布局

根据浏览器宽度调整布局

2016-04-13

压缩录频软件

录频软件,简单易操作,画质较好,方便快捷

2015-12-29

空空如也

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

TA关注的人

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