自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 CodeForces - 758B Blown Garland

Nothing is eternal in the world, Kostya understood it on the 7-th of January when he saw partially dead four-color garland.Now he has a goal to replace dead light bulbs, however he doesn't know how

2017-03-28 22:51:00 473

原创 CodeForces - 758A Holiday Of Equality

In Berland it is the holiday of equality. In honor of the holiday the king decided to equalize the welfare of all citizens in Berland by the expense of the state treasury.Totally in Berland there ar

2017-03-24 20:15:47 583

原创 安徽大学第九届大学生程序设计竞赛 网络预选赛 H - 今年多少岁

H. 今年多少岁Time Limit: 1000 ms   Memory Limit: 64 MBTotal Submission: 478   Submission Accepted: 112Description小明出生于1937年7月7日,问对于给定的日期,小明几周岁了,不足一周年的部分可以忽略。注意:1938年7月6日,小明0周岁,1938年7月7日小明1周岁,

2017-03-24 20:01:51 583

原创 安徽大学第九届大学生程序设计竞赛 网络预选赛 G - 交换大法好

G. 交换大法好Time Limit: 1000 ms   Memory Limit: 64 MBTotal Submission: 158   Submission Accepted: 31Description有一天,天上掉馅饼了。不过不是直接掉馅饼,是告诉你你将要得到的馅饼的数量a。聪明的你得到了一种魔法,可以在整数a中交换任意两个相邻的数字。而这种魔法,你最多只能使用k

2017-03-24 20:00:24 522

原创 安徽大学第九届大学生程序设计竞赛 网络预选赛 F - 周末大法好

F. 周末大法好Time Limit: 1000 ms   Memory Limit: 64 MBTotal Submission: 318   Submission Accepted: 116Description在火星上,每年有x天。惊奇的是,和地球上一样,火星上也是有星期的概念的,连续的5天工作日,然后连续的2天周末。他们只有周末放假。现在你的任务是,确定火星上每年可

2017-03-24 19:59:15 430

原创 安徽大学第九届大学生程序设计竞赛 网络预选赛 D - 买买买

D. 买买买Time Limit: 1000 ms   Memory Limit: 64 MBTotal Submission: 286   Submission Accepted: 56Description一天Alice打开了她日常玩的游戏,发现她里面还有n个游戏币,她想把这些游戏币花光。现在可以买的一共三种道具,分别是房子(每一个价值1234567个游戏币),车子(每

2017-03-24 19:57:54 421

原创 安徽大学第九届大学生程序设计竞赛 网络预选赛 C - 置换的魔术

C. 置换的魔术Time Limit: 1000 ms   Memory Limit: 64 MBTotal Submission: 452   Submission Accepted: 30Description有n个正整数,其中1到n的正整数出现且只出现一次的序列,称为1-n的一个排列。如1,2,3和3,1,2都是1-3的排列,但是1,3,3不是1-3的排列。如今,

2017-03-24 19:55:13 435

原创 安徽大学第九届大学生程序设计竞赛 网络预选赛 B - 迭代归一

B. 迭代归一Time Limit: 1000 ms   Memory Limit: 64 MBTotal Submission: 323   Submission Accepted: 74Description我们把一个正整数的每一位上的数字加起来,得到新的数字,我们把这样的一次操作称为一次迭代变换。直到这个数字只有一位数。如,9876经过一次变换成为9+8+7+6=30

2017-03-24 19:51:41 416

原创 安徽大学第九届大学生程序设计竞赛 网络预选赛 A - 成功人士

A. 成功人士Time Limit: 1000 ms   Memory Limit: 64 MBTotal Submission: 250   Submission Accepted: 76Description学校里共有n个学生,m门课,如果某个学生在某门课中拿到了最高分(可以是并列),则这个学生是成功人士。现在给出n个学生的m门课的成绩,问有多少个成功人士。Inpu

2017-03-24 19:48:31 622

原创 HDU-1003 Max Sum

Given a sequence a11,a22,a33......ann, your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max sum in this sequence is 6 + (-1) + 5 + 4 = 14. InputThe

2017-03-19 08:30:31 392

原创 HDU-5933 ArcSoft's Office Rearrangement

Problem DescriptionArcSoft, Inc. is a leading global professional computer photography and computer vision technology company.There are N working blocks in ArcSoft company, which form a stra

2016-11-21 22:33:45 392

原创 CodeForces - 709A Juicer

DescriptionKolya is going to make fresh orange juice. He has n oranges of sizes a1, a2, ..., an. Kolya will put them in the juicer in the fixed order, starting with orange of size a1, then orang

2016-10-24 21:52:43 426

转载 ACM算法列表

ACM 所有算法数据结构栈,队列,链表哈希表,哈希数组堆,优先队列双端队列可并堆左偏堆二叉查找树Treap伸展树并查集集合计数问题二分图的识别平衡二叉树二叉排序树线段树一维线段树二维线段树树状数组一维树状数组N维树状数组字典树后缀数组,后缀树块状链表哈夫曼树桶,跳跃表

2016-09-24 21:38:52 401

转载 BFS/DFS模板

BFS#include#include#include#includeusing namespace std;const int maxn=100;bool vst[maxn][maxn]; //访问int dir[4][2]={0,1,0,-1,1,0,-1,0};struct State //状态{ int x,y; //坐标位置 int Step_Count

2016-09-07 21:19:02 395

原创 高精度加法

输入两个数后输出它们的和#include#includeint main(){char op1[1002],op2[1002];int c,i,j,n,m,s1[1002],s2[1002],len1,len2,count;count=1;scanf("%d",&n);m=n;while(m--){memset(s1,0,1002*sizeof(in

2016-09-07 16:10:16 1223

原创 UVA - 11292 Dragon of Loowater

Time Limit: 1sec    Memory Limit:32MB DescriptionOnce upon a time, in the Kingdom of Loowater, a minor nuisance turned into a major problem.The shores of Rellau Creek in central Loowater had alw

2016-09-07 15:56:38 306

原创 Codeforces Round #367 (Div. 2) B Interesting drink

DescriptionVasiliy likes to rest after a hard work, so you may often meet him in some bar nearby. As all programmers do, he loves the famous drink "Beecola", which can be bought in n different

2016-09-07 15:51:16 286

原创 UVA - 1025 A Spy in the Metro

Secret agent Maria was sent to Algorithms City to carry out an especially dangerous mission. Afterseveral thrilling events we find her in the first station of Algorithms City Metro, examining the ti

2016-09-07 15:50:09 329

原创 UVA - 10340 All in All

You have devised a new encryption technique which encodes a message by inserting between its characters randomly generated strings in a clever way. Because of pending patent issues we will not discu

2016-09-07 15:49:42 290

原创 UVA - 1368 DNA Consensus String

Figure 1.DNA (Deoxyribonucleic Acid) is the molecule which contains the genetic instructions. It consists of four different nucleotides, namely Adenine, Thymine, Guanine, and Cytosine as shown in

2016-09-07 15:48:49 357

原创 UVA - 232 Crossword Answers

A crossword puzzle consists of a rectangular grid of black andwhite squares and two lists of definitions (or descriptions).One list of definitions is for “words” to be written left toright across

2016-09-07 15:48:19 576

原创 UVA - 227 Puzzle

Puzzle               Time limit: 3.000 secondsA children's puzzle that was popular 30 years ago consisted of a 5x5 frame which contained 24 small squares of equal size. A unique letter of the alph

2016-09-07 15:47:36 338

原创 UVA 455 – Periodic Strings

A character string is said to have period k if it can be formed by concatenating one or more repetitions of another string of length k. For example, the string "abcabcabcabc"has period 3, since it i

2016-09-07 15:47:02 330

原创 UVA - 1225 Digit Counting

DescriptionTrung is bored with his mathematics homeworks. He takes a piece of chalk and starts writing a sequence of consecutive integers starting with 1 to N (1 N . After that, he counts

2016-09-07 15:46:26 261

原创 UVA - 1586 Molar mass

An organic compound is any member of a large class of chem-ical compounds whose molecules contain carbon. The molarmass of an organic compound is the mass of one mole of theorganic compound. The

2016-09-07 15:43:52 358

原创 UVA - 340 Master-Mind Hints

Master-Mind HintsTime Limit: 3000MS  64bit IO Format: %lld & %lluSubmit Status uDebugDescriptionMasterMind is a game for two players. One of them, Designer, s

2016-09-07 15:42:39 358

原创 hdu 1231 最大连续子序列

Description给定K个整数的序列{ N1, N2, ..., NK },其任意连续子序列可表示为{ Ni, Ni+1, ..., Nj },其中 1 例如给定序列{ -2, 11, -4, 13, -5, -2 },其最大连续子序列为{ 11, -4, 13 },最大和 为20。 在今年的数据结构考卷中,要求编写程序得到最大和,现在增加一个要求,即还需要输出该

2016-09-07 15:41:48 790

原创 codeforces 658B-Bear and Displayed Friends

DescriptionLimak is a little polar bear. He loves connecting with other bears via social networks. He has n friends and his relation with the i-th of them is described by a unique integer ti.

2016-09-07 15:41:00 448

原创 确定数制

Description编写一段程序读入三个整数p,q和r,然后确定一个进制B(2例如:p=11,q=11,r=121,则有 11(3)* 11(3)=121(3) Input有T组测试样例,T在第一行给出。每一组测试样例占一行,包含三个整数p,q,r。 p,q,r的所有位都是数字,并且1Output对于每个测试样例输出一行。该行包含一个整

2016-09-07 15:37:59 442

原创 统计字符数

Description判断一个由a-z和A-Z字符组成的字符串中哪个字符出现的次数最多Input第1行是测试数据的组数n,每组测试数据占1行,是一个由a-z和A-Z字符组成的字符串,每组测试数据之间有一个空行,每行数据不超过1000个字符且非空Outputn行,每行输出对应一个输入。一行输出包括出现次数最多的字符和该字符出现的次数,中间是一个

2016-09-07 15:35:56 750

原创 数制转换问题

Description在实际问题中经常遇到需要对不同的进制数进行转换,实现将P进制数转换成R进制数(2Input数据包含多行,每行包含三个数据,分别为P,R和待转换的P进制数d(该数的十进制表示小于100000000),字母用大写表示,ABCDEF,当P为0时,结束输入。Output对应每行输入,只有一个输出,且每行只有一个数据S

2016-09-07 15:32:53 1675

原创 抢红包

抢红包时间限制300 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者陈越没有人没抢过红包吧…… 这里给出N个人之间互相发红包、抢红包的记录,请你统计一下他们抢红包的收获。输入格式:输入第一行给出一个正整

2016-09-07 15:31:26 479

原创 UVA - 815 Flooded!

To enable homebuyers to estimate the cost of flood insurance, a real-estate firm provides clients withthe elevation of each 10-meter by 10-meter square of land in regions where homes may be purchase

2016-08-18 16:10:59 369

原创 UVA - 201 Squares

A children's board game consists of a square array of dots that contains lines connecting some of the pairs of adjacent dots. One part of the game requires that the players count the number of squares

2016-08-17 14:18:32 378

原创 2016CCPC网络赛个人总结

今天下午是2016年的CCPC中国大学生程序设计竞赛的网络赛。几百个学校共计一千多个队参赛。在HDOJ举行。12点开始以后,我们马上看了第一题,嘻嘻哈哈两个星球有着不同的公转周期。给出一个时间。当过了这么多天以后,两个星球是否同时处在一年的第一天。给出的数据的长度不超过一千万。。。第一眼看成了大小不超过一千万。这是一道卡时间的高精度除法题。求一个高精度的数分别除以两个低精度的数。所得到的余数是否同

2016-08-14 18:39:27 6825

空空如也

空空如也

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

TA关注的人

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