上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 16 下一页
摘要: Ivan is fond of collecting. Unlike other people who collect post stamps, coins or other material stuff, he collects software bugs. When Ivan gets a ne 阅读全文
posted @ 2017-11-06 21:09 阿波罗2003 阅读(191) 评论(0) 推荐(0) 编辑
摘要: You are given a connected weighted graph with n vertices and m edges. The graph doesn't contain loops nor multiple edges. Consider some edge with id i 阅读全文
posted @ 2017-11-05 10:20 阿波罗2003 阅读(483) 评论(0) 推荐(0) 编辑
摘要: Treeland is a country in which there are n towns connected by n - 1 two-way road such that it's possible to get from any town to any other town. In Tr 阅读全文
posted @ 2017-11-05 09:57 阿波罗2003 阅读(236) 评论(0) 推荐(0) 编辑
摘要: 题目描述 本题中,我们将用符号\lfloor c \rfloor⌊c⌋表示对c向下取整,例如:\lfloor 3.0 \rfloor= \lfloor 3.1 \rfloor=\lfloor 3.9 \rfloor=3⌊3.0⌋=⌊3.1⌋=⌊3.9⌋=3。 蛐蛐国最近蚯蚓成灾了!隔壁跳蚤国的跳蚤也 阅读全文
posted @ 2017-11-04 07:49 阿波罗2003 阅读(311) 评论(0) 推荐(0) 编辑
摘要: 题目描述 对于刚上大学的牛牛来说,他面临的第一个问题是如何根据实际情况申请合适的课程。 在可以选择的课程中,有 2n2n 节课程安排在 nn 个时间段上。在第 ii(1 \leq i \leq n1≤i≤n)个时间段上,两节内容相同的课程同时在不同的地点进行,其中,牛牛预先被安排在教室 c_ici​ 阅读全文
posted @ 2017-10-29 16:40 阿波罗2003 阅读(250) 评论(0) 推荐(0) 编辑
摘要: 题目传送门 传送点I 传送点II 题目大意 (此题目不需要大意,我认为它已经很简洁了) 题目传送门 传送点I 传送点II 题目大意 (此题目不需要大意,我认为它已经很简洁了) 显然线段树合并(我也不知道哪来这么多显然) 考虑将每条路径拆成两条路径 s -> lca 和 t -> lca 。 对于前一 阅读全文
posted @ 2017-10-29 10:54 阿波罗2003 阅读(246) 评论(0) 推荐(0) 编辑
摘要: 题目大意 给定A串,选择A串的前lB个字符作为B串,再在B串后增加一个字符,问最长的相等的A串前缀和B串的后缀。 Solution 1(KMP) 用1个奇怪的字符连接A串和B串,再用KMP求最长公共前后缀。 Solution 2(Hash) hash A串的前缀和B的后缀,然后for去比较,取最大的 阅读全文
posted @ 2017-10-28 17:07 阿波罗2003 阅读(256) 评论(0) 推荐(0) 编辑
摘要: Description 在光之大陆的土地上,各种势力盘根错节。来自光之峡谷的精灵,来自黑暗森林的亡灵,来自古老东方的人类共同生活在一起。善于打造装置的矮人,善于发明的侏儒,隐匿于山林的巨人也坚守着属于自己的领土。这些种族之间关系错综复杂,构成了极其庞大的关系网络。大魔法师小P想要研究其中的种族关系。 阅读全文
posted @ 2017-10-27 21:52 阿波罗2003 阅读(324) 评论(0) 推荐(0) 编辑
摘要: This is an interactive problem. You are given a sorted in increasing order singly linked list. You should find the minimum integer in the list which i 阅读全文
posted @ 2017-10-08 16:55 阿波罗2003 阅读(294) 评论(0) 推荐(0) 编辑
摘要: Adieu l'ami. Koyomi is helping Oshino, an acquaintance of his, to take care of an open space around the abandoned Eikou Cram School building, Oshino's 阅读全文
posted @ 2017-10-07 19:29 阿波罗2003 阅读(680) 评论(0) 推荐(1) 编辑
摘要: — This is not playing but duty as allies of justice, Nii-chan! — Not allies but justice itself, Onii-chan! With hands joined, go everywhere at a speed 阅读全文
posted @ 2017-10-07 19:04 阿波罗2003 阅读(427) 评论(0) 推荐(0) 编辑
摘要: Even if the world is full of counterfeits, I still regard it as wonderful. Pile up herbs and incense, and arise again from the flames and ashes of its 阅读全文
posted @ 2017-10-07 18:52 阿波罗2003 阅读(247) 评论(0) 推荐(0) 编辑
摘要: Rock... Paper! After Karen have found the deterministic winning (losing?) strategy for rock-paper-scissors, her brother, Koyomi, comes up with a new g 阅读全文
posted @ 2017-10-07 18:46 阿波罗2003 阅读(198) 评论(0) 推荐(0) 编辑
摘要: You are given n strings s1, s2, ..., sn consisting of characters 0 and 1. m operations are performed, on each of them you concatenate two existing str 阅读全文
posted @ 2017-10-06 20:32 阿波罗2003 阅读(422) 评论(0) 推荐(0) 编辑
摘要: Snark and Philip are preparing the problemset for the upcoming pre-qualification round for semi-quarter-finals. They have a bank of nproblems, and the 阅读全文
posted @ 2017-10-06 20:20 阿波罗2003 阅读(364) 评论(0) 推荐(0) 编辑
摘要: Have you ever tried to explain to the coordinator, why it is eight hours to the contest and not a single problem has been prepared yet? Misha had. And 阅读全文
posted @ 2017-10-06 19:36 阿波罗2003 阅读(205) 评论(0) 推荐(0) 编辑
摘要: As technologies develop, manufacturers are making the process of unlocking a phone as user-friendly as possible. To unlock its new phone, Arkady's pet 阅读全文
posted @ 2017-10-06 19:31 阿波罗2003 阅读(367) 评论(0) 推荐(0) 编辑
摘要: (Another) YYF is a couragous scout. Now he is on a dangerous mission which is to penetrate into the enemy's base. After overcoming a series difficulti 阅读全文
posted @ 2017-09-09 17:35 阿波罗2003 阅读(265) 评论(0) 推荐(0) 编辑
摘要: In this problem you will meet the simplified model of game Pudding Monsters. An important process in developing any game is creating levels. A game fi 阅读全文
posted @ 2017-09-09 16:10 阿波罗2003 阅读(521) 评论(0) 推荐(0) 编辑
摘要: Little boy Igor wants to become a traveller. At first, he decided to visit all the cities of his motherland — Uzhlyandia. It is widely known that Uzhl 阅读全文
posted @ 2017-08-26 21:24 阿波罗2003 阅读(182) 评论(0) 推荐(0) 编辑
摘要: Grigory loves strings. Recently he found a metal strip on a loft. The strip had length n and consisted of letters "V" and "K". Unfortunately, rust has 阅读全文
posted @ 2017-08-21 22:52 阿波罗2003 阅读(650) 评论(0) 推荐(0) 编辑
摘要: Leha plays a computer game, where is on each level is given a connected graph with n vertices and m edges. Graph can contain multiple edges, but can n 阅读全文
posted @ 2017-08-21 22:20 阿波罗2003 阅读(470) 评论(0) 推荐(0) 编辑
摘要: 给定n个正整数a1,a2,…,an,求 的值(答案模10^9+7)。 Input 第一行一个正整数n。 接下来n行,每行一个正整数,分别为a1,a2,…,an。 Output 仅一行答案。 Sample Input Sample Output Hint 1<=n<=10^5,1<=ai<=10^7。 阅读全文
posted @ 2017-08-16 22:51 阿波罗2003 阅读(201) 评论(0) 推荐(0) 编辑
摘要: Slastyona and her loyal dog Pushok are playing a meaningless game that is indeed very interesting. The game consists of multiple rounds. Its rules are 阅读全文
posted @ 2017-08-15 21:31 阿波罗2003 阅读(351) 评论(0) 推荐(0) 编辑
摘要: Winter is here at the North and the White Walkers are close. John Snow has an army consisting of n soldiers. While the rest of the world is fighting f 阅读全文
posted @ 2017-08-15 15:34 阿波罗2003 阅读(262) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 16 下一页