自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Unity 3D提示“No valid unity editor license found, please active your license”如何解决?

Unity 3D提示“No valid unity editor license found, please active your license”的解决方法

2022-11-21 15:44:36 23329

原创 1027. 打印沙漏(20) Python代码极简AC

本题要求你写个程序把给定的符号打印成沙漏的形状。例如给定17个“*”,要求按下列格式打印***** *** * ********所谓“沙漏形状”,是指每行输出奇数个符号;各行符号中心对齐;相邻两行符号数差2;符号数先从大到小顺序递减到1,再从小到大顺序递增;首尾符号数相等。给定任意N个符号,不一定能正好组成一个沙漏。要求打印出的沙漏能用掉尽可能多的符号。输入格式:...

2019-10-10 19:37:49 775

原创 1154 Vertex Coloring vector pair int int v unordered_set int colors

//1154 Vertex Coloring (25 分)//#include <iostream>//#include <vector>//using namespace std;//const int MAXV = 10010;//const int INF = 1000000000;//int n, m, a, b, k;//vector<int...

2019-03-20 22:01:55 180

原创 1153 Decode Registration Card of PAT

1153Decode Registration Card of PAT(25分)A registration card number of PAT consists of 4 parts:the 1st letter represents the test level, namely,Tfor the top level,Afor advance andBfor basi...

2019-03-13 22:02:41 170

原创 1152 Google Recruitment (20 分)

//1152 Google Recruitment :Find prime#include &lt;cstdio&gt;#include&lt;string&gt;#include&lt;iostream&gt;#include&lt;vector&gt;using namespace std;bool find(string a) { int b = stoi(a); int...

2019-02-11 21:36:49 449 2

原创 1102. Invert a Binary Tree (25)

1102. Invert a Binary Tree (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueThe following is from Max Howell @twitter:Google: 90% of our engineers use the software you wrote (Homebrew), b...

2018-03-30 14:57:39 123

原创 1101. Quick Sort (25)

1101. Quick Sort (25)时间限制200 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CAO, PengThere is a classical process named partition in the famous quick sort algorithm. In this process we typically choose one ...

2018-03-30 12:56:35 176

原创 1141. PAT Ranking of Institutions (25)

1141. PAT Ranking of Institutions (25)时间限制500 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueAfter each PAT, the PAT Center will announce the ranking of institutions based on their students' perfor...

2018-03-29 14:45:18 100

原创 1143. Lowest Common Ancestor (30)

1143. Lowest Common Ancestor (30)时间限制200 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueThe lowest common ancestor (LCA) of two nodes U and V in a tree is the deepest node that has both U and V as ...

2018-03-29 10:34:10 110

原创 1142. Maximal Clique (25)

1142. Maximal Clique (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueA clique is a subset of vertices of an undirected graph such that every two distinct vertices in the clique are adjac...

2018-03-28 19:34:58 97

原创 1140. Look-and-say Sequence (20)

1140. Look-and-say Sequence (20)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueLook-and-say sequence is a sequence of integers as the following:D, D1, D111, D113, D11231, D112213111, ...wh...

2018-03-28 15:37:36 100

原创 1146. Topological Order (25)

1146. Topological Order (25)时间限制200 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueThis is a problem given in the Graduate Entrance Exam in 2018: Which of the following is NOT a topological order o...

2018-03-28 14:57:39 175

原创 树的遍历

// 树的遍历.cpp#include &lt;iostream&gt;#include &lt;vector&gt;using namespace std;vector&lt;int&gt;v, p, q, r;int m;void PostTraverse(int i) { if (i &lt;= m) { PostTraverse(2 * i); PostTravers...

2018-03-27 21:20:54 98

原创 1147. Heaps (30)

1147. Heaps (30)时间限制200 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueIn computer science, a heap is a specialized tree-based data structure that satisfies the heap property: if P is a parent node...

2018-03-27 20:46:34 102

原创 1104. Sum of Number Segments (20)

1104. Sum of Number Segments (20)时间限制200 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CAO, PengGiven a sequence of positive numbers, a segment is defined to be a consecutive subsequence. For example, give...

2018-03-25 13:00:46 119

原创 PAT (Advanced Level)1109. Group Photo (25)

1109. Group Photo (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueFormation is very important when taking a group photo. Given the rules of forming K rows with N people as the following:...

2018-03-19 11:23:04 190

原创 PAT (Advanced Level)1107. Social Clusters (30)并查集

1107. Social Clusters (30)时间限制1000 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueWhen register on a social network, you are always asked to specify your hobbies in order to find some potential fri...

2018-03-19 09:14:47 114

原创 毕设前奏(java回顾)

package com.company;import java.util.*;import java.text.DateFormat;import java.text.SimpleDateFormat;public class Main { public static void print(int index,Object obj){ System.out....

2018-03-18 21:33:30 190

原创 PAT (Advanced Level)1113. Integer Set Partition (25)

1113. Integer Set Partition (25)时间限制150 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueGiven a set of N (&gt; 1) positive integers, you are supposed to partition them into two disjoint sets A1 and ...

2018-03-13 14:40:22 127

原创 PAT (Advanced Level)1115. Counting Nodes in a BST (30)

1115. Counting Nodes in a BST (30)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueA Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The le...

2018-03-13 11:03:37 155

原创 PAT (Advanced Level)1117. Eddington Number(25)

1117. Eddington Number(25)时间限制250 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueBritish astronomer Eddington liked to ride a bike. It is said that in order to show off his skill, he has even defin...

2018-03-12 22:19:59 227

原创 PAT (Advanced Level)1118. Birds in Forest (25)&&1114. Family Property (25)并查集找爸爸

1114与1118为同一知识点,遂放在一起并查集知识点,没接触过。看到这道题真的思考了好久没有思路。网上查了大佬的解析和代码豁然开朗。当初在另外一本书上看见过并查集知识点,讲的云里雾里,太过于功力就放弃了。在网上看见了这版讲解,通俗易懂非常好。所以我认为并查集其实就是一个找爸爸的过程QAQ。以下为转载至上述连接的并查集内容话说江湖上散落着各式各样的大侠,有上千个之多。他们没有什么正当职业,整天背着...

2018-03-12 21:42:16 227

原创 前序和后序什么时候可以确定一棵树

一般情况下,已知二叉树的前序和后序是无法唯一确定一颗二叉树的,因为可能存在多种情况,即一个结点可能是根的左孩子也有可能是根的右孩子。前序的开始的第一个与后序的最后一个是相等的,这个结点就是根结点,以后序的根结点的前面一个结点作为参考,寻找这个结点在前序中的位置,如果这个位置的前一个位置的节点不是上一次遍历的前序序列中第一个起始节点,则部分唯一。递归进行下去,如果直到递归结束,上述条件持续成立,则该...

2018-03-12 16:49:53 6874 1

原创 PAT (Advanced Level)1120. Friend Numbers (20)

1120. Friend Numbers (20)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueTwo integers are called "friend numbers" if they share the same sum of their digits, and the sum is their "friend ID"...

2018-03-12 15:11:04 131

原创 PAT (Advanced Level)1121. Damn Single (25)第二个测试点过不去,求助

1121. Damn Single (25)时间限制300 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, Yue"Damn Single (单身狗)" is the Chinese nickname for someone who is being single. You are supposed to find those who are alon...

2018-03-12 14:26:44 445 3

原创 1123. Is It a Complete AVL Tree (30)(不会)

1123. Is It a Complete AVL Tree (30)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueAn AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees ...

2018-03-12 11:13:50 156

原创 PAT (Advanced Level)1124. Raffle for Weibo Followers (20)

1124. Raffle for Weibo Followers (20)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueJohn got a full mark on PAT. He was so happy that he decided to hold a raffle(抽奖) for his followers on We...

2018-03-11 21:39:35 171

原创 PAT (Advanced Level)1125. Chain the Ropes (25)

1125. Chain the Ropes (25)时间限制200 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueGiven some segments of rope, you are supposed to chain them into one rope. Each time you may only fold two segments ...

2018-03-11 17:55:59 82

原创 PAT (Advanced Level)1127. ZigZagging on a Tree (30)

1127. ZigZagging on a Tree (30)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueSuppose that all the keys in a binary tree are distinct positive integers. A unique binary tree can be determin...

2018-03-11 15:04:22 94

原创 PAT (Advanced Level)1134. Vertex Cover (25) set的find函数

1134. Vertex Cover (25)时间限制600 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueA vertex cover of a graph is a set of vertices such that each edge of the graph is incident to at least one vertex of t...

2018-03-09 17:42:15 114

原创 PAT (Advanced Level)1135. Is It A Red-Black Tree (30) 指针 建树 深度优先遍历

1135. Is It A Red-Black Tree (30)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueThere is a kind of balanced binary search tree named red-black tree in the data structure. It has the followi...

2018-03-09 14:54:40 123

原创 PAT (Advanced Level)1136. A Delayed Palindrome (20)

1136. A Delayed Palindrome (20)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueConsider a positive integer N written in standard notation with k+1 digits ai as ak...a1a0 with 0 &lt;= ai &lt;...

2018-03-08 21:27:19 131

原创 PAT (Advanced Level)1139. First Contact (30)

题目链接1139. First Contact (30)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueUnlike in nowadays, the way that boys and girls expressing their feelings of love was quite subtle in the early ye...

2018-03-08 13:45:17 394

原创 PAT (Advanced Level)1037. Magic Coupon (25)

题目链接1037. Magic Coupon (25)时间限制100 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueThe magic shop in Mars is offering some magic coupons. Each coupon has an integer N printed on it, meaning that whe...

2018-03-07 16:14:23 93

原创 PAT (Advanced Level)1036. Boys vs Girls (25)

题目链接1036. Boys vs Girls (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueThis time you are asked to tell the difference between the lowest grade of all the male students and the highest g...

2018-03-07 15:10:17 129

原创 PAT (Advanced Level)1035. Password (20)

题目链接1035. Password (20)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueTo prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem is that there are a...

2018-03-07 14:16:06 99

原创 PAT (Advanced Level)1034. Head of a Gang (30) map的灵活运用

题目链接1034. Head of a Gang (30)时间限制100 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueOne way that the police finds the head of a gang is to check people's phone calls. If there is a phone call betwe...

2018-03-07 13:27:01 127

原创 PAT (Advanced Level)1032. Sharing (25)

题目链接1032. Sharing (25)时间限制100 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueTo store English words, one method is to use linked lists and store a word letter by letter. To save some space, we may ...

2018-03-06 18:26:49 114

原创 PAT (Advanced Level)1031. Hello World for U (20)

题目链接1031. Hello World for U (20)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueGiven any string of N (&gt;=5) characters, you are asked to form the characters into the shape of U. For examp...

2018-03-06 17:00:01 109

原创 PAT (Advanced Level)1030. Travel Plan (30) dfs

题目链接1030. Travel Plan (30)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueA traveler's map gives the distances between cities along the highways, together with the cost of each highway. Now ...

2018-03-06 15:18:58 90

空空如也

空空如也

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

TA关注的人

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