自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 gdown/命令行下载Google Drive文件(大文件也可以)

安装gdown获取Google drive文件(不能是文件夹)的ID复制到的链接大概长下面这个样子,其中加粗的部分就是文件的ID/view?在Python中运行(注意下面的url和上面的不太一样)这个方法对中小型文件可行,但对过大的文件(以上图中40GB的文件为例,文件ID是),会报下面的错这时,就需要使用Token和命令行下载(以下内容参考自。

2023-10-09 13:05:27 4949 4

原创 PyTorch torch.nn.Conv1d计算过程理解

点云的深度学习里面经常用到一维卷积,看了很多讲解的文章,但还是感觉摸不透,索性直接尝试手动复现 Conv1d 的计算过程。

2023-02-27 14:59:09 933 1

原创 腾讯云域名绑定Github Pages(搭配hexo)

腾讯云域名 + Github Page + Hexo

2022-08-30 13:22:44 1147 1

原创 pip换源

pip一键永久/临时换源

2022-08-13 16:28:31 330

原创 使用personal token将hexo本地文件推到GitHub

上次整hexo个人网站是半年前了,之后一直没碰,最近重新开始收拾,记录一下通过personal token完成GitHub认证并将页面推到GitHub上的过程。

2022-07-28 19:18:20 672

原创 浙江大学软件学院 2020 年保研机考 7-4 Shopping With Coupons (C++)

There are NNN items on your shopping list, and you have NNN kinds of coupon that can save you some money on buying any of these items. At the mean time, you have DDD dollars in your pocket. How can you buy as many items as you can? Here you may use any cou

2021-09-19 20:24:14 323

原创 浙江大学软件学院 2020 年保研机考 7-3 Partial School Ranking (C++)

In a Group Programming Contest, each university is supposed to send n students who must compete independently. The universities are ranked according to the total score of their students. Your job is to generate the ranklist.It sounds like a simple problem

2021-09-19 20:16:33 290

原创 浙江大学软件学院 2020 年保研机考 7-1 Standard Form of Polynomial (C++)

The standard form of a polynomial of degree nnn is P(x)=anxn+an−1xn−1+⋯+a1x+a0P(x)=a_nx_n+a_{n−1}x_{n−1}+⋯+a_1x+a_0P(x)=an​xn​+an−1​xn−1​+⋯+a1​x+a0​. Given that an=1a_n=1an​=1 and all the nnn roots r1,...,rn{ r_1, ..., r_n}r1​,...,rn​ of P(x)P(x)P(x) are i

2021-09-19 20:11:31 331

原创 浙江大学计算机与软件学院 2019 年保研机考 7-4 Index of Popularity (C++)

The index of popularity (IP) of someone in his/her circle of friends is defined to be the number of friends he/she has in that circle. Now you are supposed to list the members in any given friend circle with top 3 IP’s.Input Specification:Each input file

2021-09-19 20:06:08 149

原创 浙江大学计算机与软件学院 2019 年保研机考 7-3 Is It An AVL Tree (C++)

In computer science, an AVL tree (Georgy Adelson-Velsky and Evgenii Landis’ tree, named after the inventors) is a self-balancing binary search tree. It was the first such data structure to be invented. In an AVL tree, the heights of the two child subtrees

2021-09-19 20:03:02 171

原创 浙江大学计算机与软件学院 2019 年保研机考 7-2 Zigzag Sequence (C++)

This time your job is to output a sequence of NNN positive integers in a zigzag format with width MMM in non-decreasing order. A zigzag format is to fill in the first row with MMM numbers from left to right, then the second row from right to left, and so o

2021-09-19 20:00:28 163

原创 浙江大学计算机与软件学院 2019 年保研机考 7-1 Happy Numbers (C++)

A happy number is defined by the following process: Starting with any positive integer, replace the number by the sum of the squares of its digits in base-ten, and repeat the process until the number either equals 1 (where it will stay), or it loops endles

2021-09-19 19:55:54 153

原创 PAT 甲级 2021 秋季满分经验贴

首先 diss 一波浙软今年 9.10 通知机试不能用其他成绩代替的操作。再说这次考试,可能也是因为这个成绩不能代替机试,今年秋季的考试难度明显比前几年秋季低,不过还是能看出来今年的题目有些考验心态的意思:第一题是最难的(如果不了解前几年考题的话很容易在第一题上失去自信);图的题目放到了第三题,树的题目放到了最后一题,而且对我来说还第四题还涉及到了一个新的概念,再加上做这道题的时候整个人的状态都不好(肚子不舒服),所以这道题还是卡了一会的。就像我上面第一条说的,往年的第一题都不是最简单的,我看.

2021-09-13 22:12:06 1783 3

原创 PAT-2021年秋季考试 - 甲级 7-4 Sorted Cartesian Tree (C++)

A Sorted Cartesian tree is a tree of (key, priority) pairs. The tree is heap-ordered according to the priority values, and an inorder traversal gives the keys in sorted order. For example, given the pairs { (55, 8), (58, 15), (62, 3), (73, 4), (85, 1), (88

2021-09-13 21:39:04 656 1

原创 PAT-2021年秋季考试 - 甲级 7-3 Playground Exploration (C++)

A playground is equipped with ball pits and tents connected by tunnels. Kids can crawl through the tunnels to meet their friends at a spot with a tent or a ball pit.Now let’s mark each meeting spot (a tent or a ball pit) by a number. Assume that once a k.

2021-09-13 21:31:06 532

原创 PAT-2021年秋季考试 - 甲级 7-2 Stack of Hats (C++)

PATers believe that wearing hats makes them look handsome, so wherever they go, everyone of them would wear a hat. One day they came to a restaurant, a waiter collected their hats and piled them up. But then when they were ready to leave, they had to face.

2021-09-13 21:26:14 850

原创 PAT-2021年秋季考试 甲级 7-1 Arrays and Linked Lists (C++)

Let’s design a data structure AAA that combines arrays and linked lists as the following:At the very beginning, an integer array A0A_0A0​ of length L0L_0L0​ is initialized for the user. When the user tries to access the iiith element A[i]A[i]A[i], if 0≤i&

2021-09-13 21:12:48 680

原创 PAT(甲级)2019年秋季考试 7-1 Forever (C++)

“Forever number” is a positive integer AAA with KKK digits, satisfying the following constrains:the sum of all the digits of AAA is mmm;the sum of all the digits of A+1A+1A+1 is nnn; andthe greatest common divisor of mmm and nnn is a prime number which

2021-09-09 20:39:36 129

原创 PAT(甲级)2019年秋季考试 7-4 Dijkstra Sequence (C++)

Dijkstra’s algorithm is one of the very famous greedy algorithms. It is used for solving the single source shortest path problem which gives the shortest paths from one particular source vertex to all the other vertices of the given graph. It was conceived

2021-09-09 20:31:17 175

原创 PAT(甲级)2019年秋季考试 7-3 Postfix Expression (C++)

Given a syntax tree (binary), you are supposed to output the corresponding postfix expression, with parentheses reflecting the precedences of the operators.Input Specification:Each input file contains one test case. For each case, the first line gives a

2021-09-09 20:23:46 191

原创 PAT(甲级)2019年秋季考试 7-2 Merging Linked Lists (C++)

Given two singly linked lists L1=a1→a2→⋯→an−1→anL_1=a_1→a_2→⋯→a_{n−1}→a_nL1​=a1​→a2​→⋯→an−1​→an​ and L2=b1→b2→⋯→bm−1→bmL_2=b_1→b_2→⋯→b_{m−1}→b_mL2​=b1​→b2​→⋯→bm−1​→bm​. If n≥2mn≥2mn≥2m, you are supposed to reverse and merge the shorter one into the longer

2021-09-09 20:19:55 234

原创 PTA甲级 1033 To Fill or Not to Fill (C++)

With highways available, driving a car from Hangzhou to any other city is easy. But since the tank capacity of a car is limited, we have to find gas stations on the way from time to time. Different gas station may give different price. You are asked to car

2021-09-09 11:30:51 78

原创 PAT(甲级)2020年秋季考试 7-4 Professional Ability Test (C++)

Professional Ability Test (PAT) consists of several series of subject tests. Each test is divided into several levels. Level A is a prerequisite (前置要求) of Level B if one must pass Level A with a score no less than SSS in order to be qualified to take Level

2021-09-08 21:22:14 464

原创 PAT(甲级)2020年秋季考试 7-3 Left-View of Binary Tree (C++)

The left-view of a binary tree is a list of nodes obtained by looking at the tree from left hand side and from top down. For example, given a tree shown by the figure, its left-view is { 1, 2, 3, 4, 5 }Given the inorder and preorder traversal sequences o

2021-09-08 20:06:11 262

原创 PAT(甲级)2020年秋季考试 7-2 How Many Ways to Buy a Piece of Land (C++)

The land is for sale in CyberCity, and is divided into several pieces. Here it is assumed that each piece of land has exactly two neighboring pieces, except the first and the last that have only one. One can buy several contiguous(连续的) pieces at a time. No

2021-09-08 20:03:32 141

原创 PAT(甲级)2020年秋季考试 7-1 Panda and PP Milk (C++)

PP milk (盆盆奶)is Pandas’ favorite. They would line up to enjoy it as show in the picture. On the other hand, they could drink in peace only if they believe that the amount of PP milk is fairly distributed, that is, fatter panda can have more milk, and the .

2021-09-08 19:59:48 132

原创 PTA甲级 1114 Family Property (C++)

This time, you are supposed to help us collect the data for family-owned property. Given each person’s family members, and the estate(房产)info under his/her own name, we need to know the size of each family, and the average area and number of sets of their

2021-09-06 18:22:13 98

原创 PTA甲级 1135 Is It A Red-Black Tree (C++)

There is a kind of balanced binary search tree named red-black tree in the data structure. It has the following 5 properties:(1) Every node is either red or black.(2) The root is black.(3) Every leaf (NULL) is black.(4) If a node is red, then both its

2021-09-06 13:43:51 230

原创 PTA甲级 1018 Public Bike Management (C++)

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

2021-09-06 10:54:13 120

原创 PTA甲级 1139 First Contact (C++)

Unlike in nowadays, the way that boys and girls expressing their feelings of love was quite subtle in the early years. When a boy A had a crush on a girl B, he would usually not contact her directly in the first place. Instead, he might ask another boy C,

2021-09-05 12:12:46 1458

原创 PTA甲级 1091 Acute Stroke (C++)

One important factor to identify acute stroke (急性脑卒中) is the volume of the stroke core. Given the results of image analysis in which the core regions are identified in each MRI slice, your job is to calculate the volume of the stroke core.Input Specificat

2021-09-04 16:42:58 88

原创 PTA甲级 1056 Mice and Rice (C++)

Mice and Rice is the name of a programming contest in which each programmer must write a piece of code to control the movements of a mouse in a given map. The goal of each mouse is to eat as much rice as possible in order to become a FatMouse.First the pl

2021-09-04 12:49:43 141

原创 PTA甲级 1148 Werewolf - Simple Version (C++)

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

2021-09-04 11:43:46 273

原创 PTA甲级 1021 Deepest Root (C++)

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

2021-09-03 22:07:04 148

原创 PTA甲级 1057 Stack (C++)

Stack is one of the most fundamental data structures, which is based on the principle of Last In First Out (LIFO). The basic operations include Push (inserting an element onto the top position) and Pop (deleting the top element). Now you are supposed to im

2021-09-03 18:26:32 105

原创 PTA甲级 1095 Cars on Campus (C++)

Zhejiang University has 8 campuses and a lot of gates. From each gate we can collect the in/out times and the plate numbers of the cars crossing the gate. Now with all the information available, you are supposed to tell, at any specific time point, the num

2021-09-03 13:27:18 108

原创 PTA甲级 1076 Forwards on Weibo (C++)

Weibo is known as the Chinese version of Twitter. One user on Weibo may have many followers, and may follow many other users as well. Hence a social network is formed with followers relations. When a user makes a post on Weibo, all his/her followers can vi

2021-09-02 16:24:10 92

原创 PTA甲级 1094 The Largest Generation (C++)

A family hierarchy is usually presented by a pedigree tree where all the nodes on the same level belong to the same generation. Your task is to find the generation with the largest population.Input Specification:Each input file contains one test case. Ea

2021-09-02 15:40:42 85 1

原创 PTA甲级 1030 Travel Plan (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 path between his/her starting city and the destination. If suc

2021-09-02 11:37:13 103

原创 PTA甲级 1004 Counting Leaves (C++)

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 with a line containing 0<N<1000<N<1000<N&l

2021-09-02 11:13:32 84

空空如也

空空如也

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

TA关注的人

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