04 2016 档案
HDOJ(HDU) 2103 Family planning(需要注意范围)
摘要:Problem Description As far as we known,there are so many people in this world,expecially in china.But many people like LJ always insist on th... 阅读全文
posted @ 2016-04-30 16:10 cnxo 阅读(145) 评论(0) 推荐(0)
HDOJ(HDU) 2097 Sky数(进制)
摘要:Problem Description Sky从小喜欢奇特的东西,而且天生对数字特别敏感,一次偶然的机会,他发现了一个有趣的四位数2992,这个数,它的十进制数表示,其四位数字之和为2+9+9+2=22,它的十六进制数BB0,其四位数字之和也为22,同时它的十二进制数表示1894,... 阅读全文
posted @ 2016-04-30 15:21 cnxo 阅读(131) 评论(0) 推荐(0)
HDOJ(HDU) 2093 考试排名(Arrays.sort排序、类的应用)
摘要:Problem Description C++编程考试使用的实时提交系统,具有即时获得成绩排名的特点。它的功能是怎么实现的呢? 我们做好了题目的解答,提交之后,要么“AC”,要么错误,不管怎样错法,总是给你记上一笔,表明你曾经有过一次错误提交,因而当你一旦提交该题“AC”后,就要与... 阅读全文
posted @ 2016-04-30 14:57 cnxo 阅读(264) 评论(0) 推荐(0)
HDOJ(HDU) 2091 空心三角形
摘要:Problem Description 把一个字符三角形掏空,就能节省材料成本,减轻重量,但关键是为了追求另一种视觉效果。在设计的过程中,需要给出各种花纹的材料和大小尺寸的三角形样板,通过电脑临时做出来,以便看看效果。Input 每行包含一个字符和一个整数n(0Sample Out... 阅读全文
posted @ 2016-04-30 14:01 cnxo 阅读(109) 评论(0) 推荐(0)
HDOJ(HDU) 2090 算菜价(简单水题、)
摘要:Problem Description 妈妈每天都要出去买菜,但是回来后,兜里的钱也懒得数一数,到底花了多少钱真是一笔糊涂帐。现在好了,作为好儿子(女儿)的你可以给她用程序算一下了,呵呵。Input 输入含有一些数据组,每组数据包括菜种(字串),数量(计量单位不论,一律为doubl... 阅读全文
posted @ 2016-04-29 21:56 cnxo 阅读(193) 评论(0) 推荐(0)
HDOJ(HDU) 2088 Box of Bricks(平均值)
摘要:Problem Description Little Bob likes playing with his box of bricks. He puts the bricks one upon another and builds stacks of different heigh... 阅读全文
posted @ 2016-04-29 21:41 cnxo 阅读(199) 评论(0) 推荐(0)
HDOJ(HDU) 2083 简易版之最短距离(中位数)
摘要:Problem Description 寒假的时候,ACBOY要去拜访很多朋友,恰巧他所有朋友的家都处在坐标平面的X轴上。ACBOY可以任意选择一个朋友的家开始访问,但是每次访问后他都必须回到出发点,然后才能去访问下一个朋友。 比如有4个朋友,对应的X轴坐标分别为1, 2, 3, ... 阅读全文
posted @ 2016-04-29 21:29 cnxo 阅读(217) 评论(0) 推荐(0)
Java---文件的切割与合并,已经实现图形界面(工具)
摘要:实现对任意文件的切割,实现对切割后的文件的合并。上次只写了特定目录下的文件切割与合并,有点遗憾, 这次,我写了一个图形界面来实现对文件的切割与合并。文件切割: 用户可以自己选择需要切割的文件, 软件会自动将切割后的文件全部放入这目录下的一个新文件夹当中去的。 每分割一个新的文件,它... 阅读全文
posted @ 2016-04-29 15:15 cnxo 阅读(360) 评论(0) 推荐(0)
Java---常用基础面试知识点
摘要:综合网上的一点资源,给大家整理了一些Java常用的基础面试知识点,希望能帮助到刚开始学习或正在学习的学员。1、抽象抽象就是忽略一个主题中与当前目标无关的那些方面,以便更充分地注意与当前目标有关的方面。抽象并不打算了解全部问题,而只是选择其中的一部分,暂时不用部分细节。抽象包括两个方... 阅读全文
posted @ 2016-04-28 20:47 cnxo 阅读(164) 评论(0) 推荐(0)
Java---练习(面试题) :字符串截取(2-最终版)
摘要:在java中,字符串“abcd”与字符串“ab你好”的长度是一样,都是四个字符。 但对应的字节数不同,一个汉字占两个字节。 定义一个方法,按照指定的字节数来取子串。 如:对于“ab你好”,如果取三个字节,那么子串就是ab与“你”字的半个,那么半个就要舍弃。如果取四个字节就是“... 阅读全文
posted @ 2016-04-28 13:49 cnxo 阅读(209) 评论(0) 推荐(0)
Java---IO加强(3)-IO流的操作规律
摘要:一般写关于操作文件的读取的几个通用步骤!!! 1、明确源和目的。源:InputStream Reader 一定是被读取的。 目的:OutputStream Writer 一定是被写入的。2、处理的数据是否是纯文本的数据?是:使用字符流。Reader Writer 否:使用字节... 阅读全文
posted @ 2016-04-28 13:05 cnxo 阅读(171) 评论(0) 推荐(0)
HDOJ(HDU) 2078 复习时间
摘要:Problem Description 为了能过个好年,xhd开始复习了,于是每天晚上背着书往教室跑。xhd复习有个习惯,在复习完一门课后,他总是挑一门更简单的课进行复习,而他复习这门课的效率为两门课的难度差的平方,而复习第一门课的效率为100和这门课的难度差的平方。xhd这学期选... 阅读全文
posted @ 2016-04-27 17:51 cnxo 阅读(221) 评论(0) 推荐(0)
Java---练习:文件切割与合并(1)
摘要:实现对大文件的切割与合并。 按指定个数切(如把一个文件切成10份)或按指定大小切(如每份最大不超过10M),这两种方式都可以。示例程序说明: 文件切割:把一个文件切割成多个碎片,每个碎片的大小不超过1M。自己可把功能进一步扩展:切割前的文件名、长度,切割后的碎片个数、文件名等信息可... 阅读全文
posted @ 2016-04-27 11:32 cnxo 阅读(546) 评论(0) 推荐(0)
Java---练习(面试题) :字符串截取(1)
摘要:在java中,字符串“abcd”与字符串“ab你好”的长度是一样,都是四个字符。 但对应的字节数不同,一个汉字占两个字节。 定义一个方法,按照指定的字节数来取子串。 如:对于“ab你好”,如果取三个字节,那么子串就是ab与“你”字的半个,那么半个就要舍弃。如果取四个字节就是“ab你... 阅读全文
posted @ 2016-04-27 00:07 cnxo 阅读(237) 评论(0) 推荐(0)
Java---IO加强(2)
摘要:转换流★转换流功能1:充当字节流与字符流之间的桥梁需求:模拟英文聊天程序,要求: (1) 从键盘录入英文字符,每录一行就把它转成大写输出到控制台; (2) 保存聊天记录到字节流文件。要求1的设计分析:1)需要从键盘接收录入,得用System.in,它是字节输入流... 阅读全文
posted @ 2016-04-26 00:38 cnxo 阅读(166) 评论(0) 推荐(0)
ACM中Java的应用
摘要:先说一下Java对于ACM的一些优点吧: (1) 对于熟悉C/C++的程序员来说Java 并不难学,两周时间基本可以搞定一般的编程,再用些时间了解一下Java库就行了。Java的语法和C++非常类似,可以说是C++的升级版,只是更加强调面向对象思想而已。(个人见解。。。)(2) 在... 阅读全文
posted @ 2016-04-25 23:31 cnxo 阅读(227) 评论(0) 推荐(0)
UVa 11729 - Commando War(贪心)
摘要:“Waiting for orders we held in the wood, word from the front never came By evening the sound of the gunfire was miles away Ah softly we moved... 阅读全文
posted @ 2016-04-25 17:34 cnxo 阅读(159) 评论(0) 推荐(0)
UVa 11292 - Dragon of Loowater(排序贪心)
摘要:Once upon a time, in the Kingdom of Loowater, a minor nuisance turned into a major problem.The shores of Rellau Creek in central Loowater had... 阅读全文
posted @ 2016-04-24 23:41 cnxo 阅读(110) 评论(0) 推荐(0)
ZOJ(ZJU) 1002 Fire Net(深搜)
摘要:Suppose that we have a square city with straight streets. A map of a city is a square board with n rows and n columns, each representing a st... 阅读全文
posted @ 2016-04-23 05:40 cnxo 阅读(115) 评论(0) 推荐(0)
HDOJ(HDU) 2061 Treasure the new start, freshmen!(水题、)
摘要:Problem Description background: A new semester comes , and the HDU also meets its 50th birthday. No matter what’s your major, the only thing ... 阅读全文
posted @ 2016-04-23 00:01 cnxo 阅读(148) 评论(0) 推荐(0)
HDOJ(HDU) 2060 Snooker(英语很重要。。。)
摘要:Problem Description background: Philip likes to play the QQ game of Snooker when he wants a relax, though he was just a little vegetable-bird... 阅读全文
posted @ 2016-04-22 23:38 cnxo 阅读(297) 评论(0) 推荐(0)
HDOJ(HDU) 1994 利息计算(简单题目)
摘要:Problem Description 为自行解决学费,chx勤工俭学收入10000元以1年定期存入银行,年利率为3.7% 。利率 按年计算,表示100元存1年的利息为3.7元.实际上有时提前有时推迟取,因此实际利息按天 计算,1年按365天计算,因此Q天的利息是 本金*3.7/1... 阅读全文
posted @ 2016-04-22 23:13 cnxo 阅读(318) 评论(0) 推荐(0)
HDOJ(HDU) 1985 Conversions(汇率转换)
摘要:Problem Description Conversion between the metric and English measurement systems is relatively simple. Often, it involves either multiplying... 阅读全文
posted @ 2016-04-22 22:47 cnxo 阅读(202) 评论(0) 推荐(0)
HDOJ(HDU) 1977 Consecutive sum II(推导、、)
摘要:Problem Description Consecutive sum come again. Are you ready? Go ~~ 1 = 0 + 1 2+3+4 = 1 + 8 5+6+7+8+9 = 8 + 27 … You can see the cons... 阅读全文
posted @ 2016-04-22 22:10 cnxo 阅读(126) 评论(0) 推荐(0)
HDOJ(HDU) 1976 Software Version(简单判断)
摘要:Problem Description 相信大家一定有过在网上下载软件而碰到多个不同版本的情况。一般来说,软件的版本号由三个部分组成,主版本号(Major Version Number),子版本号(Minor Version Number)和修订号(Revision_Number)... 阅读全文
posted @ 2016-04-22 21:19 cnxo 阅读(214) 评论(0) 推荐(0)
HDOJ(HDU) 1898 Sempr == The Best Problem Solver?(水题、、、)
摘要:Problem Description As is known to all, Sempr(Liangjing Wang) had solved more than 1400 problems on POJ, but nobody know the days and nights ... 阅读全文
posted @ 2016-04-22 21:06 cnxo 阅读(162) 评论(0) 推荐(0)
HDOJ(HDU) 1877 又一版 A+B(进制、、)
摘要:Problem Description 输入两个不超过整型定义的非负10进制整数A和B(<=231-1),输出A+B的m (1 < m <10)进制数。Input 输入格式:测试输入包含若干测试用例。每个测试用例占一行,给出m和A,B的值。 当m为0时输入结束。Output 输出格... 阅读全文
posted @ 2016-04-22 20:44 cnxo 阅读(160) 评论(0) 推荐(0)
HDOJ(HDU) 1862 EXCEL排序(类对象的快排)
摘要:Problem Description Excel可以对一组纪录按任意指定列排序。现请你编写程序实现类似功能。Input 测试输入包含若干测试用例。每个测试用例的第1行包含两个整数 N ( c)根据指定比较器产生的顺序对指定对象数组进行排序。数组中的所有元素都必须是通过指定比较器可... 阅读全文
posted @ 2016-04-22 20:32 cnxo 阅读(236) 评论(0) 推荐(0)
C语言---递归反向输出任意长度的字符串
摘要:(该字符串可以包含空格和回车!) 【题目要求】 编写一个递归函数,实现将输入的任意长度的字符串反向输出的功能。 例如输入字符串:ABCD,输出字符串:DCBA。【题目分析】 应用递归的思想有时可以很轻松地解决一些看似不太容易实现的功能。 本题就是利用递归方法... 阅读全文
posted @ 2016-04-22 19:02 cnxo 阅读(3597) 评论(0) 推荐(0)
HDOJ(HDU) 1860 统计字符
摘要:Problem Description 统计一个给定字符串中指定的字符出现的次数Input 测试输入包含若干测试用例,每个测试用例包含2行,第1行为一个长度不超过5的字符串,第2行为一个长度不超过80的字符串。注意这里的字符串包含空格,即空格也可能是要求被统计的字符之一。当读到’#... 阅读全文
posted @ 2016-04-22 15:35 cnxo 阅读(232) 评论(0) 推荐(0)
HDOJ(HDU) 1859 最小长方形(水题、、)
摘要:Problem Description 给定一系列2维平面点的坐标(x, y),其中x和y均为整数,要求用一个最小的长方形框将所有点框在内。长方形框的边分别平行于x和y坐标轴,点落在边上也算是被框在内。Input 测试输入包含若干测试用例,每个测试用例由一系列坐标组成,每对坐标占一... 阅读全文
posted @ 2016-04-22 15:20 cnxo 阅读(288) 评论(0) 推荐(0)
Java---IO加强(1)
摘要:RandomAccessFile★随机访问文件,自身具备读写的方法。new RandomAccessFile()之后,若文件不存在会自动创建,存在则不创建。——该类其实内部既封装了字节输入流,又封装了字节输出流。 该类若用write()方法写整数,每次只写它的最后一个字节。而采用w... 阅读全文
posted @ 2016-04-22 12:35 cnxo 阅读(235) 评论(0) 推荐(0)
Java---多线程之死锁
摘要:★ 死锁的两种情况:简单的说下单块cpu运行多线程的情况:大家可能平时玩电脑,可以同时挂QQ啊,玩游戏啊,打开文本啊,等等。这里,我们假设是单块cpu。也就是俗称的单核cpu。 大家可能会觉得这些软件,这些线程是同时运行的, 其实不然,其实在任何一种情况下,电脑都只运行一个线程! ... 阅读全文
posted @ 2016-04-22 11:16 cnxo 阅读(173) 评论(0) 推荐(0)
HDOJ(HDU) 1799 循环多少次?(另类杨辉三角)
摘要:Problem Description 我们知道,在编程中,我们时常需要考虑到时间复杂度,特别是对于循环的部分。例如, 如果代码中出现 for(i=1;i0){ int m =sc.nextInt(); int n = sc.next... 阅读全文
posted @ 2016-04-22 02:08 cnxo 阅读(144) 评论(0) 推荐(0)
HDOJ(HDU) 1785 You Are All Excellent(角度运算)
摘要:Problem Description 本次集训队共有30多人参加,毫无疑问,你们都是很优秀的,但是由于参赛名额有限,只能选拔部分队员参加省赛。从学校的角度,总是希望选拔出最优秀的18人组成6支队伍来代表学校。但是,大家也知道,要想做到完全客观,是一件很难的事情。因为选拔的标准本身... 阅读全文
posted @ 2016-04-22 01:25 cnxo 阅读(172) 评论(0) 推荐(0)
HDOJ(HDU) 1720 A+B Coming(进制)
摘要:Problem Description Many classmates said to me that A+B is must needs. If you can’t AC this problem, you would invite me for night meal. ^_^I... 阅读全文
posted @ 2016-04-22 00:41 cnxo 阅读(199) 评论(0) 推荐(0)
HDOJ(HDU) 1718 Rank(水题、、、)
摘要:Problem Description Jackson wants to know his rank in the class. The professor has posted a list of student numbers and marks. Compute Jackso... 阅读全文
posted @ 2016-04-22 00:36 cnxo 阅读(172) 评论(0) 推荐(0)
Java---多线程的加强(1)
摘要:简单应用:首先来看一个简单的例子: 两个线程,分别实现对1-100内的奇数,偶数的输出。第一种方法:通过接口MyRun类:package thread.hello;/** * 通过实现Runnable接口来实现多线程 * @author 陈浩翔 * * @version 1.0 ... 阅读全文
posted @ 2016-04-21 13:15 cnxo 阅读(210) 评论(0) 推荐(0)
HDOJ(HDU) 1708 Fibonacci String
摘要:Problem Description After little Jim learned Fibonacci Number in the class , he was very interest in it. Now he is thinking about a new thing... 阅读全文
posted @ 2016-04-21 12:37 cnxo 阅读(244) 评论(0) 推荐(0)
Java-单机版的书店管理系统(练习设计模块和思想_系列汇总)
摘要:介绍:本软件系列到此,我已经全部写完了。项目练习目标 :1、Java应用程序基本分析 2、培养面向对象编程的基本思想 3、Java基本设计模式综合应用 4、掌握分层和接口的基本设计 5、构建合理的Java应用程序包结构 6、综合应用JSE所学习的知识 7、在应用中合理使... 阅读全文
posted @ 2016-04-20 17:26 cnxo 阅读(464) 评论(0) 推荐(0)
HDOJ(HDU) 1678 Shopaholic
摘要:Problem Description Lindsay is a shopaholic. Whenever there is a discount of the kind where you can buy three items and only pay for two, she... 阅读全文
posted @ 2016-04-20 01:43 cnxo 阅读(141) 评论(0) 推荐(0)
HDOJ(HDU) 1673 Optimal Parking
摘要:Problem Description When shopping on Long Street, Michael usually parks his car at some random location, and then walks to the stores he need... 阅读全文
posted @ 2016-04-20 01:17 cnxo 阅读(149) 评论(0) 推荐(0)
HDOJ(HDU) 1587 Flowers(水、、)
摘要:Problem Description As you know, Gardon trid hard for his love-letter, and now he’s spending too much time on choosing flowers for Angel. Whe... 阅读全文
posted @ 2016-04-20 01:00 cnxo 阅读(125) 评论(0) 推荐(0)
Java-单机版的书店管理系统(练习设计模块和思想_系列 八 )
摘要:本系列前面博客的链接:Java-单机版的书店管理系统(练习设计模块和思想_系列 七 ) http://blog.csdn.net/qq_26525215/article/details/51190696Java-单机版的书店管理系统(练习设计模块和思想_系列 六 ) http:/... 阅读全文
posted @ 2016-04-20 00:46 cnxo 阅读(208) 评论(0) 推荐(0)
各种计算机语言的经典书籍(C/C++/Java/C#/VC/VB等)
摘要:1、JavaJava编程语言(第三版)—Java四大名著—-James Gosling(Java之父)Java编程思想(第2版)—-Java四大名著—-Bruce EckelJava编程思想(第3版)—-Java四大名著—————-Bruce EckelJAVA 2核心技术 卷I:... 阅读全文
posted @ 2016-04-19 17:11 cnxo 阅读(382) 评论(0) 推荐(0)
HDOJ(HDU) 1570 A C
摘要:Problem Description Are you excited when you see the title “AC” ? If the answer is YES , AC it ; You must learn these two combination formula... 阅读全文
posted @ 2016-04-19 16:54 cnxo 阅读(153) 评论(0) 推荐(0)
HDOJ(HDU) 1563 Find your present!(异或)
摘要:Problem Description In the new year party, everybody will get a “special present”.Now it’s your turn to get your special present, a lot of pr... 阅读全文
posted @ 2016-04-19 16:36 cnxo 阅读(133) 评论(0) 推荐(0)
Java-单机版的书店管理系统(练习设计模块和思想_系列 七 )
摘要:本系列前面博客的链接:Java-单机版的书店管理系统(练习设计模块和思想_系列 六 ) http://blog.csdn.net/qq_26525215/article/details/51169277Java-单机版的书店管理系统(练习设计模块和思想_系列 五 ) http:/... 阅读全文
posted @ 2016-04-19 15:09 cnxo 阅读(201) 评论(0) 推荐(0)
HDOJ(HDU) 1562 Guess the number(水题,枚举就行)
摘要:Problem Description Happy new year to everybody! Now, I want you to guess a minimum number x betwwn 1000 and 9999 to let (1) x % a = 0; (2) ... 阅读全文
posted @ 2016-04-18 01:21 cnxo 阅读(196) 评论(0) 推荐(0)
HDOJ(HDU) 1555 How many days?(水题)
摘要:Problem Description 8600的手机每天消费1元,每消费K元就可以获赠1元,一开始8600有M元,问最多可以用多少天?Input 输入包括多个测试实例.每个测试实例包括2个整数M, k,(2 0){ m--; ... 阅读全文
posted @ 2016-04-18 00:54 cnxo 阅读(145) 评论(0) 推荐(0)
HDOJ(HDU) 1491 Octorber 21st
摘要:Problem Description HDU’s 50th birthday, on Octorber 21st, is coming. What an exciting day!! As a student of HDU, I always want to know how m... 阅读全文
posted @ 2016-04-18 00:47 cnxo 阅读(143) 评论(0) 推荐(0)
HDOJ(HDU) 1465 不容易系列之一(错排)
摘要:Problem Description 大家常常感慨,要做好一件事情真的不容易,确实,失败比成功容易多了! 做好“一件”事情尚且不易,若想永远成功而总从不失败,那更是难上加难了,就像花钱总是比挣钱容易的道理一样。 话虽这样说,我还是要告诉大家,要想失败到一定程度也是不容易的。比如,... 阅读全文
posted @ 2016-04-18 00:12 cnxo 阅读(131) 评论(0) 推荐(0)
HDOJ 1420 Prepared for New Acmer(DP)
摘要:Problem Description 集训进行了将近2个礼拜,这段时间以恢复性训练为主,我一直在密切关注大家的训练情况,目前为止,对大家的表现相当满意,首先是绝大部分队员的训练积极性很高,其次,都很遵守集训纪律,最后,老队员也起到了很好的带头作用,这里特别感谢为这次DP专题练习赛... 阅读全文
posted @ 2016-04-16 18:23 cnxo 阅读(125) 评论(0) 推荐(0)
HDOJ 1418 抱歉(欧拉公式)
摘要:Problem Description 非常抱歉,本来兴冲冲地搞一场练习赛,由于我准备不足,出现很多数据的错误,现在这里换一个简单的题目:前几天在网上查找ACM资料的时候,看到一个中学的奥数题目,就是不相交的曲线段分割平面的问题,我已经发到论坛,并且lxj 已经得到一个结论,这里就... 阅读全文
posted @ 2016-04-16 18:09 cnxo 阅读(156) 评论(0) 推荐(0)
Java-单机版的书店管理系统(练习设计模块和思想_系列 六 )
摘要:本系列前面博客的链接:Java-单机版的书店管理系统(练习设计模块和思想_系列 五 ) http://blog.csdn.net/qq_26525215/article/details/51136848Java-单机版的书店管理系统(练习设计模块和思想_系列 四(2) ): ht... 阅读全文
posted @ 2016-04-16 17:48 cnxo 阅读(280) 评论(0) 推荐(0)
HDOJ(HDU) 1408 盐水的故事
摘要:Problem Description 挂盐水的时候,如果滴起来有规律,先是滴一滴,停一下;然后滴二滴,停一下;再滴三滴,停一下…,现在有一个问题:这瓶盐水一共有VUL毫升,每一滴是D毫升,每一滴的速度是一秒(假设最后一滴不到D毫升,则花费的时间也算一秒),停一下的时间也是一秒这瓶... 阅读全文
posted @ 2016-04-13 12:28 cnxo 阅读(120) 评论(0) 推荐(0)
HDOJ(HDU) 1407 测试你是否和LTC水平一样高(暴力)
摘要:Problem Description 大家提到LTC都佩服的不行,不过,如果竞赛只有这一个题目,我敢保证你和他绝对在一个水平线上! 你的任务是: 计算方程x^2+y^2+z^2= num的一个正整数解。Input 输入数据包含多个测试实例,每个实例占一行,仅仅包含一个小于等于10... 阅读全文
posted @ 2016-04-13 11:53 cnxo 阅读(146) 评论(0) 推荐(0)
HDOJ(HDU) 1406 完数
摘要:Problem Description 完数的定义:如果一个大于1的正整数的所有因子之和等于它的本身,则称这个数是完数,比如6,28都是完数:6=1+2+3;28=1+2+4+7+14。本题的任务是判断两个正整数之间完数的个数。Input 输入数据包含多行,第一行是一个正整数n,表... 阅读全文
posted @ 2016-04-13 11:10 cnxo 阅读(145) 评论(0) 推荐(0)
HDOJ 1405 The Last Practice
摘要:Problem Description Tomorrow is contest day, Are you all ready? We have been training for 45 days, and all guys must be tired.But , you are s... 阅读全文
posted @ 2016-04-13 10:25 cnxo 阅读(129) 评论(0) 推荐(0)
Java-单机版的书店管理系统(练习设计模块和思想_系列 五 )
摘要:本系列前面博客的链接:Java-单机版的书店管理系统(练习设计模块和思想_系列 四(2) ): http://blog.csdn.net/qq_26525215/article/details/51117135Java-单机版的书店管理系统(练习设计模块和思想_系列 四(1) ):... 阅读全文
posted @ 2016-04-12 20:54 cnxo 阅读(197) 评论(0) 推荐(0)
HDOJ 1397 Goldbach's Conjecture(快速筛选素数法)
摘要:Problem Description Goldbach’s Conjecture: For any even number n greater than or equal to 4, there exists at least one pair of prime numbers ... 阅读全文
posted @ 2016-04-11 03:11 cnxo 阅读(206) 评论(0) 推荐(0)
HDOJ 1395 2^x mod n = 1
摘要:Problem Description Give a number n, find the minimum x(x>0) that satisfies 2^x mod n = 1.Input One positive integer on each line, the value ... 阅读全文
posted @ 2016-04-11 02:08 cnxo 阅读(138) 评论(0) 推荐(0)
HDOJ 1393 Weird Clock(明白题意就简单了)
摘要:Problem Description A weird clock marked from 0 to 59 has only a minute hand. It won’t move until a special coin is thrown into its box. Ther... 阅读全文
posted @ 2016-04-11 01:38 cnxo 阅读(183) 评论(0) 推荐(0)
Java-单机版的书店管理系统(练习设计模块和思想_系列 四(2) )
摘要:Java-单机版的书店管理系统(练习设计模块和思想_系列 四(1) ): http://blog.csdn.net/qq_26525215/article/details/51116429Java-单机版的书店管理系统(练习设计模块和思想_系列 三 ): http://blog.c... 阅读全文
posted @ 2016-04-11 00:36 cnxo 阅读(180) 评论(0) 推荐(0)
Java-单机版的书店管理系统(练习设计模块和思想_系列 四(1) )
摘要:Java-单机版的书店管理系统(练习设计模块和思想_系列 三 ): http://blog.csdn.net/qq_26525215/article/details/51099202Java-单机版的书店管理系统(练习设计模块和思想_系列 二 ): http://blog.csdn... 阅读全文
posted @ 2016-04-11 00:11 cnxo 阅读(250) 评论(0) 推荐(0)
HDOJ 1391 Number Steps(打表DP)
摘要:Problem Description Starting from point (0,0) on a plane, we have written all non-negative integers 0, 1, 2,… as shown in the figure. For exa... 阅读全文
posted @ 2016-04-09 16:02 cnxo 阅读(128) 评论(0) 推荐(0)
HDOJ 1390 Binary Numbers(进制问题)
摘要:Problem Description Given a positive integer n, find the positions of all 1’s in its binary representation. The position of the least signifi... 阅读全文
posted @ 2016-04-09 15:05 cnxo 阅读(129) 评论(0) 推荐(0)
HDOJ 1339 A Simple Task(简单数学题,暴力)
摘要:Problem Description Given a positive integer n and the odd integer o and the nonnegative integer p such that n = o2^p.ExampleFor n = 24, o = ... 阅读全文
posted @ 2016-04-09 14:30 cnxo 阅读(179) 评论(0) 推荐(0)
HDOJ 1335 Basically Speaking(进制转换)
摘要:Problem Description The Really Neato Calculator Company, Inc. has recently hired your team to help design their Super Neato Model I calculato... 阅读全文
posted @ 2016-04-09 14:02 cnxo 阅读(210) 评论(0) 推荐(0)
Java-单机版的书店管理系统(练习设计模块和思想_系列 三 )
摘要:Java-单机版的书店管理系统(练习设计模块和思想_系列 二 ): http://blog.csdn.net/qq_26525215/article/details/51089734Java-单机版的书店管理系统(练习设计模块和思想_系列 一 ): http://blog.csdn... 阅读全文
posted @ 2016-04-08 19:53 cnxo 阅读(241) 评论(0) 推荐(0)
HDOJ 1334 Perfect Cubes(暴力)
摘要:Problem Description For hundreds of years Fermat’s Last Theorem, which stated simply that for n > 2 there exist no integers a, b, c > 1 such ... 阅读全文
posted @ 2016-04-08 11:13 cnxo 阅读(177) 评论(0) 推荐(0)
HDOJ 1330 Deck(叠木块-物理题啊!贪心算法用到了一点)
摘要:Problem Description A single playing card can be placed on a table, carefully, so that the short edges of the card are parallel to the table’... 阅读全文
posted @ 2016-04-08 10:21 cnxo 阅读(410) 评论(0) 推荐(0)
HDOJ 1326 Box of Bricks(简单题)
摘要:Problem Description Little Bob likes playing with his box of bricks. He puts the bricks one upon another and builds stacks of different heigh... 阅读全文
posted @ 2016-04-08 01:14 cnxo 阅读(142) 评论(0) 推荐(0)
HDOJ 1323 Perfection(简单题)
摘要:Problem Description From the article Number Theory in the 1994 Microsoft Encarta: “If a, b, c are integers such that a = bc, a is called a mu... 阅读全文
posted @ 2016-04-08 00:59 cnxo 阅读(198) 评论(0) 推荐(0)
HDOJ 1303 Doubles(简单题)
摘要:Problem Description As part of an arithmetic competency program, your students will be given randomly generated lists of from 2 to 15 unique ... 阅读全文
posted @ 2016-04-08 00:36 cnxo 阅读(156) 评论(0) 推荐(0)
HDOJ 1302(UVa 573) The Snail(蜗牛爬井)
摘要:Problem Description A snail is at the bottom of a 6-foot well and wants to climb to the top. The snail can climb 3 feet while the sun is up, ... 阅读全文
posted @ 2016-04-08 00:02 cnxo 阅读(197) 评论(0) 推荐(0)
HDOJ 1282 回文数猜想(回文串类)
摘要:Problem Description 一个正整数,如果从左向右读(称之为正序数)和从右向左读(称之为倒序数)是一样的,这样的数就叫回文数。任取一个正整数,如果不是回文数,将该数与他的倒序数相加,若其和不是回文数,则重复上述步骤,一直到获得回文数为止。例如:68变成154(68+8... 阅读全文
posted @ 2016-04-07 23:12 cnxo 阅读(148) 评论(0) 推荐(0)
Java-单机版的书店管理系统(练习设计模块和思想_系列 二 )
摘要:Java-单机版的书店管理系统(练习设计模块和思想_系列 一 ): http://blog.csdn.net/qq_26525215/article/details/51073546介绍小提示:上面一点有一个目录,可以快速定位到自己需要看的类。 今天对前面的代码有了小小的修改,让代... 阅读全文
posted @ 2016-04-07 21:40 cnxo 阅读(239) 评论(0) 推荐(0)
HDOJ 1279 验证角谷猜想
摘要:Problem Description 数论中有许多猜想尚未解决,其中有一个被称为“角谷猜想”的问题,该问题在五、六十年代的美国多个著名高校中曾风行一时,这个问题是这样描述的:任何一个大于一的自然数,如果是奇数,则乘以三再加一;如果是偶数,则除以二;得出的结果继续按照前面的规则进行... 阅读全文
posted @ 2016-04-07 20:45 cnxo 阅读(153) 评论(0) 推荐(0)
HDOJ 1266 Reverse Number(数字反向输出题)
摘要:Problem Description Welcome to 2006’4 computer college programming contest!Specially, I give my best regards to all freshmen! You are the fut... 阅读全文
posted @ 2016-04-06 15:47 cnxo 阅读(294) 评论(1) 推荐(0)
HDOJ 1236 排名(练耐心题)
摘要:Problem Description 今天的上机考试虽然有实时的Ranklist,但上面的排名只是根据完成的题数排序,没有考虑 每题的分值,所以并不是最后的排名。给定录取分数线,请你写程序找出最后通过分数线的 考生,并将他们的成绩按降序打印。 Input 测试输入包含若干场考... 阅读全文
posted @ 2016-04-06 15:07 cnxo 阅读(139) 评论(0) 推荐(0)
Java-单机版的书店管理系统(练习设计模块和思想_系列 一 )
摘要:书店管理系统:项目练习目标 : 1、Java应用程序基本分析 2、培养面向对象编程的基本思想 3、Java基本设计模式综合应用 4、掌握分层和接口的基本设计 5、构建合理的Java应用程序包结构 6、综合应用JSE所学习的知识 7、在应用中合理使用集合框架 8、在应用中综合使用sw... 阅读全文
posted @ 2016-04-06 14:05 cnxo 阅读(268) 评论(0) 推荐(0)
Java---设计模式app小软件汇总应用
摘要:写了一个app小软件,重点不在于软件,软件bug挺多,也没去修改。 这个小软件只是为了更好的说明和了解设计模块而做的。 Java 程序设计–包结构 Java程序设计的系统体系结构很大一部分都体现在包结构上 大家看看我的这个小软件的分层: 结构还是挺清楚的。 一种典型的Java应用程... 阅读全文
posted @ 2016-04-06 02:21 cnxo 阅读(439) 评论(0) 推荐(0)
Java---设计模块(装饰模式)
摘要:★ 场景和问题在不对原有对象类进行修改的基础上,如何给一个或多个已有的类对象提供增强额外的功能?★ 引例 写一个MyBufferedReader类,使它能够对字符流(如FileReader、InputStreamReader和PipedReader等)进行功能增强: (1) 提供带... 阅读全文
posted @ 2016-04-04 00:58 cnxo 阅读(223) 评论(0) 推荐(0)
Java---设计模块(值对象)
摘要:★ 场景和问题 在Java开发时,需要来回交换大量的数据,比如要为方法传入参数,也要获取方法的返回值,该如何能更好的进行数据的交互?★ 基本的编写步骤 ◎第1步:写一个类,实现可序列化(如果以后数据是往数据库里存的,那么可以不序列化,节省资源) ◎第2步:私有化所有属性,保持一个默... 阅读全文
posted @ 2016-04-03 23:32 cnxo 阅读(227) 评论(0) 推荐(0)
Java---设计模块(工厂方法)
摘要:★ 场景和问题 Java程序开发讲究面向接口编程,隐藏具体的实现类,可是如何得到接口呢?工厂类的命名规范:***Factory 单例工厂方法的命名规范:getInstance()工厂的本质是“选择实现”工厂、接口和实现类之间的技术边界:工厂只负责选择实现,实现类才做真正的实现,而接... 阅读全文
posted @ 2016-04-03 23:07 cnxo 阅读(209) 评论(0) 推荐(0)
HDOJ 1202 The calculation of GPA
摘要:Problem Description 每学期的期末,大家都会忙于计算自己的平均成绩,这个成绩对于评奖学金是直接有关的。国外大学都是计算GPA(grade point average) 又称GPR(grade point ratio),即成绩点数与学分的加权平均值来代表一个学生的成... 阅读全文
posted @ 2016-04-03 13:24 cnxo 阅读(232) 评论(0) 推荐(0)
HDOJ 1197 Specialized Four-Digit Numbers
摘要:Problem Description Find and list all four-digit numbers in decimal notation that have the property that the sum of its four digits equals th... 阅读全文
posted @ 2016-04-03 12:42 cnxo 阅读(106) 评论(0) 推荐(0)
HDOJ 1196 Lowest Bit(二进制相关的简单题)
摘要:Problem Description Given an positive integer A (1 =0;i--){ if(str.charAt(i)=='1'){ System.out.println((int... 阅读全文
posted @ 2016-04-03 12:07 cnxo 阅读(119) 评论(0) 推荐(0)
HDOJ 1194 Beat the Spread!(简单题)
摘要:Problem Description Superbowl Sunday is nearly here. In order to pass the time waiting for the half-time commercials and wardrobe malfunction... 阅读全文
posted @ 2016-04-03 11:43 cnxo 阅读(190) 评论(0) 推荐(0)
Java---设计模块(单例的变形)(多例)
摘要:设计模式1——单例变形(多例) ★ 缓存在单例中的使用 缓存在编程中使用很频繁,有着非常重要的作用,它能够帮助程序实现以空间换取时间,通常被设计成整个应用程序所共享的一个空间,现要求实现一个用缓存存放单例对象的类。 说明:该缓存中可以存放多个该类对象,每个对象以一个key值标识,k... 阅读全文
posted @ 2016-04-02 19:21 cnxo 阅读(259) 评论(0) 推荐(0)
Java---设计模块(设计模块的简介及最简单的俩个单例代码加测试)
摘要:设计模式学习概述: ★ 为什么要学习设计模式 1、设计模式都是一些相对优秀的解决方案,很多问题都是典型的、有代表性的问题,学习设计模式,我们就不用自己从头来解决这些问题,相当于在巨人的肩膀上,复用这些方案即可。 2、设计模式已经成为专业人士的常用词汇,不懂不利于交流。 3、能让你设... 阅读全文
posted @ 2016-04-02 18:42 cnxo 阅读(328) 评论(0) 推荐(0)
HDOJ 1164 Eddy's research I(拆分成素数因子)
摘要:Problem Description Eddy’s interest is very extensive, recently he is interested in prime number. Eddy discover the all number owned can be d... 阅读全文
posted @ 2016-04-01 19:38 cnxo 阅读(1265) 评论(0) 推荐(0)
HDOJ 1163 Eddy's digital Roots(九余数定理的应用)
摘要:Problem Description The digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single ... 阅读全文
posted @ 2016-04-01 16:57 cnxo 阅读(184) 评论(0) 推荐(0)
HDOJ 1076 An Easy Task(闰年计算)
摘要:Problem Description Ignatius was born in a leap year, so he want to know when he could hold his birthday party. Can you tell him?Given a posi... 阅读全文
posted @ 2016-04-01 16:35 cnxo 阅读(211) 评论(0) 推荐(0)