自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(26)
  • 收藏
  • 关注

原创 【一文搞懂泛型】

extends Father>是可以调用get()方法的,原因就在于,赋值的时候,必须是Father的子类,所以无论传入的是Father还是Father的子类,其实都是Father类,所以就不担心get的时候会搞不清是什么类型,如下面的代码。我们来分析一下他为什么能解决上面的泛型擦除的问题,因为指定了当前ArrayList的上限为Number,所以在编译的时候,就知道无论如何,list中都是存放Number的子类对象的,就不用担心左右两边出现类型不确定的问题,如下面的代码。泛型擦除会有什么问题呢?

2023-08-06 11:01:35 137

原创 2020暨大计算机考研失败经验总结

2020考研失败经验2020的考研初试成绩已经基本公布,我报考了暨南大学的计算机技术应用专业,成绩为275,其中政治:67,英语二:68,数学二:60,专业课:80,其实在备考阶段就知道这次考研凶多吉少,一来暨大报考的人数太多,这两年异常火爆,不过今年的报考数据还没出,然后由于学院要求,大四上学期要完成毕业论文,复习的期间断断续续,再加上自己准备工作做的实在不充分,种种原因导致了这次考试的失败,...

2020-02-23 22:56:56 3547 4

原创 JAVA_HOME is set to an invalid directory: C:\Program Files\Java\jdk1.8.0_144\bin Please set the JAV

这个ERROR是我在安装spring boot时出现的错误本来安装的步骤如下:1.下载2.解压到c:/Program File中3.在环境变量中添加spring boot的bin目录按照上述步骤配置完后再cmd输入spring boot --version时出现了标题的错误随即找到了解决方案即环境变量中的%JAVA_HOME%的最后不能带有/bin而且不能带有分号“;”,但是spri...

2020-02-17 21:21:45 1718

原创 PAT甲级1065答案(使用C语言)

题目描述Given three integers A, B and C in [−2​^63​​ , 2^​63​​ ], you are supposed to tell whether A+B>C.Input Specification:The first line of the input gives the positive number of test cases, T (≤...

2020-02-16 16:02:04 271

原创 PAT甲级1061答案(使用C语言)

题目要求Sherlock Holmes received a note with some strange strings: Let’s date! 3485djDkxh4hhGE 2984akDfkkkkggEdsb s&hgsfdk d&Hyscvnm. It took him only a minute to figure out that those strange st...

2020-02-16 10:35:11 424

原创 PAT甲级1058答案(使用C语言)

题目描述If you are a fan of Harry Potter, you would know the world of magic has its own currency system – as Hagrid explained it to Harry, “Seventeen silver Sickles to a Galleon and twenty-nine Knuts to ...

2020-02-15 21:29:08 535

原创 PAT甲级1046答案(使用C语言)

题目描述The task is really simple: given N exits on a highway which forms a simple cycle, you are supposed to tell the shortest distance between any pair of exits.Input Specification:Each input file co...

2020-02-15 20:37:08 256

原创 PAT甲级1015答案(使用C语言)

题目描述A reversible prime in any number system is a prime whose “reverse” in that number system is also a prime. For example in the decimal system 73 is a reversible prime because its reverse 37 is also...

2020-02-15 20:31:56 150

原创 PAT甲级1019答案(使用C语言)

题目描述A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number. All single digit numbers are palindromic nu...

2020-02-14 10:13:50 184

原创 判断素数的几种求法

总结一下判断素数的几种求法素数的概念素数及除了1和本身之外,不能被其他数整除的一类数,1既不是素数也不是合数素数的判断判断n是否能被2,3,…n-1中的一个整除,只有全部都不能被整除才能判断为,而只要其中一个可以被整除,就可以判断为非素数。由于该算法的复杂度为o(n),而且求素数通常为整个程序中的一部分,故考虑进行优化设数n在2-n-1中存在n的约数k,那么由于k*(n/k) ==n,...

2020-02-13 20:55:18 337

原创 PAT甲级1054答案(使用C语言)

题目描述Behind the scenes in the computer’s memory, color is always talked about as a series of 24 bits of information for each pixel. In an image, the color with the largest proportional area is called ...

2020-02-12 14:51:14 180

原创 PAT甲级A1051答案(使用C语言)

题目描述Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, …, N and pop randomly. You are supposed to tell if a given sequence of numbers is a possible pop sequence o...

2020-02-12 11:27:51 413

原创 PAT甲级A1050答案(使用C语言)

题目描述Given two strings S​1 and S2, S=S1−S2​​ is defined to be the remaining string after taking all the characters in S2​​ from S1​​ . Your task is simply to calculate S1−S2​​ for any given strings...

2020-02-11 14:05:43 146

原创 c语言中字符串输入输出的几种方式

在不引入string.h的前提下对字符串进行输入输出操作1.输入(1)使用scanf()输入字符串%s是字符串格式符号,使用格式符%s,整体输入字符串格式: scanf("%s", 字符数组名),注意这里不用在数组名前加&,以回车或者空格作为输入结束符,自动在字符串末尾补上结束标志符‘\0’,所以无法将包含空格的字符串输入字符数组。(2)使用getchar()逐个输入字符串该函...

2020-02-11 13:05:31 13011 1

原创 PAT甲级A1042答案(使用C语言)

题目描述Shuffling is a procedure used to randomize a deck of playing cards. Because standard shuffling techniques are seen as weak, and in order to avoid “inside jobs” where employees collaborate with ga...

2020-02-09 22:25:34 200

原创 PAT甲级A1041答案(使用C语言)

题目描述Being unique is so important to people on Mars that even their lottery is designed in a unique way. The rule of winning is simple: one bets on a number chosen from [1,10​4​​ ]. The first one wh...

2020-02-07 19:43:48 245

原创 PAT甲级A1030答案(使用C语言)

题目描述A traveler’s map gives the distances between cities along the highways, together with the cost of each highway. Now you are supposed to write a program to help a traveler to decide the shortest p...

2020-02-06 22:58:08 142

原创 PAT甲级A1036答案(使用C语言)

题目描述This time you are asked to tell the difference between the lowest grade of all the male students and the highest grade of all the female students.Input Specification:Each input file contains on...

2020-02-06 22:24:38 249

原创 PAT甲级A1027答案(使用C语言)

题目描述People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, where the first 2 digits are for Red, the middle ...

2020-02-06 09:50:14 179

原创 PAT甲级A1011答案(使用C语言)

题目描述With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the World Cup trophy in South Afric...

2020-02-05 14:44:54 206

原创 PAT甲级A1008答案(使用C语言)

题目描述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 order. It costs ...

2020-02-05 13:46:53 169

原创 网站收藏

网站收藏别人的推荐

2020-02-05 13:40:44 156

原创 PAT甲级A1006答案(使用C语言)

题目描述At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the door. Given the records of signing in’s and out’s...

2020-02-04 23:17:14 230

原创 PAT甲级A1005答案(使用C语言)

题目描述:Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English.Input Specification:Each input file contains one test case....

2020-02-03 23:56:07 260

原创 按照输入顺序建立二叉树(C语言实现)

按照输入顺序建立二叉树首先定义二叉树节点的结构体typedef struct node{ int data; struct node* left; struct node* right;}Node;//一个结构体包含数据域,左右子树的指针注意这里的左子树和右子树的数据类型要设为指针主要思路:1.按顺序建立二叉树的过程实际上也可以看成是递归建立的过程;2.如果此时函数传入的参数...

2020-02-02 22:07:54 5491 1

原创 PAT甲级1020答案(使用C语言)

PAT甲级1020答案(使用C语言)题目描述:Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, you are supposed to output the level order trav...

2020-02-02 13:48:53 389

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除