自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 __mingw_vfprintf 库缺失,LNK2019

在mingw文件夹中找到libmingwex.a 以及libgcc.a,添加到项目中,注意mingw版本和项目版本要一致。

2023-06-16 16:05:50 170

原创 vcpkg安装opencv报错

关闭电脑的病毒保护即可。

2023-04-11 15:19:41 1825 1

原创 vcpkg安装包后cmake报错

这是因为vcpkg默认安装x86版本,而cmake默认是x64版本,所以vcpkg安装时需要指定x64版本。

2023-04-11 15:16:18 870

原创 The C compiler identification is unknown -- The CXX compiler identification is unknown

mac sudo xcode-select --reset

2023-03-29 17:27:59 259

原创 github Someone could be eavesdropping on you right now (man-in-the-middle attack)!错误

然后重新连接。

2023-03-29 17:04:15 94

原创 ssh clone 错误:Connection closed by 20.205.243.166 port 22 fatal: 无法读取远程仓库。

可能是公司内网的原因,换自己的热点就好了。fatal: 无法读取远程仓库。

2023-03-04 19:37:34 321

原创 mac中orphes占用cpu高

是网易云音乐造成的,退出网易云即可。

2023-03-01 23:34:57 216

原创 【无标题】

Mac vscode c++环境配置

2022-09-21 15:12:40 128

原创 Mac vscode 出现 ‘auto‘ type specifier is a C++11 extension [-Wc++11-extensions]

Mac vscode 出现 'auto' type specifier is a C++11 extension [-Wc++11-extensions]

2022-08-09 19:25:08 1420 2

原创 2021年最新mysql windows配置

参考https://zhuanlan.zhihu.com/p/48531203https://www.runoob.com/mysql/mysql-install.html步骤1、安装先去官网下载然后解压到一个文件夹下就好,不需要安装2、配置文件在目录下与bin同一级的文件夹中新建my.ini[mysqld]# 设置3306端口port=3306# 设置mysql的安装目录basedir=D:\Program Files\MySql# 设置mysql数据库的数据的存放目录dat

2021-05-01 20:10:23 293

原创 Leetcode 32

32. Longest Valid Parentheses 最长有效括号题目描述Given a string containing just the characters ‘(’ and ‘)’, find the length of the longest valid (well-formed) parentheses substring.给定一个只包含 '(' 和 ')' 的字符串,找出最长的包含有效括号的子串的长度。思路遇到左右括号问题,考虑使用动态规划或者栈来解决易错点用贪心思路来

2020-07-04 10:11:51 112

原创 07-图6-图6 旅游规划旅游规划 (25 分)

有了一张自驾旅游路线图,你会知道城市间的高速公路长度、以及该公路要收取的过路费。现在需要你写一个程序,帮助前来咨询的游客找一条出发地和目的地之间的最短路径。如果有若干条路径都是最短的,那么需要输出最便宜的一条路径。输入格式:输入说明:输入数据的第1行给出4个正整数N、M、S、D,其中N(2≤N≤500)是城市的个数,顺便假设城市的编号为0~(N−1);M是高速公路的条数;S是出发地的...

2019-08-21 17:06:48 285

原创 06-图3 六度空间 - Easy Version (30 分)

“六度空间”理论又称作“六度分隔(Six Degrees of Separation)”理论。这个理论可以通俗地阐述为:“你和任何一个陌生人之间所间隔的人不会超过六个,也就是说,最多通过五个人你就能够认识任何一个陌生人。”如图1所示。图1 六度空间示意图“六度空间”理论虽然得到广泛的认同,并且正在得到越来越多的应用。但是数十年来,试图验证这个理论始终是许多社会学家努力追求的目标。然而由于...

2019-08-20 17:38:21 194

原创 06-图2 Saving James Bond - Easy Version (25 分)

This time let us consider the situation in the movie "Live and Let Die" in which James Bond, the world's most famous spy, was captured by a group of drug dealers. He was sent to a small piece of land ...

2019-08-20 16:28:22 176

原创 04-树6-树4 Complete Binary Search Tree (30 分)

A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes with keys less than the node's key. ...

2019-08-16 14:36:06 165

原创 04-树5-树4 Root of AVL Tree (25 分)

An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any time they differ by more than one, rebalancing is...

2019-08-15 15:37:24 152

原创 04-树4 是否同一棵二叉搜索树 (25 分)

给定一个插入序列就可以唯一确定一棵二叉搜索树。然而,一棵给定的二叉搜索树却可以由多种不同的插入序列得到。例如分别按照序列{2, 1, 3}和{2, 3, 1}插入初始为空的二叉搜索树,都得到一样的结果。于是对于输入的各种插入序列,你需要判断它们是否能生成一样的二叉搜索树。输入格式:输入包含若干组测试数据。每组数据的第1行给出两个正整数N (≤10)和L,分别是每个序列插入元素的个数和需要检...

2019-08-15 14:42:25 155

原创 03-树3 Tree Traversals Again (25 分)

An inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example, suppose that when a 6-node binary tree (with the keys numbered from 1 to 6) is traversed, the s...

2019-08-14 16:59:22 141

原创 03-树2 List Leavess (25 分)

Given a tree, you are supposed to list all the leaves in the order of top down, and left to right.Input Specification:Each input file contains one test case. For each case, the first line gives a ...

2019-08-14 15:25:13 139

原创 02-线性结构4 Pop SequenceReversing Linked List (25 分)

Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, …, N and pop randomly. You are supposed to tell if a given sequence of numbers is a possible pop sequence of the...

2019-08-13 10:39:36 115

原创 Reversing Linked List

Given a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. For example, given L being 1→2→3→4→5→6, if K=3, then you must output 3→2→1→6→5→4; if K=4,...

2019-08-12 17:00:49 124

原创 最大子序列分而治之方法

2019-08-11 15:48:53 208

原创 windows store 无法访问

在网上找了半天解决办法这篇博客里面的方法都尝试过了https://blog.csdn.net/han12398766/article/details/88068036还是没用结果还是打开IE浏览器,internet选项,高级,重置 就解决了。...

2019-05-30 08:31:46 1147 1

转载 6-1 单链表逆转(20 分)

6-1 单链表逆转(20 分)本题要求实现一个函数,将给定的单链表逆转。函数接口定义:List Reverse( List L );其中List结构定义如下:typedef struct Node *PtrToNode;struct Node { ElementType Data; /* 存储结点数据 */ PtrToNode Next; /* 指向下一个结点的指针 */...

2018-04-14 17:31:07 4038

原创 pta11.2.2

实验11-2-2 学生成绩链表处理(20 分)本题要求实现两个函数,一个将输入的学生成绩组织成单向链表;另一个将成绩低于某分数线的学生结点从链表中删除。函数接口定义:struct stud_node *createlist();struct stud_node *deletelist( struct stud_node *head, int min_score );函数createlist利用...

2018-04-03 17:30:08 591

原创 pta

习题11-8 单链表结点删除(20 分)本题要求实现两个函数,分别将读入的数据存储为单链表、将链表中所有存储了某给定值的结点删除。链表结点定义如下:struct ListNode { int data; ListNode *next;};函数接口定义:struct ListNode *readlist();struct ListNode *deletem( struct Li...

2018-04-03 15:23:39 1085

原创 pat 1019

数字黑洞 (20)给定任一个各位数字不完全相同的4位正整数,如果我们先把4个数字按非递增排序,再按非递减排序,然后用第1个数字减第2个数字,将得到一个新的数字。一直重复这样做,我们很快会停在有“数字黑洞”之称的6174,这个神奇的数字也叫Kaprekar常数。#include//使b变为降序int change( int a){ int b = 0; while ( a !=

2018-01-05 15:16:53 255

原创 1014pat乙

#include#define D(c) (c)>='A'&&(c)#define A(c)  (c)>='0'&&(c)#define B(c)  (c)>='a'&&(c)#define C(c)  c>='A'&&cvoid put(char e);void put2(char f);void put3(int  g);int main(){  cha

2017-12-25 19:34:04 191

原创 pat乙1013

1013. 数素数 (20)时间限制 100 ms内存限制 65536 kB代码长度限制 8000 B判题程序 Standard 作者 CHEN, Yue令Pi表示第i个素数。现任给两个正整数M 4,请输出PM到PN的所有素数。输入格式:输入在一行中给出M和N,其间以空格分隔。输出格式:

2017-12-20 13:44:42 183

原创 pat乙1012

#includeint main(){    int t,a1=0,a2=0,a3=0,a5=0,count=0;;    double a4=0;    int n,i;    int flag=1;    scanf("%d",&n);    for (i=1;i    {        scanf("%d",&t);        switch(t

2017-12-19 16:23:37 176

原创 pat乙1011

首先想用int试一试,果然不行,改为long long,OK#includeint main(){ long long a,b,c,n,i; scanf("%lld",&n); for (i=1;i<=n;i++) { scanf("%lld %lld %lld",&a,&b,&c); if(a+b>c) printf("Case #%lld: tr

2017-12-18 21:30:16 148

原创 pat乙1010

链接 https://www.patest.cn/contests/pat-b-practise/10101010. 一元多项式求导 (25)时间限制 400 ms内存限制 65536 kB代码长度限制 8000 B判题程序 Standard 设计函数求一元多项式的导数。(注:xn(n为整数)的一阶

2017-12-18 20:10:08 202

原创 pat乙卷1009

算法感觉很简单,但是字符串数组的读取出现了问题

2017-12-18 19:44:40 183

空空如也

空空如也

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

TA关注的人

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