![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
----- HDOJ-JAVA
谙忆
Java相关研发架构工作经验5年。拥有Java相关发明专利8余项。从事过支付行业,研发与架构的系统稳定地支撑着公司日千万交易笔数量级的支付和对账。
二手车SaaS内核研发3年经验+,拥有二手车行业SaaS相关发明专利6项,研发、架构的元数据内核与权限系统,每日亿万级接口调用。
Java企业开发丰富的理论知识和实战经验。2020年CSDN博客之星第12名,同时在一些社区担任名誉职位。认证为CSDN博客专家、CSDN专栏签约作者、InfoQ签约作者、阿里云ACE杭州同城会会长、阿里云社区认证专家、华为云·云享专家。
展开
-
HDOJ 2005 第几天?
Problem Description 给定一个日期,输出这个日期是该年的第几天。Input 输入数据有多组,每组占一行,数据格式为YYYY/MM/DD组成,具体参见sample input ,另外,可以向你确保所有的输入数据是合法的。Output 对于每组输入数据,输出一行,表示该日期是该年的第几天。Sample Input 1985/1/20 2006/3/12Sample Outpu原创 2015-10-22 17:12:48 · 1667 阅读 · 0 评论 -
HDOJ 1093 A+B for Input-Output Practice (V)
Problem Description Your task is to calculate the sum of some integers.Input Input contains an integer N in the first line, and then N lines follow. Each line starts with a integer M, and then M inte原创 2015-10-22 16:03:50 · 1678 阅读 · 0 评论 -
HDOJ 2057 A + B Again
Problem Description There must be many A + B problems in our HDOJ , now a new one is coming. Give you two hexadecimal integers , your task is to calculate the sum of them,and print it in hexadecimal原创 2016-01-28 20:40:43 · 1769 阅读 · 0 评论 -
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 · 1567 阅读 · 0 评论 -
HDOJ 1106 排序
Problem Description 输入一行数字,如果我们把这行数字中的‘5’都看成空格,那么就得到一行用空格分割的若干非负整数(可能有些整数以‘0’开头,这些头部的‘0’应该被忽略掉,除非这个整数就是由若干个‘0’组成的,这时这个整数就是0)。你的任务是:对这些分割得到的整数,依从小到大的顺序排序输出。Input 输入包含多组测试用例,每组输入数据只有一行数字(数字之间没有空格),这行数字原创 2016-02-20 15:10:25 · 1735 阅读 · 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 through the shadows, slip away through the trees Crossin原创 2016-04-25 17:34:16 · 9683 阅读 · 0 评论 -
ACM中Java的应用
先说一下Java对于ACM的一些优点吧: (1) 对于熟悉C/C++的程序员来说Java 并不难学,两周时间基本可以搞定一般的编程,再用些时间了解一下Java库就行了。Java的语法和C++非常类似,可以说是C++的升级版,只是更加强调面向对象思想而已。(个人见解。。。)(2) 在一般比赛中,Java程序会有额外的时间和空间,但真正进行大规模运算时Java并不比C/C++慢,输入输出效率比较低而已转载 2016-04-25 23:31:48 · 9828 阅读 · 0 评论 -
HDOJ(HDU) 2078 复习时间
Problem Description 为了能过个好年,xhd开始复习了,于是每天晚上背着书往教室跑。xhd复习有个习惯,在复习完一门课后,他总是挑一门更简单的课进行复习,而他复习这门课的效率为两门课的难度差的平方,而复习第一门课的效率为100和这门课的难度差的平方。xhd这学期选了n门课,但是一晚上他最多只能复习m门课,请问他一晚上复习的最高效率值是多少?Input 输入数据的第一行是一个数据原创 2016-04-27 17:51:08 · 1831 阅读 · 0 评论 -
HDOJ/HDU 2535 Vote(排序、)
Problem Description 美国大选是按各州的投票结果来确定最终的结果的,如果得到超过一半的州的支持就可以当选,而每个州的投票结果又是由该州选民投票产生的,如果某个州超过一半的选民支持希拉里,则她将赢得该州的支持。现在给出每个州的选民人数,请问希拉里至少需要赢得多少选民的支持才能当选? Input 多组输入数据 每组数据的第一行包括一个整数N(1<=N<=101),表示美国的州数原创 2016-05-10 19:05:19 · 4489 阅读 · 0 评论 -
HDOJ/HDU 2537 8球胜负(水题.简单的判断)
Problem Description 8球是一种台球竞赛的规则。台面上有7个红球、7个黄球以及一个黑球,当然还有一个白球。对于本题,我们使用如下的简化规则:红、黄两名选手轮流用白球击打各自颜色的球,如果将该颜色的7个球全部打进,则这名选手可以打黑球,如果打进则算他胜。如果在打进自己颜色的所有球之前就把黑球打进,则算输。如果选手不慎打进了对手的球,入球依然有效。 现在给出打进的球(白球除外)的顺原创 2016-05-11 02:43:18 · 3936 阅读 · 0 评论 -
HDOJ/HDU 1865 1sting(斐波拉契+大数~)
Problem Description You will be given a string which only contains ‘1’; You can merge two adjacent ‘1’ to be ‘2’, or leave the ‘1’ there. Surly, you may get many different results. For example, given原创 2016-05-24 16:17:59 · 2552 阅读 · 0 评论 -
HDOJ/HDU 1039 Easier Done Than Said?(字符串处理~)
Problem Description Password security is a tricky thing. Users prefer simple passwords that are easy to remember (like buddy), but such passwords are often insecure. Some sites use random computer-gen原创 2016-05-24 16:53:54 · 5599 阅读 · 0 评论 -
HDOJ(HDU) 2083 简易版之最短距离(中位数)
Problem Description 寒假的时候,ACBOY要去拜访很多朋友,恰巧他所有朋友的家都处在坐标平面的X轴上。ACBOY可以任意选择一个朋友的家开始访问,但是每次访问后他都必须回到出发点,然后才能去访问下一个朋友。 比如有4个朋友,对应的X轴坐标分别为1, 2, 3, 4。当ACBOY选择坐标为2的点做为出发点时,则他最终需要的时间为 |1-2|+|2-2|+|3-2|+|4-2|原创 2016-04-29 21:29:01 · 2352 阅读 · 0 评论 -
HDOJ(HDU) 2090 算菜价(简单水题、)
Problem Description 妈妈每天都要出去买菜,但是回来后,兜里的钱也懒得数一数,到底花了多少钱真是一笔糊涂帐。现在好了,作为好儿子(女儿)的你可以给她用程序算一下了,呵呵。Input 输入含有一些数据组,每组数据包括菜种(字串),数量(计量单位不论,一律为double型数)和单价(double型数,表示人民币元数),因此,每组数据的菜价就是数量乘上单价啊。菜种、数量和单价之间都有原创 2016-04-29 21:56:36 · 1920 阅读 · 0 评论 -
HDOJ(HDU) 2091 空心三角形
Problem Description 把一个字符三角形掏空,就能节省材料成本,减轻重量,但关键是为了追求另一种视觉效果。在设计的过程中,需要给出各种花纹的材料和大小尺寸的三角形样板,通过电脑临时做出来,以便看看效果。Input 每行包含一个字符和一个整数n(0Sample Output XXXX A A A A A A A A原创 2016-04-30 14:01:36 · 1748 阅读 · 0 评论 -
HDOJ(HDU) 2093 考试排名(Arrays.sort排序、类的应用)
Problem Description C++编程考试使用的实时提交系统,具有即时获得成绩排名的特点。它的功能是怎么实现的呢? 我们做好了题目的解答,提交之后,要么“AC”,要么错误,不管怎样错法,总是给你记上一笔,表明你曾经有过一次错误提交,因而当你一旦提交该题“AC”后,就要与你算一算帐了,总共该题错误提交了几回。虽然你在题数上,大步地跃上了一个台阶,但是在耗时上要摊上你共花去的时间。特别是原创 2016-04-30 14:57:01 · 11291 阅读 · 0 评论 -
HDOJ(HDU) 2097 Sky数(进制)
Problem Description Sky从小喜欢奇特的东西,而且天生对数字特别敏感,一次偶然的机会,他发现了一个有趣的四位数2992,这个数,它的十进制数表示,其四位数字之和为2+9+9+2=22,它的十六进制数BB0,其四位数字之和也为22,同时它的十二进制数表示1894,其四位数字之和也为22,啊哈,真是巧啊。Sky非常喜欢这种四位数,由于他的发现,所以这里我们命名其为Sky数。但是要判原创 2016-04-30 15:21:04 · 1784 阅读 · 0 评论 -
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 that more people more power.And he often says he will burn as原创 2016-04-30 16:10:58 · 1945 阅读 · 0 评论 -
HDOJ/HDU 1062 Text Reverse(字符串翻转~)
Problem Description Ignatius likes to write words in reverse way. Given a single line of text which is written by Ignatius, you should reverse all the words and then output them.Input The input conta原创 2016-05-25 16:53:21 · 6012 阅读 · 0 评论 -
HDOJ/HDU 1321 Reverse Text(倒序输出~)
Problem Description In most languages, text is written from left to right. However, there are other languages where text is read and written from right to left. As a first step towards a program that原创 2016-05-25 17:00:58 · 5550 阅读 · 0 评论 -
HDOJ/HDU 2539 点球大战(String.endsWith()方法的一个应用~)
Problem Description 在足球比赛中,有不少赛事,例如世界杯淘汰赛和欧洲冠军联赛淘汰赛中,当比赛双方经过正规比赛和加时赛之后仍然不分胜负时,需要进行点球大战来决定谁能够获得最终的胜利。点球大战的规则非常简单,两方轮流派出球员罚点球,每方各罚5个。当5轮点球结束以后如果仍然不分胜负,则进入一轮定胜负的阶段。两方各派一名球员罚点球,直到有一方罚进而另一方没有进为止。 在北美职业冰球联原创 2016-05-12 18:30:30 · 4754 阅读 · 2 评论 -
HDOJ(HDU) 2106 decimal system(进制相互转换问题)
Problem Description As we know , we always use the decimal system in our common life, even using the computer. If we want to calculate the value that 3 plus 9, we just import 3 and 9.after calculation原创 2016-05-01 16:18:39 · 1838 阅读 · 0 评论 -
HDOJ(HDU) 2107 Founding of HDU(找最大值)
Problem Description 经过慎重的考虑,XHD,8600, LL,Linle以及RPG等ACM队员集体退役,甚至正在酝酿退学。 为什么?要考研?那也不用退学呀… 当然不是!真正的原因是他们想提前创业,想合伙成立一家公司,据说公司的名称都想好了,为了感谢多年的ACM集训队队长XHD,公司就叫海东集团(HaiDong Union),简称HDU.(对于这个公司名称,几个人私下里开玩笑原创 2016-05-01 16:26:27 · 1710 阅读 · 0 评论 -
HDOJ(HDU) 2109 Fighting for HDU(简单排序比较)
Problem Description 在上一回,我们让你猜测海东集团用地的形状,你猜对了吗?不管结果如何,都没关系,下面我继续向大家讲解海东集团的发展情况: 在最初的两年里,HDU发展非常迅速,综合各种ACM算法生成的老鼠药效果奇好,据说该药专对老鼠有效,如果被人误食了,没有任何副作用,甚至有传闻说还有健胃的效果,不过这倒没有得到临床验证。所以,公司的销量逐年递增,利润也是节节攀升,作为股东之原创 2016-05-01 16:45:21 · 1969 阅读 · 0 评论 -
HDOJ/HDU 1073 Online Judge(字符串处理~)
Problem Description Ignatius is building an Online Judge, now he has worked out all the problems except the Judge System. The system has to read data from correct output file and user’s result file, t原创 2016-05-26 01:19:02 · 4367 阅读 · 0 评论 -
HDOJ/HDU 1087 Super Jumping! Jumping! Jumping!(经典DP~)
Problem Description Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about this game, so I introduce it to you原创 2016-05-26 01:53:59 · 3159 阅读 · 0 评论 -
HDOJ(HDU) 2113 Secret Number(遍历数字位数的每个数字)
Problem Description 有一天, KIKI 收到一张奇怪的信, 信上要KIKI 计算出给定数各个位上数字为偶数的和. eg. 5548 结果为12 , 等于 4 + 8KIKI 很苦恼. 想请你帮忙解决这个问题.Input 输入数据有多组,每组占一行,只有一个数字,保证数字在INT范围内.Output 对于每组输入数据,输出一行,每两组数据之间有一个空行.Sample In原创 2016-05-02 16:39:47 · 1773 阅读 · 0 评论 -
HDOJ/HDU 1075 What Are You Talking About(字符串查找翻译~Map)
Problem Description Ignatius is so lucky that he met a Martian yesterday. But he didn’t know the language the Martians use. The Martian gives him a history book of Mars and a dictionary when it leaves原创 2016-05-26 21:43:03 · 6528 阅读 · 0 评论 -
HDOJ/HDU 1556 Color the ball(树状数组)
Problem Description N个气球排成一排,从左到右依次编号为1,2,3….N.每次给定2个整数a b(a <= b),lele便为骑上他的“小飞鸽”牌电动车从气球a开始到气球b依次给每个气球涂一次颜色。但是N次以后lele已经忘记了第I个气球已经涂过几次颜色了,你能帮他算出每个气球被涂过几次颜色吗?Input 每个测试实例第一行为一个整数N,(N <= 100000).接下来的N原创 2016-05-26 22:11:02 · 4293 阅读 · 0 评论 -
HDOJ/HDU 5686 Problem B(斐波拉契+大数~)
Problem Description 度熊面前有一个全是由1构成的字符串,被称为全1序列。你可以合并任意相邻的两个1,从而形成一个新的序列。对于给定的一个全1序列,请计算根据以上方法,可以构成多少种不同的序列。Input 这里包括多组测试数据,每组测试数据包含一个正整数N,代表全1序列的长度。1≤N≤200 Output 对于每组测试数据,输出一个整数,代表由题目中所给定的全1序列所能形原创 2016-05-26 22:20:08 · 5185 阅读 · 0 评论 -
HDOJ/HDU 1088 Write a simple HTML Browser(HTML字符串)
Problem Description If you ever tried to read a html document on a Macintosh, you know how hard it is if no Netscape is installed. Now, who can forget to install a HTML browser? This is very easy be原创 2016-05-27 02:32:35 · 12051 阅读 · 0 评论 -
HDOJ(HDU) 2115 I Love This Game(排序排序、、、)
Problem Description Do you like playing basketball ? If you are , you may know the NBA Skills Challenge . It is the content of the basketball skills . It include several parts , such as passing , shoo原创 2016-05-03 17:00:13 · 1979 阅读 · 0 评论 -
HDOJ(HDU) 2123 An easy problem(简单题...)
Problem Description In this problem you need to make a multiply table of N * N ,just like the sample out. The element in the ith row and jth column should be the product(乘积) of i and j.Input The firs原创 2016-05-03 17:16:29 · 1856 阅读 · 0 评论 -
HDOJ(HDU) 2132 An easy problem
Problem Description We once did a lot of recursional problem . I think some of them is easy for you and some if hard for you. Now there is a very easy problem . I think you can AC it. We can defin原创 2016-05-03 17:32:10 · 1717 阅读 · 0 评论 -
HDOJ(HDU) 2133 What day is it(认识下Java的Calendar类---日期类)
Problem Description Today is Saturday, 17th Nov,2007. Now, if i tell you a date, can you tell me what day it is ?Input There are multiply cases. One line is one case. There are three integers, year原创 2016-05-03 18:19:54 · 1638 阅读 · 0 评论 -
HDOJ(HDU) 2135 Rolling table
Problem Description After the 32nd ACM/ICPC regional contest, Wiskey is beginning to prepare for CET-6. He has an English words table and read it every morning. One day, Wiskey’s chum wants to play a原创 2016-05-03 19:56:05 · 1892 阅读 · 0 评论 -
HDOJ(HDU) 2136 Largest prime factor(素数筛选)
Problem Description Everybody knows any number can be combined by the prime number. Now, your task is telling me what position of the largest prime factor. The position of prime 2 is 1, prime 3 is 2原创 2016-05-03 20:30:42 · 12427 阅读 · 0 评论 -
HDOJ/HDU 1113 Word Amalgamation(字典顺序~Map)
Problem Description In millions of newspapers across the United States there is a word game called Jumble. The object of this game is to solve a riddle, but in order to find the letters that appear in原创 2016-05-27 15:12:14 · 4238 阅读 · 0 评论 -
HDOJ/HDU 1161 Eddy's mistakes(大写字母转换成小写字母)
Problem Description Eddy usually writes articles ,but he likes mixing the English letter uses, for example “computer science” is written frequently “coMpUtEr scIeNce” by him, this mistakes lets Eddy’s原创 2016-05-27 15:21:12 · 4615 阅读 · 0 评论 -
HDOJ/HDU 1200 To and Fro(加密解密字符串)
Problem Description Mo and Larry have devised a way of encrypting messages. They first decide secretly on the number of columns and write the message (letters only) down the columns, padding with extr原创 2016-05-27 16:23:24 · 7189 阅读 · 0 评论