摘要: Due to recent rains, water has pooled in various places in Farmer John's field, which is represented by a rectangle of N x M (1 <= N <= 100; 1 <= M <= 阅读全文
posted @ 2017-07-25 20:12 X_1996 阅读(136) 评论(0) 推荐(0)
摘要: 符号三角形的 第1行有n个由“+”和”-“组成的符号 ,以后每行符号比上行少1个,2个同号下面是”+“,2个异 号下面是”-“ 。计算有多少个不同的符号三角形,使其所含”+“ 和”-“ 的个数相同 。 n=7时的1个符号三角形如下: + + - + - + + + - - - - + - + + + 阅读全文
posted @ 2017-07-25 20:08 X_1996 阅读(489) 评论(0) 推荐(0)
摘要: “连连看”相信很多人都玩过。没玩过也没关系,下面我给大家介绍一下游戏规则:在一个棋盘中,放了很多的棋子。如果某两个相同的棋子,可以通过一条线连起来(这条线不能经过其它棋子),而且线的转折次数不超过两次,那么这两个棋子就可以在棋盘上消去。不好意思,由于我以前没有玩过连连看,咨询了同学的意见,连线不能从 阅读全文
posted @ 2017-07-25 19:55 X_1996 阅读(144) 评论(0) 推荐(0)
摘要: Being a programmer, you like arrays a lot. For your birthday, your friends have given you an array a consisting of n distinct integers. Unfortunately, 阅读全文
posted @ 2017-07-25 19:52 X_1996 阅读(145) 评论(0) 推荐(0)
摘要: Little Dima misbehaved during a math lesson a lot and the nasty teacher Mr. Pickles gave him the following problem as a punishment. Find all integer s 阅读全文
posted @ 2017-07-25 19:25 X_1996 阅读(257) 评论(0) 推荐(0)
摘要: You have r red, g green and b blue balloons. To decorate a single table for the banquet you need exactly three balloons. Three balloons attached to so 阅读全文
posted @ 2017-07-25 19:18 X_1996 阅读(189) 评论(0) 推荐(0)
摘要: Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Be 阅读全文
posted @ 2017-07-25 19:07 X_1996 阅读(173) 评论(0) 推荐(0)
摘要: 某天,Lostmonkey发明了一种超级弹力装置,为了在他的绵羊朋友面前显摆,他邀请小绵羊一起玩个游戏。游戏一开始,Lostmonkey在地上沿着一条直线摆上n个装置,每个装置设定初始弹力系数ki,当绵羊达到第i个装置时,它会往后弹ki步,达到第i+ki个装置,若不存在第i+ki个装置,则绵羊被弹飞 阅读全文
posted @ 2017-05-10 18:37 X_1996 阅读(238) 评论(0) 推荐(0)
摘要: 题目链接:https://acm.zzuli.edu.cn/zzuliacm/problem.php?id=1861 Manacher's Algorithm 马拉车算法和详解:http://www.cnblogs.com/grandyang/p/4475985.html Description 有 阅读全文
posted @ 2017-05-01 14:57 X_1996 阅读(262) 评论(0) 推荐(0)
摘要: 题目链接:https://vjudge.net/contest/160714#problem/D Little Nastya has a hobby, she likes to remove some letters from word, to obtain another word. But it 阅读全文
posted @ 2017-05-01 13:44 X_1996 阅读(173) 评论(0) 推荐(0)