自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Bookshelf 2 ​ POJ - 3628

title: Poj-3628date: 2019-02-09 18:32:26tags: 01背包 Bookshelf 2​ POJ - 3628 Farmer John recently bought another bookshelf for the cow library, but the shelf is getting f...

2019-02-11 16:39:29 258

原创 Charm Bracelet ​ POJ - 3624

title: Poj-3624date: 2019-02-09 18:26:16tags: Charm Bracelet​ POJ - 3624 Bessie has gone to the mall’s jewelry store and spies a charm bracelet. Of course, she’d like t...

2019-02-11 16:38:35 158

原创 HDU - 2546

A - 饭卡​ HDU - 2546 电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可以购买成功(即使购买后卡上余额为负),否则无法购买(即使金额足够)。所以大家都希望尽量使卡上的余额最少。某天,食堂中有n种菜出售,每种菜可购买一次。已知每种菜的价格以及卡上的余额,问最...

2019-02-08 22:55:01 248

原创 M - Tavas and SaDDas CodeForces - 535B

Once again Tavas started eating coffee mix without water! Keione told him that it smells awful, but he didn't stop doing that. That's why Keione told his smart friend, SaDDas to punish him! SaDDas too...

2018-12-13 19:45:07 141

原创 Problem B: Integer Inquiry

Problem B: Integer InquiryTime Limit: 1 Sec Memory Limit: 64 MBSubmit: 1553 Solved: 368DescriptionOne of the first users of BIT’s new supercomputer was Chip Diller. He extended his exploration o...

2018-12-12 16:43:28 256

原创 Problem D: 检索大写字母

Problem D: 检索大写字母Time Limit: 1 Sec Memory Limit: 64 MBSubmit: 4902 Solved: 2755Description输入一行字符串,按字符串各字母出现次序输出字符串中所有出现过的大写英文字母(不能重复输出相同字母)Input输入一行字符串。Output输出字符串中所有的大写字母Sample InputFONTN...

2018-11-28 13:29:32 1417 2

原创 R - Bear and Finding Criminals

There are n cities in Bearland, numbered 1 through n. Cities are arranged in one long row. The distance between cities i and j is equal to |i - j|.Limak is a police officer. He lives in a city a. Hi...

2018-11-26 17:19:05 167

原创 P - Kyoya and Photobooks

Kyoya Ootori is selling photobooks of the Ouran High School Host Club. He has 26 photos, labeled "a" to "z", and he has compiled them into a photo booklet with some photos in some order (possibly with...

2018-11-26 00:37:04 170

原创 O - Perfect Permutation

A permutation is a sequence of integers p1, p2, ..., pn, consisting of n distinct positive integers, each of them doesn't exceed n. Let's denote the i-th element of permutation p as pi. We'll call num...

2018-11-26 00:34:30 189

原创 M - Find Amir

A few years ago Sajjad left his school and register to another one due to security reasons. Now he wishes to find Amir, one of his schoolmates and good friends.There are n schools numerated from 1 t...

2018-11-25 13:37:25 150

原创 L - Mike and palindrome

Mike has a string s consisting of only lowercase English letters. He wants to change exactly one character from the string so that the resulting one is a palindrome.A palindrome is a string that rea...

2018-11-25 13:15:00 204

原创 K - Pasha and Stick

Pasha has a wooden stick of some positive integer length n. He wants to perform exactly three cuts to get four parts of the stick. Each part must have some positive integer length and the sum of these...

2018-11-24 22:43:04 161

原创 D - Bear and Five Cards

A little bear Limak plays a game. He has five cards. There is one number written on each card. Each number is a positive integer.Limak can discard (throw out) some cards. His goal is to minimize the...

2018-11-22 18:22:15 137

原创 水题—— B - Maya Calendar

B - Maya CalendarDuring his last sabbatical, professor M. A. Ya made a surprising discovery about the old Maya calendar. From an old knotted message, professor discovered that the Maya civilization u...

2018-11-17 18:59:59 267

原创 再遇结构体- A - DNA Sorting

A - DNA SortingOne measure of ``unsortedness'' in a sequence is the number of pairs of entries that are out of order with respect to each other. For instance, in the letter sequence ``DAABEC'', this ...

2018-11-15 22:10:02 271

原创 初识高精度之P1096 HanoiHanoiHanoi双塔问题

这道题是一道用来练习递推的经典题目,但是在推出递推关系式,满心欢喜将代码提交后只通过了四组数据,i can’t believe that;马上溜去看题解,嗯,一个大牛说这是道水题(没毛病),用高精度提交就可以了。。。。高精度???我就乖乖滚去百度了题目如下题目描述给定AAA、BBB、CCC三根足够长的细柱,在AAA柱上放有2n2n2n个中间有孔的圆盘,共有nnn个不同的尺寸,每个尺寸都有两...

2018-11-15 14:21:55 586

原创 深入浅出学算法009-韩信点兵

4008: 深入浅出学算法009-韩信点兵Time Limit: 1 Sec Memory Limit: 64 MBSubmit: 1886 Solved: 1549Description 秦朝末年,楚汉相争。有一次,韩信将1500名将士与楚王大将李锋交战。苦战一场,楚军不敌,败退回营,汉军也死伤四五百人,于是,韩信整顿兵马也返回大本营。当行至一山坡,忽有后军来报,说有楚军骑兵追来。只...

2018-11-12 23:49:14 1435

原创 深入浅出学算法008-求佩尔方程的解

4007: 深入浅出学算法008-求佩尔方程的解Time Limit: 1 Sec Memory Limit: 64 MBSubmit: 3946 Solved: 1230Description求关于x y的二次不定方程的解 x2-ny2=1Input多组输入数据,先输入组数T 然后输入正整数n(n<=100)Output对于每组数据输出一行,求y<=10000的最...

2018-11-12 23:42:31 2266 1

原创 深入浅出学算法007-统计求和

4006: 深入浅出学算法007-统计求和Time Limit: 1 Sec Memory Limit: 64 MBSubmit: 4335 Solved: 2014Description求含有数字a且不能被a整除的4位整数的个数,并求这些整数的和Input多组测试数据,先输入整数T表示组数然后每组输入1个整数a(1<=a<=9)Output对于每组测试数据输出一行...

2018-11-12 18:02:53 2050

原创 深入浅出学算法006-求不定方程的所有解

4005: 深入浅出学算法006-求不定方程的所有解Time Limit: 1 Sec Memory Limit: 64 MBSubmit: 5139 Solved: 2159Description现有一方程ax+by=c,其中系数a、b、c均为整数,求符合条件的所有正整数解,要求按x由小到大排列,其中a b c 均为不大于1000的正整数Input多组测试数据,第一行先输入整数T...

2018-11-12 17:49:34 2575

原创 深入浅出学算法004-求多个数的最小公倍数

4003: 深入浅出学算法004-求多个数的最小公倍数Time Limit: 1 Sec Memory Limit: 64 MBSubmit: 3630 Solved: 983Description求n个整数的最小公倍数Input多组测试数据,先输入整数T表示组数 然后每行先输入1个整数n,后面输入n个整数k1 k2…knOutput求k1 k2 …kn的最小公倍数Sampl...

2018-11-12 17:46:21 3810

原创 4002: 深入浅出学算法003-计算复杂度

4002: 深入浅出学算法003-计算复杂度Description算法复杂度一般分为:时间复杂度、空间复杂度、编程复杂度。 这三个复杂度本身是矛盾体,不能一味地追求降低某一复杂度,否则会带来其他复杂度的增加。在权衡各方面的情况下,降低时间复杂度成为本课程学习的重点之一。 请计算下面几个程序段的复杂程度,分别用1、logn、n、nlogn、n2、n3或2^n来表示程序片段1:x=x+1;程...

2018-11-10 23:54:32 1811 1

空空如也

空空如也

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

TA关注的人

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