2 lonely喆

尚未进行身份认证

我要认证

暂无相关简介

等级
TA的排名 4w+

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

2020-05-26 00:07:16

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

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

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

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

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

查看更多

勋章 我的勋章
  • 签到达人
    签到达人
    累计签到获取,不积跬步,无以至千里,继续坚持!
  • 技术圈认证
    技术圈认证
    用户完成年度认证,即可获得
  • 阅读者勋章Lv2
    阅读者勋章Lv2
    授予在CSDN APP累计阅读博文达到7天的你,是你的坚持与努力,使你超越了昨天的自己。
  • 持之以恒
    持之以恒
    授予每个自然月内发布4篇或4篇以上原创或翻译IT博文的用户。不积跬步无以至千里,不积小流无以成江海,程序人生的精彩需要坚持不懈地积累!
  • 勤写标兵Lv4
    勤写标兵Lv4
    授予每个自然周发布9篇以上(包括9篇)原创IT博文的用户。本勋章将于次周周三上午根据用户上周的博文发布情况由系统自动颁发。
  • 原力探索
    原力探索
    参与《原力计划【第二季】——打卡挑战》的文章入选【每日精选】的博主将会获得此勋章。
  • 学习力
    学习力
    《原力计划【第二季】》第一期主题勋章 ,第一期活动已经结束啦,小伙伴们可以去参加第二期打卡挑战活动获取更多勋章哦。
  • 原力新人
    原力新人
    在《原力计划【第二季】》打卡挑战活动中,成功参与本活动并发布一篇原创文章的博主,即可获得此勋章。
  • 分享学徒
    分享学徒
    成功上传1个资源即可获取