摘要: 1010: 求个最大值 题目描述 给出 n(1 <= n <= 200000)个数字 ai(1 <= ai <= 1000000),i 为数字的下标,按输入顺序从 1 开始编号一直到 n,求满足 ai >= aj 的最大的 ai % aj。 输入 第一行一个数字 n,第二行 n 个整数。 输出 题目 阅读全文
posted @ 2017-04-30 21:53 gongpixin 阅读(344) 评论(0) 推荐(0) 编辑
摘要: 1009: 失恋的小 T 题目描述 小 T 最近失恋了,开始怀疑人生和爱情,他想知道在这世界中去伪存真后还剩多少。 小 T 在网上拿到了代表大千世界的长字符串,删掉了所有换行空格和标点符号,只剩下了小写字母。 现在字符串中有好多重复的子串,相同子串里只有一个是 Real 的。 为了让小 T 走出失恋 阅读全文
posted @ 2017-04-30 21:52 gongpixin 阅读(293) 评论(0) 推荐(0) 编辑
摘要: 1008: Envy 题目描述 今年的 ACM 比赛推出了一个赛后的娱乐活动,所有参赛选手排成一排玩击鼓传花,关于击鼓传花的玩法是这样的: 数人或几十人围成圆圈坐下,其中一人拿花(或一小物件);另有一人背着大家或蒙眼击鼓(桌子、黑板或其他能发出声音的物体),鼓响时众人开始依次传花,至鼓停止为止。此时 阅读全文
posted @ 2017-04-30 21:51 gongpixin 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 1007: 数字逻辑练习题 题目描述 原码、反码、补码都是一样的,都是正数本身。 对于负数: 原码是符号位为 1,数值部分取绝对值的二进制。 反码是符号位为 1,其它位是原码取反。 补码是符号位为 1,其它位是原码取反,未位加 1。 输入一个 64bit 十进制整数,输出它的原码,反码,补码的 16 阅读全文
posted @ 2017-04-30 21:49 gongpixin 阅读(669) 评论(0) 推荐(0) 编辑
摘要: 1006: 小明与隔壁老王之间不得不说的故事 题目描述 有一天,小明想偷吃隔壁老王院子里苹果树上的苹果。 但是,老王家有一条哈士奇,每隔一定时间就会吼叫。准确的说,它会在一个时间点吼叫第一次,之后每隔一段时间吼叫两次,比如第一次吼叫是在 t 时刻,间隔为 s,则吼叫时间点为 t, t + s, t 阅读全文
posted @ 2017-04-30 21:48 gongpixin 阅读(700) 评论(0) 推荐(0) 编辑
摘要: 1005: 琐碎的区间 题目描述 给出一个长度为 n 的整数序列 A[1..n],有三种操作: 1 l r x : 把[l, r]区间的每个数都加上 x 2 l r : 把[l, r] 区间每个 A[i]变为sqrt(a[i])的整数部分3 l r : 求[l, r] 区间所有数的和 其中 l 和 阅读全文
posted @ 2017-04-30 21:47 gongpixin 阅读(291) 评论(0) 推荐(0) 编辑
摘要: 1004: 有解吗? 题目描述 给出方程 a * 1234567 + b * 123456 + c * 1234 = n。其中 a、b、c 均为非负整数变量,n(1 <= n <= 10 ^ 9)为给出整数常量。判断方程是否有解。 输入 一个整数 n 输出 如果有解,输出“YES”;无解,输出“NO 阅读全文
posted @ 2017-04-30 21:46 gongpixin 阅读(292) 评论(0) 推荐(0) 编辑
摘要: 1003: 瑞神要考研 题目描述 瑞神要准备考研了,为了复习数据结构,瑞神在某宝上买了一本数据结构得考研辅导资料《考研数据结构 从入门到放弃》,从此瑞神开始了愉快的复(zhuang)习(bi)。 有一天,瑞神找了好多条链表来辅助自己复习,但是他在复习的过程中一不小心把链表掉在了地上,捡起来的时候链表 阅读全文
posted @ 2017-04-30 21:45 gongpixin 阅读(489) 评论(0) 推荐(0) 编辑
摘要: 1002: 小婷婷吃蘑菇 题目描述 小婷婷是个吃货, 有一天, 她来到了神奇的魔法谷, 这里有一条单行道路, 小婷婷为了吃到世界上最美味的食物,必须要穿过这条道路。 这是一个长度为 N 的魔法道路,小婷婷需要从 1 走到 N。每个单位长度上有一个蘑菇, 因为小婷婷是个大吃货, 所以她总是控制不住自己 阅读全文
posted @ 2017-04-30 21:44 gongpixin 阅读(480) 评论(0) 推荐(0) 编辑
摘要: 1001: 字符串“水”题 题目描述 给出一个长度为 n 的字符串(1<=n<=100000),求有多少个连续字串中所有的字母都出现了偶数次。 输入 第一行一个正整数 T,表示数据组数(1 <= T <= 10)。 接下来 T 行,每行有一个只包含小写字母的字符串。 输出 每个答案输出满足要求字符串 阅读全文
posted @ 2017-04-30 21:43 gongpixin 阅读(368) 评论(0) 推荐(0) 编辑
摘要: 1210: Happiness Description Chicken brother is very happy today, because he attained N pieces of biscuits whose tastes are A or B. These biscuits are 阅读全文
posted @ 2017-04-30 21:39 gongpixin 阅读(164) 评论(0) 推荐(0) 编辑
摘要: K.Deadline There are N bugs to be repaired and some engineers whose abilities are roughly equal. And an engineer can repair a bug per day. Each bug ha 阅读全文
posted @ 2017-04-30 21:38 gongpixin 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 1208: Color Circle Description There are colorful flowers in the parterre in front of the door of college and form many beautiful patterns. Now, you w 阅读全文
posted @ 2017-04-30 21:36 gongpixin 阅读(370) 评论(0) 推荐(0) 编辑
摘要: 1207: Candies Description Xiao Ming likes those N candies he collects very much. There are two kinds of candies, A and B. One day, Xiao Ming puts his 阅读全文
posted @ 2017-04-30 21:35 gongpixin 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 1206: MathematicalGame Description Xiao Ming likes to play mathematical games very much. One day, he gets a sequence of n positive integers. XOR (l , 阅读全文
posted @ 2017-04-30 21:34 gongpixin 阅读(234) 评论(0) 推荐(0) 编辑
摘要: G. Sequence Number In Linear algebra, we have learned the definition of inversion number: Assuming A is a ordered set with n numbers ( n > 1 ) which a 阅读全文
posted @ 2017-04-30 21:33 gongpixin 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 1204: Escape from the Darkness Description Xiao Ming, a high school student, learnt blackbody radiation from the physics class. The black body on the 阅读全文
posted @ 2017-04-30 21:32 gongpixin 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 1203: One Stroke Description There is a complete binary tree which includes n nodes. Each node on the tree has a weight w, each edge on the tree is di 阅读全文
posted @ 2017-04-30 21:31 gongpixin 阅读(244) 评论(0) 推荐(0) 编辑
摘要: 1202: GCD Description Input The first line is an positive integer T . (1<=T<= 10^3) indicates the number of test cases. In the next T lines, there are 阅读全文
posted @ 2017-04-30 21:30 gongpixin 阅读(264) 评论(0) 推荐(0) 编辑
摘要: 1201: Friends Description In a country, the relationship between people can be indicated by a tree. If two people are acquainted with each other, ther 阅读全文
posted @ 2017-04-30 21:29 gongpixin 阅读(224) 评论(0) 推荐(0) 编辑