随笔分类 -  ACM

上一页 1 2

ACM题解
hdu1711Number Sequence
摘要:Problem DescriptionGiven two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 #include#include#includeusing namespac... 阅读全文

posted @ 2015-04-07 15:33 wos1239 阅读(93) 评论(0) 推荐(0)

hdu1358Period
摘要:Problem DescriptionFor each prefix of a given string S with N characters (each character has an ASCII code between 97 and 126, inclusive), we want to ... 阅读全文

posted @ 2015-04-07 12:51 wos1239 阅读(99) 评论(0) 推荐(0)

poj2752Seek the Name, Seek the Fame
摘要:DescriptionThe little cat is so famous, that many couples tramp over hill and dale to Byteland, and asked the little cat to give names to their newly-... 阅读全文

posted @ 2015-04-03 11:11 wos1239 阅读(93) 评论(0) 推荐(0)

poj3461Oulipo
摘要:DescriptionThe French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo group.... 阅读全文

posted @ 2015-04-03 00:30 wos1239 阅读(78) 评论(0) 推荐(0)

hdu1004Let the Balloon Rise
摘要:Problem DescriptionContest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guess... 阅读全文

posted @ 2015-04-02 16:38 wos1239 阅读(112) 评论(0) 推荐(0)

hdu1251统计难题
摘要:Problem DescriptionIgnatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀).Input输入数据的第一部分是一张单词表,每行一个单词,单词的长度不超过10,它们代表的是老... 阅读全文

posted @ 2015-04-02 16:37 wos1239 阅读(114) 评论(0) 推荐(0)

codevs1304 拓扑序计数
摘要:题目描述 Description求一颗有根树/树形图的拓扑序个数.输入描述 Input Description第一行一个n和一个素数P,表示这颗树有n个节点,要求拓扑序个数modP之后的结果.接下来n-1行,每行有两个数字x和y,表示x是y的父亲.保证1#include#includeusing n... 阅读全文

posted @ 2015-03-27 18:59 wos1239 阅读(615) 评论(0) 推荐(0)

codevs1387
摘要:题目描述 Description一块N x N(1#include#include#includeusing namespace std;char s1[20][20];char s2[20][20];char s3[20][20];char s4[20][20];int main(){ in... 阅读全文

posted @ 2015-03-27 18:57 wos1239 阅读(123) 评论(0) 推荐(0)

codevs1141 数列
摘要:题目描述 Description给定一个正整数k(3≤k≤15),把所有k的方幂及所有有限个互不相等的k的方幂之和构成一个递增的序列,例如,当k=3时,这个序列是:1,3,4,9,10,12,13,…(该序列实际上就是:30,31,30+31,32,30+32,31+32,30+31+32,…)请你... 阅读全文

posted @ 2015-03-26 12:20 wos1239 阅读(197) 评论(0) 推荐(0)

codevs1145
摘要:题目描述 Description给定A、B、C三根足够长的细柱,在A柱上放有2n个中间有孔的圆盘,共有n个不同的尺寸,每个尺寸都有两个相同的圆盘,注意这两个圆盘是不加区分的(下图为n=3的情形)。现要将这些圆盘移到C柱上,在移动过程中可放在B柱上暂存。要求:(1)每次只能移动一个圆盘;(2)A、B、... 阅读全文

posted @ 2015-03-25 22:06 wos1239 阅读(320) 评论(0) 推荐(0)

codevs1127
摘要:学校里有一个水房,水房里一共装有m个龙头可供同学们打开水,每个龙头每秒钟的供水量相等,均为1。现在有n名同学准备接水,他们的初始接水顺序已经确定。将这些同学按接水顺序从1到n编号,i号同学的接水量为wi。接水开始时,1到m号同学各占一个水龙头,并同时打开水龙头接水。当其中某名同学j完成其接水量要求w... 阅读全文

posted @ 2015-03-25 21:41 wos1239 阅读(161) 评论(0) 推荐(0)

codevs1041
摘要:codevs 1041又到暑假了,住在城市A的Car想和朋友一起去城市B旅游。她知道每个城市都有四个飞机场,分别位于一个矩形的四个顶点上,同一个城市中两个机场之间有一条笔直的高速铁路,第I个城市中高速铁路了的单位里程价格为Ti,任意两个不同城市的机场之间均有航线,所有航线单位里程的价格均为t。那么C... 阅读全文

posted @ 2015-03-25 16:05 wos1239 阅读(199) 评论(0) 推荐(0)

上一页 1 2

导航