摘要: UNIX相关的起源 阅读全文
posted @ 2014-03-15 01:03 acvc 阅读(85) 评论(0) 推荐(0) 编辑
摘要: 转自:http://6221123.blog.51cto.com/6211123/1112619这里讲述的是基于JDK1.5的RMI程序搭建,更简单的说是一个 HelloWorld RMI。1. 这里是基于JDK1.5的,节省了繁琐的手工编译(生成桩和骨架)。不像1.4之前的RMI。2. 这里是把客户端和服务器端的两个程序,分布在两个独立的程序里面,而不是同一个package下面。是真正的分布式。3. 这里不过多阐述原理,这只是一个Hello World!!好,以下是步骤:1. 在Eclipse里面创建一个server 端的project。然后,创建一个接口,这个接口是你要向client端开放 阅读全文
posted @ 2014-03-14 16:38 acvc 阅读(362) 评论(0) 推荐(0) 编辑
摘要: A. Vanya and Cardstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVanya loves playing. He even has a special set of cards to play with. Each card has a single integer. The number on the card can be positive, negative and can even be equal to zero. 阅读全文
posted @ 2014-03-11 11:07 acvc 阅读(753) 评论(6) 推荐(0) 编辑
摘要: A. Inna and Choose Optionstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere always is something to choose from! And now, instead of "Noughts and Crosses", Inna choose a very unusual upgrade of this game. The rules of the game are giv 阅读全文
posted @ 2014-03-06 19:39 acvc 阅读(500) 评论(0) 推荐(0) 编辑
摘要: Phone ListTime Limit:1000MSMemory Limit:65536KTotal Submissions:20894Accepted:6532DescriptionGiven a list of phone numbers, determine if it is consistent in the sense that no number is the prefix of another. Let's say the phone catalogue listed these numbers:Emergency 911Alice 97 625 999Bob 91 1 阅读全文
posted @ 2014-03-05 20:47 acvc 阅读(176) 评论(0) 推荐(0) 编辑
摘要: D. Counting Rectangles is Funtime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere is ann × mrectangular grid, each cell of the grid contains a single integer: zero or one. Let's call the cell on thei-th row and thej-th column as(i, j).L 阅读全文
posted @ 2014-03-04 21:50 acvc 阅读(341) 评论(0) 推荐(0) 编辑
摘要: Let's assume thatv(n)is the largest prime number, that does not exceedn;u(n)is the smallest prime number strictly greater thann.Find.InputThe first line contains integert(1 ≤ t ≤ 500)— the number of testscases.Each of the followingtlines of the input contains integern(2 ≤ n ≤ 109).OutputPrinttli 阅读全文
posted @ 2014-02-27 14:07 acvc 阅读(249) 评论(0) 推荐(0) 编辑
摘要: C. On Number of Decompositions into Multiplierstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an integermas a product of integersa1, a2, ...an. Your task is to find the number of distinct decompositions of numberminto the product of 阅读全文
posted @ 2014-02-27 14:02 acvc 阅读(249) 评论(0) 推荐(0) 编辑
摘要: 题目描述撸呀撸很迷茫,因为他的左手总是不受控制,做一些不雅的事情。于是撸呀撸一狠心,决定戒撸。没想到,他的左手受不了寂寞,一闲下来就在键盘上各种乱敲。唔,神奇的左手表示,safasfasaafafsfafasffsfsfsffsfddfafdfsfadffafadfafadfadfafadfsfa……他发现敲出来的字符串有一定规律:如果将字符串划分成若干部分,那么每部分都可由其子串重复若干次得到。“若干次”往往大于1,但也可以为1。小撸想请你算一算:用最优的方法划分字符串,然后将各部分替换成其最短的连续重复子串,得到的字符串的最小长度是多少?输入格式一行字符,都是英文小写字母。输出格式一个正整 阅读全文
posted @ 2014-02-08 13:26 acvc 阅读(5227) 评论(0) 推荐(0) 编辑
摘要: hdu 3336题意:输入一个字符串求每个前缀在串中出现的次数和sol:只要稍微理解下next 数组的含义就知道只要把每个有意义的next值得个数加起来即可PS:网上有dp解法orz,dp[i]表示以i为前缀串结尾的前缀串的总和,方程很容易写出//字符串上KMP(水)//从前向后扫,失配函数的位置就... 阅读全文
posted @ 2014-02-06 22:15 acvc 阅读(1605) 评论(0) 推荐(0) 编辑