自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 anaconda配置报错

执行以上命令后,conda会复制旧环境到新环境,并将旧环境中的所有包和依赖项复制到新环境中,同时用新名称替换旧名称。请注意,这些步骤并不会复制任何非Python依赖项(例如操作系统库或C/C++库),因此在使用新的conda环境之前,请确保所有所需的非Python依赖项都已安装。当出现这个错误时,Conda会尝试使用“flexible solve”模式来解决环境依赖关系,该模式允许Conda在保持尽可能多的包版本的情况下,动态选择一些包的版本以解决环境依赖关系。如果文件不存在,则将显示错误消息。

2023-04-06 22:46:50 2040

原创 CUDA_LIB_PATH和CUDA_SDK_LIB_PATH的联系与区别

CUDA_LIB_PATH是用于指定CUDA的库文件路径,其中%CUDA_PATH%是CUDA安装目录的路径,x64是针对64位操作系统的路径。在这个路径下,存储了许多CUDA的库文件,如cudart.lib等,这些库文件是编译CUDA程序所必需的。CUDA_SDK_LIB_PATH是用于指定CUDA SDK的库文件路径,其中%CUDA_SDK_PATH%是CUDA SDK的安装目录路径,x64是针对64位操作系统的路径。在这个路径下,存储了许多CUDA SDK示例程序和库文件,如cutil.lib等,这些

2023-04-06 10:48:23 843

原创 人脸表情识别系统(VGG_16和Xception模型)配置GPU加速,Fer2013数据集和CK+数据集,tensorboard

表情识别系统设计与开发

2022-06-17 12:54:21 4051 14

原创 操作系统经典 pv过桥问题

Semophere bridge=1;Semophere mutexNS=1,mutexSN=1;//用于保护countNS,countSN int countNS=0,countSN=0; Semophere s1=1,s2=0;//用于交替通过 StoN(){ while(1){ P(mutexSN); countSN++;//来车了 v(mutexSN); p(mutexSN); if(countNS==0){//对面无车,则直接通过 P(bridge).

2021-12-15 15:58:55 2835

原创 树的存储结构(二叉树表示法)

#include<iostream>#include<algorithm>#include<queue>#include<stack>using namespace std;int cnt=0;typedef struct CSNode{ char data; struct CSNode *firstchild,*nextsibling; }CSNode,*CSTree;CSTree CreateCSTree(){ char ch; C

2021-12-12 16:46:26 576

原创 层序构造二叉树 c/c++

#include<iostream>#include<queue>#include<algorithm>using namespace std;const int maxn=1010; int i=1; char ch;typedef struct Node{ char val; struct Node *left; struct Node *right;}TreeNode,*BiTree;TreeNode *create(){ queue&lt

2021-12-12 16:37:53 781

原创 第三方包(pyodbc)连接Sql Server数据库

import pyodbcclass database: def __init__(self): #连接Sql Server数据库 self.conn = pyodbc.connect( 'DRIVER={SQL Server};' 'SERVER=127.0.0.1,1433;' 'DATABASE=textbook;' 'UID=sa;' 'P

2021-12-12 14:25:51 817

原创 python实现图形界面设计+数据库(pyodbc)教材征订系统

python实现图形界面设计+数据库(pyodbc)教材征订系统

2021-12-12 14:22:55 2056 9

原创 图(简单路径) c/c++

#include"邻接表存储结构.cpp"int len=0;//记录当前路径长度 int path[MAXVEX]; //bool visited[MAXVEX];//创建邻接表void Create(GraphAdjList &G){ int i,j,k; EdgeNode *p; printf("输入顶点数和边数:\n"); cin>>G.numVertexes>>G.numEdges; //输入顶点信息 pri

2021-12-09 19:00:21 1053

原创 while(n--)和while(--n)的区别(c/c++)

#include<iostream>using namespace std;int main(){ /* n--是先判断后减 --n是先减后判断 */ int n=2,m=2; while(n--){//while循环函数体要求为真,即(n>=1) cout<<n; }//执行过程:1.先判断 n=2>=1 ,然后减1,输出1; 2. 1>=1,然后减1,输出0 cout<<endl; whil

2021-09-13 18:38:02 689

原创 图论:拓扑排序

拓扑排序:在图论中,由一个有向无环图的顶点组成的序列,当且仅当满足下列条件时,称为该图的一个拓扑排序。1、每个顶点出现且只出现一次2、若顶点A在序列中排在顶点B的前面,则在图中不存在从顶点B到顶点A的路径。引言:#include"邻接表创建有向图.cpp"这个邻接表创建有向图的cpp头文件,写法参考上篇博客 “邻接表建立无向图 c/c++” ,去掉建立边表的第二个头插法即可~链接:https://blog.youkuaiyun.com/m0_46229882/article/details/118.

2021-07-15 16:41:33 306

原创 c如何实现c++的引用

void InsertBST(AVLTreeNode *&root)其中AVLTreeNode是自定义的一个数据结构这里用的是C++的引用,把树的根节点传入函数内修改,如果要用纯C写,应该怎么写。------解决方案--------------------**执向指针的指针------解决方案--------------------add(&e)—调用方法add(int *z)—函数定义...

2021-07-14 16:47:37 299

原创 邻接表建立无向图 c/c++

#include <stdio.h>#include <stdlib.h>#include<iostream>#define MAXVEX 20typedef char VertexType;using namespace std;//边表结点 typedef struct EdgeNode{ int adjvex; struct EdgeNode *next;}EdgeNode;//顶点表结点typedef struct Verte

2021-07-14 16:12:40 622

原创 LeetCode 83. 删除排序链表中的重复元素

版本一class Solution {public: ListNode* deleteDuplicates(ListNode* head) { if(head==NULL)return head; ListNode * L=new ListNode(-1); L->next=head; while(head->next!=NULL){ ListNode* node=head->next;.

2021-07-12 16:16:57 83

原创 解决SQLSever配置管理器不见了

错误:在与SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且SQL Server 已配置为允许远程连接。provider:Named Pipes Provider,error:40-无法打开到SQL Server 的连接)(Microsoft SQL Server,错误:2) L3系统找不到指定的文件。因为 SQL Server 配置管理器是 Microsoft 管理控制台程序的一个管理单元而不是单独的程序,所以SQL Server

2021-07-12 15:15:31 5046

原创 Leetcode 24. 两两交换链表中的节点

给定一个链表,两两交换其中相邻的节点,并返回交换后的链表。你不能只是单纯的改变节点内部的值,而是需要实际的进行节点交换。示例 1:输入:head = [1,2,3,4]输出:[2,1,4,3]class Solution {public: ListNode* swapPairs(ListNode* head) { //递归 //结束条件 head==null||head->next==null // 本层递归 i

2021-07-12 14:56:21 80

原创 力扣897. 递增顺序搜索树

class Solution {public: void dfs(TreeNode* root,vector<int>& v){ if(root==nullptr)return ; dfs(root->left,v); v.push_back(root->val); dfs(root->right,v); } TreeNode* increasingBST(TreeNode* r.

2021-05-13 20:07:16 78

原创 力扣 104 二叉树的最大深度

class Solution {public: int maxDepth(TreeNode* root) { if(root==nullptr)return 0; queue<TreeNode*>q; q.push(root); int ans=0; while(!q.empty()){ int t=q.size();//每层的节点数 while(t--){ .

2021-05-13 20:02:58 113

原创 LeetCode 63. Unique Paths II(DP)

第一次提交class Solution {public: int uniquePathsWithObstacles(vector<vector<int>>& obstacleGrid) { int dp[100][100]; int m=obstacleGrid.size(); int n=obstacleGrid[0].size(); if(obstacleGrid[0][0]==

2021-05-07 21:17:26 105

原创 N皇后问题

全排列的升级/*考虑到每行只能放置一个皇后,每列也只能放置一个皇后那么如果把n列皇后所在的行号依次写出,那么就会是一个1~n的所有排列 */#include<iostream>#include<algorithm>#include<cstring> #include<cmath>using namespace std;const int maxn=11;int n,p[maxn],hashTable[maxn];int cnt=0;

2021-04-26 21:19:34 95

原创 全排列

#include#include#includeusing namespace std;const int maxn=11;int n,p[maxn],hashTable[maxn];void generateP(int index){if(index==n+1){//递归边界for(int i=1;i<=n;i++)cout<<p[i];cout<<endl;}for(int i=1;i<=n;i++){ if(hashTable[i]==fa

2021-04-26 21:15:59 52

原创 memset对数组初始化

#include<iostream>#include<algorithm>#include<cstring>using namespace std;int main(){ int a[5]; //赋初值0 memset(a,-1,sizeof(a)); for(int i=0;i<5;i++)cout<<*(a+i); cout<<endl; }

2021-04-26 21:14:21 136

原创 LeetCode 121. Best Time to Buy and Sell Stock

You are given an array prices where prices[i] is the price of a given stock on the ith day.You want to maximize your profit by choosing a single day to buy one stock and choosing a different day in the future to sell that stock.Return the maximum profit

2021-04-25 19:17:26 107

原创 Leetcode 213. House Robber II

You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed. All houses at this place are arranged in a circle. That means the first house is the neighbor of the last one. Meanwhile, adjacent houses

2021-04-24 20:59:25 129

原创 Leetcode 120. Triangle

Given a triangle array, return the minimum path sum from top to bottom.For each step, you may move to an adjacent number of the row below. More formally, if you are on index i on the current row, you may move to either index i or index i + 1 on the next r

2021-04-23 17:22:38 96

原创 Leetcode 198. House Robber(DP)

198. House RobberYou are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent houses have security systems connected and

2021-04-22 21:04:52 83

原创 PAT甲级1132 Cut Integer

#include<iostream>#include<vector>#include<map>#include<cstring>using namespace std;void ifcutinteger(string s){ int num=stoi(s); int k=s.length(); string s1=s.substr(0,k/2); string s2=s.substr(k/2,k/2); int a=stoi(s1);

2020-08-04 10:47:35 100

原创 PAT乙级 1055 集体照

1055 集体照 (25分)拍集体照时队形很重要,这里对给定的 N 个人 K 排的队形设计排队规则如下:每排人数为 N/K(向下取整),多出来的人全部站在最后一排;后排所有人的个子都不比前排任何人矮;每排中最高者站中间(中间位置为 m/2+1,其中 m 为该排人数,除法向下取整);每排其他人以中间人为轴,按身高非增序,先右后左交替入队站在中间人的两侧(例如5人身高为190、188、186...

2020-04-24 10:43:37 132

原创 scanf,gets(),getline(),getchar()的区别

C++中数组声明后初始化:全局变量: 系统会把数组的内容自动初始化为0*int a[100]=1 只是把第一个元素置为1,其余元素还是0(不管是全局还是main函数)在main函数中不初始化:数组的内容会是随机的在main函数中初始化:系统会把数组的内容自动初始化为0字符串前面补0:Getchar:一般getchar就是用来读取\n或者空格等字符方便scanf时候不要出错的Scan...

2020-03-03 00:01:00 434

空空如也

空空如也

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

TA关注的人

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