自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

zoro_n的博客

只想走得更远

  • 博客(28)
  • 收藏
  • 关注

原创 zzuli 1904 小火山的股票交易

Description   “股市有风险,入市需谨慎”,小火山经历了之前买卖一次或者两次的股票♂交易,对于股票买卖已经很有经验了, 现在的他最多可以进行K次买卖,身为一个聪明的acmer,已经准确的知道了某只股票在未来N天的价格,每一次买入必须 卖出后才能进行下次买卖。现在,小火山想知道他最多可以获得多少利润?  Input 输入第一行是一个整数T(T 每一组数据

2016-08-31 16:14:20 339

原创 zzuli 1902 985的因子对难题

Description 985有n个正整数,他想知道存在多少个不同的因子对(a[i], a[j])使得 1 特别地,他认为(a[i],a[j])与(a[j],a[i])是一样的因子对。 Input 第一行输入一个整数t,代表有t组测试数据。 每组数据占两行,第一行输入一个n代表元素个数,下面一行输入n个整数a[]。 注:1 Output 一个整

2016-08-30 17:44:37 217

原创 zzuli 1990 985的“树”难题

Description 985给你一棵“树”以及它的根节点,要求你先判定它是否是一棵树,其次他想知道每个节点的“太子”数目以及它的父亲(root的话输出自己)。 “太子判定条件”: 一、若x是y的孩子节点,那么x是y的“太子”; 二、若x是y的“太子”且y是z的“太子”,那么x是z的“太子”。 Input 第一行输入一个整数t,代表有t组测试数据。 每组数据第一行输入

2016-08-30 13:25:30 623

原创 nyoj 1291 不是匹配

描述  有N个人,N个活动, 每个人只会对2个或者3个活动感兴趣,  每个活动也只有两个人或者两个活动对它兴趣,每个人参加一个  感兴趣的活动需要一天 ,且当天该活动被参加时,其他的人不能参加  如果每个人都参加完自己有兴趣的活动,应当怎样安排使得所用总天数时间最短 2 输入一个数T 表示T 组数据 每组一个N表示人数,编号1 -- N , 一个数 m ,接下

2016-08-20 20:49:29 243

原创 hdu 5858 Hard problem

Problem Description cjj is fun with math problem. One day he found a Olympic Mathematics problem for primary school students. It is too difficult for cjj. Can you solve it? Give you the side l

2016-08-19 10:57:01 271

原创 hdu 5867 Water problem

Problem Description If the numbers 1 to 5 are written out in words: one, two, three, four, five, then there are 3+3+5+4+4=19 letters used in total.If all the numbers from 1 to n (up to one thousand

2016-08-18 21:19:41 1194

原创 zzuli 1912 小火山的爱情密码

Description 小火山获得了一个字符串,然而大火山让小火山从里面截取一段字符串,并且让小火山截取的字符串满足一些字符达到一定数量。 小火山觉得很容易,但是他想要知道他至少得截取多长的字符串。 Input 首先是一个整数t(t 的种类.(字符只包含小写英文字母) 个数(没有重复字符种类),然后有m行,每行第一个是一个字符,然后是一个整数x(x

2016-08-16 18:02:15 356

原创 zzuli 1908 小火山的围棋梦想

Description   小火山最近喜欢上了围棋。   对于围棋,其实小火山是一窍不通的。现在棋盘上,有很多小火山的棋子。 如果棋盘上有这样的一个位置, 那么这个位置也会变成小火山 的棋子;这样的位置是指小火山的棋子将该位置围起来。   现在,小火山想知道实际棋盘是什么样子的。 你快来帮帮他吧! Input 输入第一行是一个整数T(T 每组数据,第一行为两个整数n

2016-08-16 12:01:04 445

原创 hdu 1576 A/B

Problem Description 要求(A/B)%9973,但由于A很大,我们只给出n(n=A%9973)(我们给定的A必能被B整除,且gcd(B,9973) = 1)。   Input 数据的第一行是一个T,表示有T组数据。 每组数据有两个数n(0   Output 对应每组数据输出(A/B)%9973。   Sampl

2016-08-15 17:35:04 188

原创 hdu 5835 Danganronpa

Problem Description Chisa Yukizome works as a teacher in the school. She prepares many gifts, which consist of n kinds with a[i] quantities of each kind, for her students and wants to hold a cl

2016-08-15 13:18:15 470

转载 转一篇心灵鸡汤,在贴吧上看的,作者不详

不知道什么时候,开始知道ACM;也不知道什么时候,开始喜欢上ACM。但是,我知道,我喜欢上了,而且不会后悔。我是大一的时候进的学校ACM队,那个时候,一切都是冰冷的,华东理工大学,在别人的眼里,只是每次给别人垫底的学校,次次如此。 但是,我们不甘心,我们从不甘心,当我们主力队员中的一个,一个月拼命集训,瘦了很多的时候,突然,我有一种哭的冲动。我问他,为什么?他告诉我:我喜欢ACM。也许是个傻傻的

2016-08-15 12:32:31 462

原创 hdu 5713 Elegant Construction

Problem Description Being an ACMer requires knowledge in many fields, because problems in this contest may use physics, biology, and even musicology as background. And now in this problem, you are

2016-08-13 11:33:12 243

原创 hdu 5826 physics

Problem Description There are n balls on a smooth horizontal straight track. The track can be considered to be a number line. The balls can be considered to be particles with the same mass. At t

2016-08-11 20:26:06 435

原创 HDU 5831 Rikka with Parenthesis II

Problem Description As we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. There is one of them: Correct parentheses sequences c

2016-08-11 19:38:24 325

原创 hdu 5818 Joint Stacks

Problem Description A stack is a data structure in which all insertions and deletions of entries are made at one end, called the "top" of the stack. The last entry which is inserted is the first on

2016-08-11 18:24:33 218

原创 hdu 5781 ATM Mechine

Problem Description Alice is going to take all her savings out of the ATM(Automatic Teller Machine). Alice forget how many deposit she has, and this strange ATM doesn't support query deposit. The o

2016-08-08 10:46:11 377

原创 hdu 5805 NanoApe Loves Sequencet耦合为

问题描述 退役狗 NanoApe 滚回去学文化课啦! 在数学课上,NanoApe 心痒痒又玩起了数列。他在纸上随便写了一个长度为 nn 的数列,他又根据心情随便删了一个数,这样他得到了一个新的数列,然后他计算出了所有相邻两数的差的绝对值的最大值。 他当然知道这个最大值会随着他删了的数改变而改变,所以他想知道假如全部数被删除的概率是相等的话,差的绝对值的最大值的期望是多少。 输入描述

2016-08-07 12:26:20 372

原创 hdu 5804 Price List

Problem Description There are n shops numbered with successive integers from 1 to n in Byteland. Every shop sells only one kind of goods, and the price of the i-th shop's goods is vi. Ever

2016-08-07 11:12:45 204

原创 zzuli 1899 985的最大和难题

Description 985有2 * n - 1个整数,他每次可以将其中n个数变号,操作次数不限,问他可以得到的最大和。 Input 第一行输入一个整数t,代表有t组测试数据。 每组数据占两行,第一行输入一个整数n,下面一行输入2*n-1个整数a[]。 注:1 Output 输出一个整数代表可以得到的最大和。 Sample Input

2016-08-06 17:46:19 246

原创 zzuli 1895 985的0-1串难题

Description 985有一个长度为n的0-1串,已知他最多可以修改k次(每次修改一个字符即0->1 或者 1->0),他想知道连续的全1子串最长是多少。 Input 第一行输入一个整数t,代表有t组测试数据。 每组数据第一行输入两个整数n,k分别代笔上面的信息。 注:1 Output 一个整数代表可以得到的最大长度。 Sample In

2016-08-06 15:29:46 277

原创 zzuli 1893 985的数学难题

Description 985有n个正整数,他想快速知道下面函数的返回值 int a[N+1]; long long Solve() {     int i, j;     long long ans = 0;     for(i = 1; i      for(int j = i + 1; j     ans += a[i] + a[j] + (a[i] ^ a[j]

2016-08-06 10:01:49 260

原创 hdu 5763 Another Meaning

Problem Description 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, MeiZ

2016-08-04 10:01:19 292

原创 hdu 5791 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 not

2016-08-02 20:47:47 312

原创 hdu 5783 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 not small than 0.

2016-08-02 17:05:51 331

原创 oj 4118 开餐馆

总时间限制: 1000ms 内存限制: 65536kB 描述 北大信息学院的同学小明毕业之后打算创业开餐馆.现在共有n 个地点可供选择。小明打算从中选择合适的位置开设一些餐馆。这 n 个地点排列在同一条直线上。我们用一个整数序列m1, m2, ... mn 来表示他们的相对位置。由于地段关系,开餐馆的利润会有所不同。我们用pi 表示在mi 处开餐馆的利润。为了避免自己的餐馆的内部竞争,餐馆之间

2016-08-01 22:38:23 324

原创 poj 3268 Silver Cow Party

Description One cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to attend the big cow party to be held at farm #X (1 ≤ X ≤ N). A total of M (1 ≤ M ≤ 100,000) unidirectio

2016-08-01 21:38:21 310

原创 Aizu 0189 Convenient Location

Convenient Location 来春卒業するAさんは,就職を機に引越しをすることにしました。就職する会社は,オフィスがい くつかの町にあって、日によって出勤するオフィスが違います。そこでAさんは,どこのオフィスに 行くにも時間の短い町に住もうと考えました。 そこであなたは、Aさんを助けるため、住むのに一番便利な町を探すことになりました。 町には0から始まる番号が振

2016-08-01 10:49:16 248

原创 oj4976 硬币

总时间限制: 1000ms 内存限制: 262144kB 描述 宇航员Bob有一天来到火星上,他有收集硬币的习惯。于是他将火星上所有面值的硬币都收集起来了,一共有n种,每种只有一个:面值分别为a1,a2… an。 Bob在机场看到了一个特别喜欢的礼物,想买来送给朋友Alice,这个礼物的价格是X元。Bob很想知道为了买这个礼物他的哪些硬币是必须被使用的,即Bob必须放弃收集好的

2016-08-01 09:28:50 1214

空空如也

空空如也

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

TA关注的人

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