自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 【SpringBoot Controller 同名不同包造成冲突无法启动问题】

【代码】【SpringBoot Controller 同名不同包造成冲突无法启动问题】

2023-04-16 16:05:29 639 1

原创 【SpringBoot mapper层直接赋值给pojo层,解决代码冗余!】

代码过于冗余,可以用 Spring 自带的工具类。当 pojo 层的实例属性过多时,一个个手写。

2023-04-15 20:08:46 170

原创 ubuntu配置ssh

3、允许被登录root。

2023-03-29 15:46:10 758

原创 ubuntu20.04 编译tamarin-prover,报错/usr/bin/ld.gold: error: cannot find -lgmp

【代码】ubuntu20.04 编译tamarin-prover,报错/usr/bin/ld.gold: error: cannot find -lgmp。

2023-03-29 14:02:03 259

原创 记搭建Tamarin-prover过程中遇到的一些问题以及相应的解决方法

另外brew在下载到其中一个包是总是报错链接github443错误,在网上查了很多资料都没有用,后来尝试性的在主机安装了clash,并设置虚拟机端口转发,让虚拟机也能走主机代理,再次。安装过程中报错,看了下错误日志怀疑是gcc的问题,由于gcc真的是牵一发动全身,在得知要安装的tamarin与ubuntu版本关联不大后,遂决定抛弃16.04安装更加稳定的20.04版本,经历过漫长的下载,安装,换源后,重新安装tamarin,发现直接安装成功。将tamarin的交互页面映射到主机,以方便查看。

2023-03-16 19:42:23 782 1

原创 #1049. Counting Ones【数位DP】

原题链接Problem Description:The task is simple: given any positive integer NNN, you are supposed to count the total number of 1’s in the decimal form of the integers from 1 to NNN. For example, given NNN being 12, there are five 1’s in 1, 10, 11, and 12.Inp

2022-02-28 13:53:59 113

转载 Git 中 push 错误

Git 中 push 错误OpenSSL SSL_read: Connection was reset, errno 10054现象在Git Bash 中,上传(push)时,出现异常。git push -u origin main处理方法PS: 以下是我个人遇到时的几种解决方法整理Solution1: (原因)自己配置的用户名,邮箱可能输入错误了。查看用户名,邮箱git config user.namegit config user.email修改,用户名,邮箱git config

2021-12-21 14:09:09 234

原创 #1113. Integer Set Partition【贪心】

原题链接Problem Description:Given a set of NNN (>1>1>1) positive integers, you are supposed to partition them into two disjoint sets A1A_1A1​ and A2A_2A2​ of n1n_1n1​ and n2n_2n2​ numbers, respectively. Let S1S_1S1​ and S2S_2S2​ denote the sums of a

2021-11-22 09:15:03 102

原创 #1114. Family Property【并查集】

原题链接Problem Description: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 an

2021-11-21 20:56:58 350

原创 #1089. Insert or Merge【排序】

原题链接Problem Description:According to Wikipedia:Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insertion sort removes one element from the input data, finds the location it belongs

2021-11-21 19:18:33 210

原创 #1098. Insertion or Heap Sort【排序】

原题链接Problem Description:According to Wikipedia:Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insertion sort removes one element from the input data, finds the location it belongs

2021-11-21 17:29:45 256

原创 #1080. Graduate Admission【模拟 + 排序】

原题链接Problem Description:It is said that in 2011, there are about 100 graduate schools ready to proceed over 40,000 applications in Zhejiang Province. It would help a lot if you could write a program to automate the admission procedure.Each applicant wil

2021-11-13 14:49:59 220

原创 #1095. Cars on Campus【模拟 + 字符串处理 + 哈希】

原题链接Problem Description: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 sp

2021-11-13 10:13:02 260

原创 #1109. Group Photo【模拟 + 排序】

原题链接Problem Description:Formation is very important when taking a group photo. Given the rules of forming KKK rows with NNN people as the following:The number of people in each row must be N/K (round down to the nearest integer), with all the extra pe

2021-11-12 21:53:38 215

原创 #1062. Talent and Virtue【模拟 + 排序】

原题链接Problem Description:About 900 years ago, a Chinese philosopher Sima Guang wrote a history book in which he talked about people’s talent and virtue. According to his theory, a man being outstanding in both talent and virtue must be a “sage(圣人)”; being

2021-11-12 10:12:54 93

原创 #1105. Spiral Matrix【模拟】

原题链接Problem Description:This time your job is to fill a sequence of NNN positive integers into a spiral matrix in non-increasing order. A spiral matrix is filled in from the first element at the upper-left corner, then move in a clockwise spiral. The mat

2021-11-12 09:36:15 102

原创 #1128. N Queens Puzzle【模拟 + 排序】

原题链接Problem Description:The “eight queens puzzle” is the problem of placing eight chess queens on an 8×88\times 88×8 chessboard so that no two queens threaten each other. Thus, a solution requires that no two queens share the same row, column, or diagona

2021-11-11 19:11:32 101

原创 #1129. Recommendation System【模拟 + 排序】

原题链接Problem Description:Recommendation system predicts the preference that a user would give to an item. Now you are asked to program a very simple recommendation system that rates the user’s preference by the number of times that an item has been access

2021-11-11 17:04:00 230

原创 #1140. Look-and-say Sequence【模拟】

原题链接Problem Description:Look-and-say sequence is a sequence of integers as the following:D, D1, D111, D113, D11231, D112213111, ...where D is in [0, 9] except 1. The (n+1)st number is a kind of description of the nth number. For example, the 2nd numbe

2021-11-11 13:28:50 241

原创 #1044. Shopping in Mars【双指针 + 前缀和】

原题链接Problem Description:Shopping in Mars is quite a different experience. The Mars people pay by chained diamonds. Each diamond has a value (in Mars dollars M$). When making the payment, the chain can be cut at any position for only once and some of the

2021-11-10 17:59:09 213

原创 #1057. Stack【栈 + 堆 + set】

原题链接Problem Description: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).

2021-11-09 21:01:53 86

原创 #1055. The World‘s Richest【堆 + 多路归并】

原题链接Problem Description:Forbes magazine publishes every year its list of billionaires based on the annual ranking of the world’s wealthiest people. Now you are supposed to simulate this job, but concentrate only on the people in a certain range of ages.

2021-11-07 16:25:56 1278

原创 #1051. Pop Sequence【栈 + 模拟】

原题链接Problem Description:Given a stack which can keep MMM numbers at most. Push NNN numbers in the order of 1,2,3,…,N1, 2, 3, \ldots, N1,2,3,…,N and pop randomly. You are supposed to tell if a given sequence of numbers is a possible pop sequence of the st

2021-11-07 13:26:05 86

原创 #1148. Werewolf - Simple Version【枚举 + 模拟】

原题链接Problem Description: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.”;payer #2 said: “Player #3 is a human.”;playe

2021-11-07 10:50:55 117

原创 #1085. Perfect Sequence【双指针 + 二分】

原题链接Problem Description:Given a sequence of positive integers and another positive integer ppp. The sequence is said to be a perfect sequence if M≤m×pM\leq m\times pM≤m×p where MMM and mmm are the maximum and minimum numbers in the sequence, respectively

2021-11-04 16:46:39 79

原创 #1029. Median【二路归并】

原题链接Problem Description:Given an increasing sequence S of N integers, the median is the number at the middle position. For example, the median of S1 = { 11, 12, 13, 14 } is 12, and the median of S2 = { 9, 10, 15, 16, 17 } is 15. The median of two sequenc

2021-11-04 13:38:28 94

原创 #1056. Mice and Rice【模拟】

原题链接Problem Description: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 becom

2021-11-04 09:34:19 108

原创 #1096. Consecutive Factors【数论 + 模拟】

原题链接Problem Description:Among all the factors of a positive integer NNN, there may exist several consecutive numbers. For example, 630630630 can be factored as 3×5×6×73\times 5\times 6\times 73×5×6×7, where 5, 6, and 7 are the three consecutive numbers.

2021-11-03 21:23:50 72

原创 #1088. Rational Arithmetic【模拟】

原题链接Problem Description:For two rational numbers, your task is to implement the basic arithmetics, that is, to calculate their sum, difference, product and quotient.Input Specification:Each input file contains one test case, which gives in one line the

2021-11-03 17:54:03 261

原创 #1112. Stucked Keyboard【模拟】

原题链接Problem Description:On a broken keyboard, some of the keys are always stucked. So when you type some sentences, the characters corresponding to those keys will appear repeatedly on screen for kkk times.Now given a resulting string on screen, you are

2021-11-03 16:09:17 89

原创 #1133. Splitting A Linked List【链表】

原题链接Problem Description:Given a singly linked list, you are supposed to rearrange its elements so that all the negative values appear before all of the non-negatives, and all the values in [0,K][0, K][0,K] appear before all those greater than KKK. The or

2021-11-03 13:55:40 83

原创 #1097. Deduplication on a Linked List【链表】

原题链接Problem Description:Given a singly linked list LLL with integer keys, you are supposed to remove the nodes with duplicated absolute values of the keys. That is, for each value KKK, only the first node of which the value or absolute value of its key e

2021-11-03 13:06:27 68

原创 #1074. Reversing Linked List【链表】

原题链接Problem Description:Given a constant KKK and a singly linked list LLL, you are supposed to reverse the links of every KKK elements on LLL. For example, given LLL being 1→2→3→4→5→6, if K=3K =3K=3, then you must output 3→2→1→6→5→4; if K=4K = 4K=4, you

2021-11-02 21:44:16 82

原创 #1032. Sharing【链表】

原题链接Problem Description:To store English words, one method is to use linked lists and store a word letter by letter. To save some space, we may let the words share the same sublist if they share the same suffix. For example, loading and being are stored

2021-11-02 20:53:48 95

原创 #1072. Gas Station【最短路 + Dijkstra】

原题链接Problem Description:A gas station has to be built at such a location that the minimum distance between the station and any of the residential housing is as far away as possible. However it must guarantee that all the houses are in its service range.

2021-11-02 20:22:27 90

原创 #1076. Forwards on Weibo【图论 + BFS】

原题链接Problem Description: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, al

2021-11-02 17:59:22 72

原创 #1150. Travelling Salesman Problem【图论 + 模拟】

原题链接Problem Description: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

2021-11-01 19:45:06 77

原创 #1142. Maximal Clique【图论 + 模拟】

原题链接Problem Description:A clique is a subset of vertices of an undirected graph such that every two distinct vertices in the clique are adjacent. A maximal clique is a clique that cannot be extended by including one more adjacent vertex. (Quoted from htt

2021-11-01 17:43:17 125

原创 #1139. First Contact【图论 + 模拟】

原题链接Problem Description: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

2021-11-01 17:32:38 239

原创 #1134. Vertex Cover【图论 + 模拟】

原题链接Problem Description:A 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 the set. Now given a graph with several vertex sets, you are supposed to tell if each of them is a vertex cover

2021-10-31 10:21:01 86

空空如也

空空如也

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

TA关注的人

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