自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(170)
  • 资源 (1)
  • 收藏
  • 关注

原创 PAT Advanced—1143 Lowest Common Ancestor (30分)

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) is recursively defined as a binary tree which has the following properties:The left subtree of a node cont

2020-07-13 23:45:57 47

原创 PAT Advanced—1147 Heaps (30分)

In computer science, a heap is a specialized tree-based data structure that satisfies the heap property: if P is a parent node of C, then the key (the value) of P is either greater than or equal to (in a max heap) or less than or equal to (in a min heap) t

2020-07-08 21:15:52 47

原创 PAT Advanced—1151 LCA in a Binary Tree (30分)

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.Given any two nodes in a binary tree, you are supposed to find their LCA.Input Specification:Each input file contains one test case.

2020-07-08 20:06:50 60

原创 PAT Advanced—1150 Travelling Salesman Problem (25分)

The “travelling salesman problem” asks the following question: “Given a list of cities and the distances between each pair of cities, what is the shortest possible route that visits each city and returns to the origin city?” It is an NP-hard problem in com

2020-07-07 00:16:18 54

原创 PAT Advanced—1149 Dangerous Goods Packaging (25分)

When shipping goods with containers, we have to be careful not to pack some incompatible goods into the same container, or we might get ourselves in serious trouble. For example, oxidizing agent (氧化剂) must not be packed with flammable liquid (易燃液体), or it

2020-07-05 23:45:45 49

原创 PAT Advanced—1148 Werewolf - Simple Version (20分)

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 said: “Player #2 is a werewolf.”;player #2 said: “Player #3 is a human.”;player #3 said: “Player #4 is a

2020-07-05 00:39:31 24

原创 PAT Advanced—1155 Heap Paths (30分)

In computer science, a heap is a specialized tree-based data structure that satisfies the heap property: if P is a parent node of C, then the key (the value) of P is either greater than or equal to (in a max heap) or less than or equal to (in a min heap) t

2020-07-03 23:27:49 21

原创 PAT Advanced—1154 Vertex Coloring (25分)

A proper vertex coloring is a labeling of the graph’s vertices with colors such that no two vertices sharing the same edge have the same color. A coloring using at most k colors is called a (proper) k-coloring.Now you are supposed to tell if a given color

2020-07-02 22:44:13 37

原创 PAT Advanced—1153 Decode Registration Card of PAT (25分)

A registration card number of PAT consists of 4 parts:the 1st letter represents the test level, namely, T for the top level, A for advance and B for basic;the 2nd - 4th digits are the test site number, ranged from 101 to 999;the 5th - 10th digits give

2020-07-01 22:17:33 36

原创 PAT Advanced—1152 Google Recruitment (20分)

In July 2004, Google posted on a giant billboard along Highway 101 in Silicon Valley (shown in the picture below) for recruitment. The content is super-simple, a URL consisting of the first 10-digit prime found in consecutive digits of the natural constant

2020-06-28 23:38:58 46

原创 PAT Advanced—1028 List Sorting (25分)

Excel can sort records according to any column. Now you are supposed to imitate this function.Input Specification:Each input file contains one test case. For each case, the first line contains two integers N (≤10​5​​) and C, where N is the number of reco

2020-06-27 23:29:02 35

原创 PAT Advanced—1025 PAT Ranking (25分)

Programming Ability Test (PAT) is organized by the College of Computer Science and Technology of Zhejiang University. Each test is supposed to run simultaneously in several places, and the ranklists will be merged immediately after the test. Now it is your

2020-06-19 19:25:34 40

原创 PAT Advanced—1022 Digital Library (30分)

A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published years. Each book is assigned an unique 7-digit number as its ID. Given any query from a reader, you are suppose

2020-06-03 20:58:37 42

原创 Android实战—蓝牙聊天功能(六)

一、项目地址二、最终效果三、填写两个layout文件<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background=

2020-06-01 23:44:45 81

原创 Android实战—百度地图定位(五)

文章目录一、项目地址二、下载百度地图SDK三、在百度平台创建应用1. 创建应用2. 获取SHA1四、遇到的问题:1.地图只有网格一、项目地址  https://gitee.com/lonelyZhe/Android-BaiduMap二、下载百度地图SDK点击自定义下载三、在百度平台创建应用1. 创建应用2. 获取SHA1直接执行命令会报错,原因是找不到keystore解决办法:找到自己本地的下列文件执行命令接下来的操作与官方文档一致四、遇到的问题:1.地图只有网格解

2020-05-26 00:07:16 192

原创 PAT Advanced—1018 Public Bike Management (30分)

There is a public bike service in Hangzhou City which provides great convenience to the tourists from all over the world. One may rent a bike at any station and return it to any other stations in the city.The Public Bike Management Center (PBMC) keeps mon

2020-05-18 18:05:41 59

原创 PAT Advanced—1024 Palindromic Number (25分)

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 numbers.Non-palindromic numbers can be paired with palindromic

2020-05-09 20:56:33 47

原创 PAT Advanced—1021 Deepest Root (25分)

A graph which is connected and acyclic can be considered a tree. The height of the tree depends on the selected root. Now you are supposed to find the root that results in a highest tree. Such a root is called the deepest root.Input Specification:Each in

2020-05-09 08:44:44 39

原创 Android实战—SQLlite(四)

文章目录一、项目地址二、MainActivity.java三、DBHelper.java四、dao.java一、项目地址  https://gitee.com/lonelyZhe/Android-SQLite二、MainActivity.javapackage com.lonelyzhe.sqlite;import android.database.Cursor;import and...

2020-05-06 23:12:14 79

原创 PAT Advanced—1031 Hello World for U (20分)

Given any string of N (≥5) characters, you are asked to form the characters into the shape of U. For example, helloworld can be printed as:h de ll rlowoThat is, the characters must be printed...

2020-05-04 20:26:32 52

原创 PAT Advanced—1027 Colors in Mars (20分)

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 2 dig...

2020-05-04 19:04:42 39

原创 (递归)四对括号有多少种合法组合

思路: 括号匹配可以直接用栈匹配,这里使用递归,主要递归方式为首先全部左括号,任何对数括号都会有这种形式(((())))由于左括号放在最前面的方式,只有这一种排列,所以需要回退,把第四个左括号先不匹配,那么左括号就会出现在右括号后面,这时候再递归,就会产生几种新的排列((()()))((())())((()))()依次这样进行下去,直到放在最左边的左括号只有1个,这是...

2020-04-29 17:09:11 114

原创 Springboot下载Odoo12的Postgresql10数据库中bytea的文件
原力计划

文章目录一、BLOB和bytea二、Mybatis读取bytea字段三、Odoo12存储附件形式四、springboot读取字节流,供前端下载1. 附件类,用于在数据库中直接配制二进制文件和文件名2. Mybatis层查询附录3.service层提供下载一、BLOB和bytea  在postgresql中,存储二进制数据的类型有标准的bytea(等同于SQL中的blob)二、Mybatis读...

2020-04-28 00:54:54 148

原创 PAT Advanced—1020 Tree Traversals (25分)

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 traversal sequence of the cor...

2020-04-26 00:21:39 52

原创 PAT Advanced—1023 Have Fun with Numbers (20分)

Notice that the number 123456789 is a 9-digit number consisting exactly the numbers from 1 to 9, with no duplication. Double it we will obtain 246913578, which happens to be another 9-digit number con...

2020-04-24 00:26:22 210

原创 PAT Advanced—1019 General Palindromic Number (20分)

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 numbers...

2020-04-19 23:08:15 29

原创 PAT Advanced—1017 Queueing at Bank (25分)

Suppose a bank has K windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. All the customers have to wait in line behind the yellow li...

2020-04-19 19:12:01 37

原创 PAT Advanced—1016 Phone Bills (25分)

A long-distance telephone company charges its customers by the following rules:Making a long-distance call costs a certain amount per minute, depending on the time of day when the call is made. When ...

2020-04-19 16:19:46 40

原创 Android实战—Broadcast音乐盒(三)
原力计划

文章目录一、项目地址二、项目效果三、Broadcast实现模式1. 广播流程图2. 为什么要使用广播实现?四、主要代码1. activity_main.xml2. MainActivaty.java3. MusicService.java4. AndroidManifest.xml五、注意1. assets和raw的区别一、项目地址  https://gitee.com/lonelyZhe/A...

2020-04-17 23:30:11 173

原创 PAT Advanced—1015 Reversible Primes (20分)

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 a pr...

2020-04-17 15:55:28 51

原创 解决前端Provisional headers are shown问题

一、出现Provisional headers are shown的几种可能性跨域,请求被浏览器拦截请求被浏览器插件拦截服务器出错或者超时,没有真正的返回强缓存from disk cache或者from memory cache,此时也不会显示  这几种都是前端的问题,我们都尝试了,对我们的问题没有效果二、还是后端的锅  前端发送post请求,用的是json格式,但是没请求到后端...

2020-04-15 23:28:20 51236 9

原创 Swagger返回嵌套json数据
原力计划

文章目录一、接口展示中的问题二、BaseResult工具类三、使用BaseResult1. 对应一个url该怎么返回数据2. swagger中的数据展示四、多层嵌套1. 嵌入一层列表2. 返回分页信息3. 对象里有另外的对象五、总结一、接口展示中的问题  现在大部分前后端的数据交互都是采用json格式,如我们经常用一个大的json包裹着数据发送的,但是在Swagger中,如果直接返回这个类对象...

2020-04-14 19:58:28 1447 1

原创 Springboot配制Swagger自动生成API文档
原力计划

一、引入Swagger1. 添加maven依赖<!--swagger依赖--><dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> <version>2.9.2&...

2020-04-11 21:37:19 347 1

原创 PAT Advanced—1014 Waiting in Line (30分)

Suppose a bank has N windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. The rules for the customers to wait in line are:The space ...

2020-04-10 23:47:11 21

原创 Redis安装与配制—Centos7与Docker
原力计划

文章目录一、本地安装及配置(一)、Centos7本地安装Redis(二)、配制redis启动模式(三)配制redis登录密码(四)使用redis desktop manager连接redis二、Docker安装及配置三、总结一、本地安装及配置(一)、Centos7本地安装Redis在官网下载redis安装包https://redis.io/小技巧:官网下载可能会很慢,此时可以用开发者...

2020-04-09 23:47:13 42

原创 PAT Advanced—1013 Battle Over Cities (25分)

It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that city are closed. We must know immediately if we nee...

2020-04-08 09:16:28 22

原创 PAT Advanced—1012 The Best Rank (25分)

To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C - C Programming Language, M - Mathematics (Calculus or Linear Algrbra), and E - Eng...

2020-04-07 13:24:28 34

原创 PAT Advanced—1003 Emergency (25分)

As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by some roads. Amount of rescue teams in each city and the l...

2020-04-06 20:17:39 48

原创 PAT Advanced—1004 Counting Leaves (30分)

A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child.Input Specification:Each input file contains one test case. Each case starts w...

2020-04-06 18:12:33 62

原创 PAT Advanced—1010 Radix (25分)

Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is yes, if 6 is a decimal number and 110 is a binary number.Now for any pair of positive integ...

2020-04-05 22:43:55 28

PDF password remove.rar

一款本地安装使用的,pdf文档密码破解工具,可以很方便的破解相应的pdf文档密码,破解 pdf文档密码,可以破解pdf密码,仅供个人学习使用

2020-04-05

空空如也

空空如也

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

TA关注的人 TA的粉丝

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