摘要: 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 阅读(374) 评论(0) 推荐(0)
摘要: 1009: 失恋的小 T 题目描述 小 T 最近失恋了,开始怀疑人生和爱情,他想知道在这世界中去伪存真后还剩多少。 小 T 在网上拿到了代表大千世界的长字符串,删掉了所有换行空格和标点符号,只剩下了小写字母。 现在字符串中有好多重复的子串,相同子串里只有一个是 Real 的。 为了让小 T 走出失恋 阅读全文
posted @ 2017-04-30 21:52 gongpixin 阅读(304) 评论(0) 推荐(0)
摘要: 1008: Envy 题目描述 今年的 ACM 比赛推出了一个赛后的娱乐活动,所有参赛选手排成一排玩击鼓传花,关于击鼓传花的玩法是这样的: 数人或几十人围成圆圈坐下,其中一人拿花(或一小物件);另有一人背着大家或蒙眼击鼓(桌子、黑板或其他能发出声音的物体),鼓响时众人开始依次传花,至鼓停止为止。此时 阅读全文
posted @ 2017-04-30 21:51 gongpixin 阅读(276) 评论(0) 推荐(0)
摘要: 1007: 数字逻辑练习题 题目描述 原码、反码、补码都是一样的,都是正数本身。 对于负数: 原码是符号位为 1,数值部分取绝对值的二进制。 反码是符号位为 1,其它位是原码取反。 补码是符号位为 1,其它位是原码取反,未位加 1。 输入一个 64bit 十进制整数,输出它的原码,反码,补码的 16 阅读全文
posted @ 2017-04-30 21:49 gongpixin 阅读(695) 评论(0) 推荐(0)
摘要: 1006: 小明与隔壁老王之间不得不说的故事 题目描述 有一天,小明想偷吃隔壁老王院子里苹果树上的苹果。 但是,老王家有一条哈士奇,每隔一定时间就会吼叫。准确的说,它会在一个时间点吼叫第一次,之后每隔一段时间吼叫两次,比如第一次吼叫是在 t 时刻,间隔为 s,则吼叫时间点为 t, t + s, t 阅读全文
posted @ 2017-04-30 21:48 gongpixin 阅读(741) 评论(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 阅读(301) 评论(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 阅读(304) 评论(0) 推荐(0)
摘要: 1003: 瑞神要考研 题目描述 瑞神要准备考研了,为了复习数据结构,瑞神在某宝上买了一本数据结构得考研辅导资料《考研数据结构 从入门到放弃》,从此瑞神开始了愉快的复(zhuang)习(bi)。 有一天,瑞神找了好多条链表来辅助自己复习,但是他在复习的过程中一不小心把链表掉在了地上,捡起来的时候链表 阅读全文
posted @ 2017-04-30 21:45 gongpixin 阅读(502) 评论(0) 推荐(0)
摘要: 1002: 小婷婷吃蘑菇 题目描述 小婷婷是个吃货, 有一天, 她来到了神奇的魔法谷, 这里有一条单行道路, 小婷婷为了吃到世界上最美味的食物,必须要穿过这条道路。 这是一个长度为 N 的魔法道路,小婷婷需要从 1 走到 N。每个单位长度上有一个蘑菇, 因为小婷婷是个大吃货, 所以她总是控制不住自己 阅读全文
posted @ 2017-04-30 21:44 gongpixin 阅读(504) 评论(0) 推荐(0)
摘要: 1001: 字符串“水”题 题目描述 给出一个长度为 n 的字符串(1<=n<=100000),求有多少个连续字串中所有的字母都出现了偶数次。 输入 第一行一个正整数 T,表示数据组数(1 <= T <= 10)。 接下来 T 行,每行有一个只包含小写字母的字符串。 输出 每个答案输出满足要求字符串 阅读全文
posted @ 2017-04-30 21:43 gongpixin 阅读(382) 评论(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 阅读(175) 评论(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 阅读(248) 评论(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 阅读(382) 评论(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 阅读(234) 评论(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 阅读(239) 评论(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 阅读(227) 评论(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 阅读(213) 评论(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 阅读(253) 评论(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 阅读(274) 评论(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 阅读(234) 评论(0) 推荐(0)
摘要: 1200: Choosy in Food Description Xiao Ming find n trees (labeled 0...n-1) which join a circle in a magical land. Each treeis covered with ripe berries 阅读全文
posted @ 2017-04-30 21:28 gongpixin 阅读(323) 评论(0) 推荐(0)
摘要: 1199: Little Red Riding Hood Description Once upon a time, there was a little girl. Her name was Little Red Riding Hood. One day, her grandma was ill. 阅读全文
posted @ 2017-04-30 21:27 gongpixin 阅读(208) 评论(0) 推荐(0)
摘要: 2023. Donald is a postman Time limit: 1.0 secondMemory limit: 64 MB Donald Duck works as a postman for the Walt Disney Studios. He delivers children’s 阅读全文
posted @ 2017-04-30 21:16 gongpixin 阅读(275) 评论(0) 推荐(0)
摘要: 2022. Riding a Toad Time limit: 1.0 secondMemory limit: 64 MB A tribe of leafmen live in the old forest. Leafmen are very tiny and fast, that’s why we 阅读全文
posted @ 2017-04-30 21:15 gongpixin 阅读(366) 评论(0) 推荐(0)
摘要: 2021. Scarily interesting! Time limit: 1.0 secondMemory limit: 64 MB This year at Monsters University it is decided to arrange Scare Games. At the Gam 阅读全文
posted @ 2017-04-30 21:14 gongpixin 阅读(366) 评论(0) 推荐(0)
摘要: 2020. Traffic Jam in Flower Town Time limit: 1.0 secondMemory limit: 64 MB Having returned from Sun City, Dunno told all his friends that every shorty 阅读全文
posted @ 2017-04-30 21:13 gongpixin 阅读(326) 评论(0) 推荐(0)
摘要: 2019. Pair: normal and paranormal Time limit: 1.0 secondMemory limit: 64 MB If you find yourself in Nevada at an abandoned nuclear range during Hallow 阅读全文
posted @ 2017-04-30 21:12 gongpixin 阅读(258) 评论(0) 推荐(0)
摘要: 2018. The Debut Album Time limit: 2.0 secondMemory limit: 64 MB Pop-group “Pink elephant” entered on recording their debut album. In fact they have on 阅读全文
posted @ 2017-04-30 21:11 gongpixin 阅读(497) 评论(0) 推荐(0)
摘要: 2017. Best of a bad lot Time limit: 1.0 secondMemory limit: 64 MB A cruise liner hasn’t moved away from the land even for three miles when it became a 阅读全文
posted @ 2017-04-30 21:10 gongpixin 阅读(249) 评论(0) 推荐(0)
摘要: 2016. Magic and Science Time limit: 1.0 secondMemory limit: 64 MB Scientists who specialize in witchcraft have recently discovered a new elementary pa 阅读全文
posted @ 2017-04-30 21:09 gongpixin 阅读(317) 评论(0) 推荐(0)
摘要: 2015. Zhenya moves from the dormitory Time limit: 1.0 secondMemory limit: 64 MB After moving from his parents’ place Zhenya has been living in the Uni 阅读全文
posted @ 2017-04-30 20:55 gongpixin 阅读(340) 评论(0) 推荐(0)
摘要: 2014. Zhenya moves from parents Time limit: 1.0 secondMemory limit: 64 MB Zhenya moved from his parents’ home to study in other city. He didn’t take a 阅读全文
posted @ 2017-04-30 20:54 gongpixin 阅读(221) 评论(0) 推荐(0)
摘要: 2013. Neither shaken nor stirred Time limit: 1.0 secondMemory limit: 64 MB The ACM ICPC regional contest in St. Petersburg is a stressful event even f 阅读全文
posted @ 2017-04-30 20:53 gongpixin 阅读(347) 评论(0) 推荐(0)
摘要: 2012. About Grisha N. Time limit: 1.0 secondMemory limit: 64 MB Grisha N. told his two teammates that he was going to solve all given problems at the 阅读全文
posted @ 2017-04-30 20:52 gongpixin 阅读(333) 评论(0) 推荐(0)
摘要: 昨天在敲一个数位DP的问题,但是用到了这个坑D的问题,找了半天错,还以为又是什么奇怪的算法,结果发现思路一致,然后自己各种YY修改,最后不得不和正确答案比对,但是最后发现标准答案和自己的想法几乎一模一样,最后一个函数一个函数替换比对,发现问题竟然出在了pow函数上。 其实很早之前再A题的时候就出现过 阅读全文
posted @ 2017-04-30 20:06 gongpixin 阅读(503) 评论(0) 推荐(0)