摘要: import java.util.Collections;import java.util.Comparator;import java.util.LinkedHashMap;import java.util.LinkedList;import java.util.List;import java. 阅读全文
posted @ 2019-03-12 19:57 Pure_Java 阅读(2453) 评论(0) 推荐(0) 编辑
摘要: 转载:http://www.cnblogs.com/kristain/articles/2033566.html public static void main(String[] args) { Map<String, String> map = new HashMap<String, String 阅读全文
posted @ 2019-03-12 19:50 Pure_Java 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 附有连接(https://www.cnblogs.com/jingmoxukong/p/4302891.html),其中很多是引用其他作者,主要是自己学习随笔,如果有问题,请与我联系,万分感谢! 阅读全文
posted @ 2019-03-09 22:19 Pure_Java 阅读(150) 评论(0) 推荐(0) 编辑
摘要: The lowest common ancestor (LCA) of two nodes U and V in a tree is the deepest node that has both U and V as descendants. A binary search tree (BST) i 阅读全文
posted @ 2019-03-08 21:02 Pure_Java 阅读(204) 评论(0) 推荐(0) 编辑
摘要: Werewolf(狼人杀) is a game in which the players are partitioned into two parties: the werewolves and the human beings. Suppose that in a game, player #1 阅读全文
posted @ 2019-03-08 21:02 Pure_Java 阅读(360) 评论(0) 推荐(0) 编辑
摘要: Among all the factors of a positive integer N, there may exist several consecutive numbers. For example, 630 can be factored as 3×\times×5×\times×6×\t 阅读全文
posted @ 2019-03-08 21:00 Pure_Java 阅读(281) 评论(0) 推荐(0) 编辑
摘要: Eva would like to make a string of beads with her favorite colors so she went to a small shop to buy some beads. There were many colorful strings of b 阅读全文
posted @ 2019-03-08 20:58 Pure_Java 阅读(142) 评论(0) 推荐(0) 编辑
摘要: For two rational numbers, your task is to implement the basic arithmetics, that is, to calculate their sum, difference, product and quotient. Input Sp 阅读全文
posted @ 2019-03-08 20:57 Pure_Java 阅读(239) 评论(0) 推荐(0) 编辑
摘要: On a broken keyboard, some of the keys are worn out. So when you type some sentences, the characters corresponding to those keys will not appear on sc 阅读全文
posted @ 2019-03-08 20:54 Pure_Java 阅读(423) 评论(0) 推荐(0) 编辑
摘要: Given N rational numbers in the form numerator/denominator, you are supposed to calculate their sum. Input Specification: Each input file contains one 阅读全文
posted @ 2019-03-08 20:42 Pure_Java 阅读(247) 评论(0) 推荐(0) 编辑