- 博客(49)
- 资源 (15)
- 收藏
- 关注
原创 HDOJ 1070 Milk(水题,考英文的)
Problem Description Ignatius drinks milk everyday, now he is in the supermarket and he wants to choose a bottle of milk. There are many kinds of milk in the supermarket, so Ignatius wants to know whic
2016-03-31 20:01:02 1788
原创 HDOJ 1061 Rightmost Digit(循环问题)
Problem Description Given a positive integer N, you should output the most right digit of N^N.Input The input contains several test cases. The first line of the input is a single integer T which is t
2016-03-31 18:29:22 1886
原创 HDOJ 1058 Humble Numbers(打表过)
Problem Description A number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, … shows the first 20
2016-03-31 13:08:55 1586
原创 【8】JAVA---地址App小软件(AddrDaoFile .class)(数据层)
实现数据进行文件的存储和读写。package cn.hncu.addr.dao;import java.io.FileInputStream;import java.io.FileNotFoundException;import java.io.FileOutputStream;import java.io.IOException;import java.io.ObjectInputStre
2016-03-31 00:30:07 9523
原创 【7】JAVA---地址App小软件(AddrBusiness.class)(逻辑层)
这个。。。没多少好解释的。。。package cn.hncu.addr.business;import javax.swing.JOptionPane;import cn.hncu.addr.dao.AddrDaoFile;import sun.security.util.Length;public class AddrBusiness { //静态方法。访问的是同一个对象--也就是说就算
2016-03-31 00:26:11 9233
原创 【6】JAVA---地址App小软件(QueryPanel.class)(表现层)
查找模块: 年龄可进行段查找。 其他的都是模糊匹配。 空格为无用字符,会屏蔽的(除年龄)。 (如果在年龄中输入空格,会出现异常,当时没想到这点,要防护这点很容易的,但因为在这个小软件的编写过程,我主要学的是java项目开发的分层思想,软件可能bug比较多,望见谅。)/* * QueryPanel.java * */package cn.hncu.addr.ui;import javax
2016-03-31 00:24:02 9043
原创 【5】JAVA---地址App小软件(DeletePanel.class)(表现层)
删除地址的表现层类。 如果没有选中要删除的地址信息,会出现窗口提示: 删除地址界面:(无法修改数据,只能看) /* * DeletePanel.java * */package cn.hncu.addr.ui;import javax.swing.JFrame;import javax.swing.JOptionPane;import cn.hncu.addr.business.Add
2016-03-31 00:17:11 8951
原创 【4】JAVA---地址App小软件(UpdatePanel.class)(表现层)
修改地址信息的一个表现层类。 必须选中地址,才能修改,否则会弹出窗口提示, 修改地址界面: /* * UpdatePanel.java * */package cn.hncu.addr.ui;import javax.swing.JFrame;import javax.swing.JOptionPane;import cn.hncu.addr.business.AddrBusiness
2016-03-31 00:13:21 1714
原创 【3】JAVA---地址App小软件(AddPanel.class)(表现层)
添加地址信息界面。年龄和地址必须是数字,否则会弹出窗口提示。 地址信息不能为空。 /* * AddPanel.java * * Created on __DATE__, __TIME__ */package cn.hncu.addr.ui;import javax.swing.JFrame;import javax.swing.JOptionPane;import javax.swi
2016-03-31 00:07:10 1833
原创 【2】JAVA---地址App小软件(ListPanel.class)(表现层)
这个是表现层的主界面。 /* * ListPanel.java * */package cn.hncu.addr.ui;import javax.swing.JFrame;import javax.swing.JLabel;import javax.swing.JList;import javax.swing.JOptionPane;import cn.hncu.addr.busine
2016-03-31 00:01:09 1766
原创 【1】JAVA---地址App小软件(AddressApp.class)(初步接触项目开发的分层思想)(表现层)
这个是表现层的main方法。 实现的地址信息有: 姓名,性别,年龄,电话,地址。 实现的功能有: 增加地址; 删除地址; 修改地址; 查找地址:其中年龄的查找为年龄段的查找。数据存储的方式为文件存储和读写。分层的思想是:表现层调用逻辑层,逻辑层调用数据层。不可以反过来每个class文件都带了包名字,建好文件就可以了。/* * AddressApp.java * */package
2016-03-30 23:45:40 2014
原创 HDOJ 1056 HangOver(水题)
Problem Description How far can you make a stack of cards overhang a table? If you have one card, you can create a maximum overhang of half a card length. (We’re assuming that the cards must be perpen
2016-03-28 21:19:53 1781
原创 HDOJ 1048 The Hardest Problem Ever(加密解密类)
Problem Description Julius Caesar lived in a time of danger and intrigue. The hardest situation Caesar ever faced was keeping himself alive. In order for him to survive, he decided to create one of th
2016-03-28 16:43:19 1702
原创 HDOJ 1028 Ignatius and the Princess III(递推)
Problem Description “Well, it seems the first problem is too easy. I will let you know how foolish you are later.” feng5166 says.“The second problem is, given an positive integer N, we define an equat
2016-03-27 12:30:22 2089 2
原创 HDOJ 2114 Calculate S(n)(找周期)
Problem Description Calculate S(n).S(n)=1^3+2^3 +3^3 +……+n^3 .Input Each line will contain one integer N(1 < n < 1000000000). Process to end of file.Output For each case, output the last four dights
2016-03-25 15:53:41 1989
原创 HDOJ 1017 A Mathematical Curiosity
Problem Description Given two integers n and m, count the number of pairs of integers (a,b) such that 0 < a < b < n and (a^2+b^2 +m)/(ab) is an integer.This problem contains multiple test cases!The fi
2016-03-24 21:21:37 1896
原创 HDOJ 1014 Uniform Generator(公约数问题)
Problem Description Computer simulations often require random numbers. One way to generate pseudo-random numbers is via a function of the formseed(x+1) = [seed(x) + STEP] % MODwhere ‘%’ is the modulus
2016-03-24 20:37:21 1707
原创 HDOJ 2117 Just a Numble(模拟除法)
Problem Description Now give you two integers n m, you just tell me the m-th number after radix point in 1/n,for example n=4,the first numble after point is 2,the second is 5,and all 0 followedInput
2016-03-24 19:01:33 1745
转载 HDOJ的题目分类
基础题: 1000、1001、1004、1005、1008、1012、1013、1014、1017、1019、1021、1028、1029、1032、1037、1040、1048、1056、1058、1061、1070、1076、1089、1090、1091、1092、1093、1094、1095、1096、1097、1098、1106、1108、1157、1163、1164、1170、1194、
2016-03-24 18:43:09 3010
原创 HDOJ 2200 Eddy's AC难题(数学组合概率题)
Problem Description Eddy是个ACMer,他不仅喜欢做ACM题,而且对于Ranklist中每个人的ac数量也有一定的研究,他在无聊时经常在纸上把Ranklist上每个人的ac题目的数量摘录下来,然后从中选择一部分人(或者全部)按照ac的数量分成两组进行比较,他想使第一组中的最小ac数大于第二组中的最大ac数,但是这样的情况会有很多,聪明的你知道这样的情况有多少种吗?特别说明:
2016-03-24 18:31:43 1734
原创 HDOJ 2131 Probability
Problem Description Mickey is interested in probability recently. One day , he played a game which is about probability with mini.First mickey gives a letter and a word to mini.Then mini calculate the
2016-03-24 18:06:52 1844
原创 HDOJ 2206 IP的计算(正则表达式的应用)
Problem Description 在网络课程上,我学到了很多有关IP的知识。IP全称叫网际协议,有时我们又用IP来指代我们的IP网络地址,现在IPV4下用一个32位无符号整数来表示,一般用点分方式来显示,点将IP地址分成4个部分,每个部分为8位,表示成一个无符号整数(因此不需要用正号出现),如192.168.100.16,是我们非常熟悉的IP地址,一个IP地址串中没有空格出现(因为要表示成一
2016-03-24 13:29:20 1919
原创 HDOJ 1287 破译密码(异或运算)
Problem Description 有个叫“猪头帮”的国家,采用一种简单的文法加密,他们所用的语言里面只有大写字母,没有其他任何字符;现在还知道他们加密的方法是:只用一个大写字母和原文进行异或运算生成密文。请你帮忙解开。Input 有若干组,每组输入有2行,第一行整数N表示有N个密文,接着一行有N个整数分别表示N个密文。Output 输出仅有大写字母组成的原文。Sample Input
2016-03-24 11:01:17 2103
原创 HDOJ 2089 不要62(打表)
Problem Description 杭州人称那些傻乎乎粘嗒嗒的人为62(音:laoer)。 杭州交通管理局经常会扩充一些的士车牌照,新近出来一个好消息,以后上牌照,不再含有不吉利的数字了,这样一来,就可以消除个别的士司机和乘客的心理障碍,更安全地服务大众。 不吉利的数字为所有含有4或62的号码。例如: 62315 73418 88914 都属于不吉利号码。但是,61152虽然含有6和2
2016-03-23 10:58:16 1441
原创 HDOJ 2092 整数解(2次方程整数解公式)
Problem Description 有二个整数,它们加起来等于某个整数,乘起来又等于另一个整数,它们到底是真还是假,也就是这种整数到底存不存在,实在有点吃不准,你能快速回答吗?看来只能通过编程。 例如: x + y = 9,x * y = 15 ? 找不到这样的整数x和y 1+4=5,1*4=4,所以,加起来等于5,乘起来等于4的二个整数为1和4 7+(-8)=-1,7*(-8)=-5
2016-03-23 10:23:45 1862 1
原创 HDOJ 1098 Ignatius's puzzle
Problem Description Ignatius is poor at math,he falls across a puzzle problem,so he has no choice but to appeal to Eddy. this problem describes that:f(x)=5*x^13+13*x^5+k*a*x,input a nonegative integer
2016-03-22 11:20:33 1466
原创 HDOJ 1097 A hard puzzle(循环问题)
Problem Description lcy gives a hard puzzle to feng5166,lwg,JGShining and Ignatius: gave a and b,how to know the a^b.everybody objects to this BT problem,so lcy makes the problem easier than begin. t
2016-03-21 20:17:08 1975
原创 HDOJ 1019 Least Common Multiple(最小公倍数问题)
Problem Description The least common multiple (LCM) of a set of positive integers is the smallest positive integer which is divisible by all the numbers in the set. For example, the LCM of 5, 7 and 15
2016-03-21 14:44:40 2185
原创 辗转相除法_欧几里得算法_java的实现(求最大公约数)
辗转相除法,又被称为欧几里德(Euclidean)算法, 是求最大公约数的算法。 当然也可以求最小公倍数。算法描述 两个数a,b的最大公约数记为GCD(a,b)。a,b的最大公约数是两个数的公共素因子的乘积。如462可以分解成2 × 3 × 7 × 11;1071可以分解成3 × 3 × 7 × 17。462和1071的最大公约数等于它们共有的素因数的乘积3 × 7 = 21。如果两数没有公共的
2016-03-21 14:42:12 4270
原创 HDOJ 1020 Encoding
Problem Description Given a string containing only ‘A’ - ‘Z’, we could encode it using the following method: Each sub-string containing k same characters should be encoded to “kX” where “X” is the on
2016-03-21 10:51:46 1578
原创 HDOJ 1018 Big Number(大数位数公式)
Problem Description In many applications very large integers numbers are required. Some of these applications are using keys for secure transmission of data, encryption, etc. In this problem you are g
2016-03-20 17:06:27 1833
原创 HDOJ 1004 Let the Balloon Rise
Problem Description Contest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges’ favorite time is guessing the most popular problem. When the contest is
2016-03-20 16:48:42 1499
原创 HDOJ 1012 u Calculate e
Problem Description A simple mathematical formula for e is where n is allowed to go to infinity. This can actually yield very accurate approximations of e using relatively small values of n.Output O
2016-03-20 16:31:41 1513
原创 排序算法:归并排序
归并排序是建立在归并操作上的一种有效的排序算法。该算法是采用分治法(Divide and Conquer)的一个非常典型的应用。归并排序,其的基本思路就是将数组分成二组A,B,如果这二组组内的数据都是有序的,那么就可以很方便的将这二组数据进行排序。如何让这二组组内数据有序了? 可以将A,B组各自再分成二组。依次类推,当分出来的小组只有一个数据时,可以认为这个小组组内已经达到了有序,然后再合并相邻的
2016-03-20 16:00:47 1573
原创 HDOJ 1008 Elevator
Problem Description The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified o
2016-03-18 18:51:22 1700
原创 HDOJ 1285 确定比赛名次(拓扑排序)
Problem Description 有N个比赛队(1<=N<=500),编号依次为1,2,3,。。。。,N进行比赛,比赛结束后,裁判委员会要将所有参赛队伍从前往后依次排名,但现在裁判委员会不能直接获得每个队的比赛成绩,只知道每场比赛的结果,即P1赢P2,用P1,P2表示,排名时P1在P2之前。现在请你编程序确定排名。Input 输入有若干组,每组中的第一行为二个数N(1<=N<=500),M
2016-03-18 16:58:42 2017
原创 Java---软件试用次数(Properties类的简单使用)
编程练习(软件试用次数) 实现一个如下的软件小功能: 记录软件运行的次数并在每次运行时提示已经运行的次数。如果运行次数大于5次,软件不再运行并给出提示:试用次数已到,请注册!本代码只简单的介绍了软件的使用次数如何限定,很容易让人破解。 如果想让人难以破解,则自己加入算法,或者分开存储关键数据, 在运行时比对数据等等、、、package cn.hncu.property;import java
2016-03-17 22:19:45 2261
原创 HDOJ 2072 单词数
Problem Description lily的好朋友xiaoou333最近很空,他想了一件没有什么意义的事情,就是统计一篇文章里不同单词的总数。下面你的任务是帮助xiaoou333解决这个问题。Input 有多组数据,每组一行,每组就是一篇小文章。每篇小文章都是由小写字母和空格组成,没有标点符号,遇到#时表示输入结束。Output 每组只输出一个整数,其单独成行,该整数代表一篇文章里不同单
2016-03-17 20:29:04 1608
原创 HDOJ 1016 Prime Ring Problem素数环【深搜】
Problem Description A ring is compose of n circles as shown in diagram. Put natural number 1, 2, …, n into each circle separately, and the sum of numbers in two adjacent circles should be a prime.Note
2016-03-17 19:35:15 1865
原创 Java---StringBuffer()方法的简单应用
描述:在实际应用中,经常回遇到对字符串进行动态修改。这时候,String类的功能受到限制,而StringBuffer类可以完成字符串的动态添加、插入和替换等操作。1、构造函数。StringBuffer() : 构造一个没有任何字符的StringBuffer类。 StringBuffer(int length) : 构造一个没有任何字符的StringBuffer类且其长度为length。 St
2016-03-15 21:14:39 1721
程序猿情人节必备,情人节网站源码
2021-02-06
windows运行go项目完整教程.zip_win10怎么解压zip文件
2021-01-18
简单实用个人简介说明求职简历单页HTML5响应式网页模板.rar
2020-05-28
Redis-x64-3.2.100.msi for windows 64位
2017-03-02
停用当前管理员,新建管理用户,DOS命令
2015-11-03
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人