摘要: A 魔法部落 小Biu所在的部落是一个魔法部落,部落中一共有n+1个人,小Biu是魔法部落中最菜的,所以他的魔力值为1,魔法部落中n个人的魔法值都不相同,第一个人的魔法值是小Biu的3倍,第二个人的魔法值是第一个人的3倍,以此类推。 现在小Biu想知道整个部落的魔法值和是多少?由于答案比较大,请把答 阅读全文
posted @ 2019-10-26 21:26 liyexin 阅读(264) 评论(0) 推荐(1)
摘要: HDU - 3018 Ant Country consist of N towns.There are M roads connecting the towns. Ant Tony,together with his friends,wants to go through every part of 阅读全文
posted @ 2019-10-19 19:13 liyexin 阅读(148) 评论(0) 推荐(0)
摘要: https://codeforces.com/contest/1236/problem/B Alice got many presents these days. So she decided to pack them into boxes and send them to her friends. 阅读全文
posted @ 2019-10-19 15:04 liyexin 阅读(299) 评论(0) 推荐(0)
摘要: HDU1003 Problem Description Given a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,- 阅读全文
posted @ 2019-10-17 17:09 liyexin 阅读(451) 评论(0) 推荐(0)
摘要: B - Resort CodeForces - 350B B. Resort time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output V 阅读全文
posted @ 2019-10-12 21:06 liyexin 阅读(214) 评论(0) 推荐(0)
摘要: https://codeforces.com/problemset/problem/797/B time limit per test 1 second memory limit per test 256 megabytes input standard input output standard 阅读全文
posted @ 2019-09-27 20:54 liyexin 阅读(444) 评论(0) 推荐(0)
摘要: 地址:http://acm.hdu.edu.cn/showproblem.php?pid=2072 lily的好朋友xiaoou333最近很空,他想了一件没有什么意义的事情,就是统计一篇文章里不同单词的总数。下面你的任务是帮助xiaoou333解决这个问题。 Input 有多组数据,每组一行,每组就 阅读全文
posted @ 2019-09-27 16:55 liyexin 阅读(215) 评论(0) 推荐(0)
摘要: Ignatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀). Input输入数据的第一部分是一张单词表,每行一个单词,单词的长度不超过10,它们代表的是老师交给Ignatius统计的单词,一 阅读全文
posted @ 2019-09-25 20:52 liyexin 阅读(158) 评论(0) 推荐(0)
摘要: 地址:https://www.luogu.org/problem/P3370 求不同字符串的数量 这题用set也可以过,但是hash更高大上嘛。 哈希其实就是将一个字符串映射成一个值,并且要让这些值不能大概率地重复 进制哈希:进制哈希的核心便是给出一个固定进制base,将一个串的每一个元素看做一个进 阅读全文
posted @ 2019-09-25 11:07 liyexin 阅读(316) 评论(0) 推荐(0)
摘要: Task schedule 地址:http://acm.hdu.edu.cn/showproblem.php?pid=4907 Problem Description 有一台机器,并且给你这台机器的工作表,工作表上有n个任务,机器在ti时间执行第i个任务,1秒即可完成1个任务。有m个询问,每个询问有 阅读全文
posted @ 2019-09-24 20:35 liyexin 阅读(210) 评论(0) 推荐(0)