HDOJ-ACM1022(JAVA)】的更多相关文章

刚刚开始用Java,代码难免不够简洁. import java.math.BigDecimal; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner cin = new Scanner(System.in); while (cin.hasNext()) { BigDecimal a = cin.nextBigDecimal(); BigDecimal b =…
一.需求:计算网页访问量前三名 import org.apache.spark.rdd.RDD import org.apache.spark.{SparkConf, SparkContext} /** * 需求:计算网页访问量前三名 * 用户:喜欢视频 直播 * 帮助企业做经营和决策 * * 看数据 */ object UrlCount { def main(args: Array[String]): Unit = { //1.加载数据 val conf:SparkConf = new Spa…
Problem Description 人随着岁数的增长是越大越聪明还是越大越笨,这是一个值得全世界科学家思考的问题,同样的问题Eddy也一直在思考,因为他在很小的时候就知道亲和串如何判断了,但是发现,现在长大了却不知道怎么去判断亲和串了,于是他只好又再一次来请教聪明且乐于助人的你来解决这个问题. 亲和串的定义是这样的:给定两个字符串s1和s2,如果能通过s1循环移位,使s2包含在s1中,那么我们就说s2 是s1的亲和串. Input 本题有多组测试数据,每组数据的第一行包含输入字符串s1,第二…
Problem Description As the increase of population, the living space for people is becoming smaller and smaller. In MagicStar the problem is much worse. Dr. Mathematica is trying to save land by clustering buildings and then we call the set of buildin…
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(0< year<10000), month(0<=month<13), day(0<…
大明A+B Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 9273    Accepted Submission(s): 3318 Problem Description 话说,经过了漫长的一个多月,小明已经成长了许多,所以他改了一个名字叫“大明”.这时他已经不是那个只会做100以内加法的那个“小明”了,现在他甚至会任意长度的正小数的加…
A + B Problem II Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 241933    Accepted Submission(s): 46646 Problem Description I have a very simple problem for you. Given two integers A and B, you…
FatMouse' Trade Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 56784    Accepted Submission(s): 19009 Problem Description FatMouse prepared M pounds of cat food, ready to trade with the cats g…
Nasty Hacks Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3049    Accepted Submission(s): 2364 Problem Description You are the CEO of Nasty Hacks Inc., a company that creates small pieces of…
Box of Bricks Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 5994    Accepted Submission(s): 2599 Problem Description Little Bob likes playing with his box of bricks. He puts the bricks one up…