自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

XXX

一步三停 不停向前走着

  • 博客(130)
  • 资源 (1)
  • 收藏
  • 关注

原创 MAC下Neo4j、jdk11的安装

neo4j\jdk安装

2023-01-05 13:26:46 306

原创 Macos下 成功解决ValueError: not enough values to unpack (expected 7, got 1)问题

解决macos处理数据时遇到的问题

2022-09-02 17:23:48 639

原创 操作系统课程设计实验报告

操作系统课程设计一、需求分析二、整体设计1.中央处理器额模拟2.主要寄存器的模拟3.中断的模拟进程管理内存管理4.界面设计一、需求分析本系统采用Eclipse Java开发工具在Windows环境下设计一个模拟操作系统。无论是在批处理系统还是分时系统中,用户进程数一般都多于处理机数、这将导致它们互相争夺处理机。另外,系统进程也同样需要使用处理机。这就要求进程调度程序按一定的策略,动态地把处理机分配给处于就绪队列中的某一个进程,以使之执行。实验主要实现内存演示,进程管理的功能。进程调入包含两种方式:一是

2022-05-16 15:46:23 1977

原创 CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate‘.

完整报错:CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.If your shell is Bash or a Bourne variant, enable conda for the current user with $ echo ". /Users/wangminghan/anaconda3/etc/profile.d/conda.sh" >>

2022-05-15 22:06:56 451

原创 Mac下python3.7配置

我的电脑里python版本挺多的 我主要是想下载3.7并且优先使用3.7进行编译1、使用homebrew安装python官网打开巨慢直接brewbrew install python@3.7安装过程中出现了curl: (22) The requested URL returned error: 404这个报错 更新一下brewbrew update就ok2、优先使用python3.7安装完以后运行一下下面这个命令echo 'export PATH="/usr/local/opt/python

2022-05-15 17:44:21 1021

原创 记录yolov5训练报错问题

AttributeError: ‘Upsample‘ object has no attribute ‘recompute_scale_factor‘解决办法:解决方法Pytorch中报错RuntimeError: The size of tensor a (60) must match the size of tensor b (56)解决办法:解决警告UserWarning: torch.meshgrid: in an upcoming release, it will be require.

2022-04-21 13:10:30 1952 3

原创 Macos conda激活问题

报错如下:CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.If your shell is Bash or a Bourne variant, enable conda for the current user with $ echo ". /Users/wangminghan/anaconda3/etc/profile.d/conda.sh" >>

2022-04-18 23:36:30 451

原创 csp 俄罗斯方块

/把数组g copy给smemcpy(s,g, sizeof(s));#include <iostream>#include <cstdio>using namespace std;const int maxn = 100010;int a[20][20], b[10][10];void print(){ for(int i = 1; i <= 15; i++) { for(int j = 1; j <= 10; j++) { co

2021-04-04 20:32:08 119

原创 1091 Acute Stroke (30分)[BFS]

原题链接广度优先探索 还是比较有套路的我错主要是错在了cnt++的位置要在弹出去之前cnt++ 还有要注意深度防爆栈inq[1290][130][61]AC代码:#include <iostream>#include <cstdio>#include <queue>using namespace std;const int maxn = 1290;struct node{ int x, y, z;}Node;int X[6] = {0,0,0

2021-03-25 12:24:03 73

原创 1019 数字黑洞 (20 分)

测试点5 注意输入为6174的情况 测试点测试点2 注意输入是1/2/3位数字#include <iostream>#include <cstdio>#include <string>#include <set>#include <algorithm>using namespace std;const int maxn = 100010;int main() { set<int> s; int a,min =

2021-03-22 22:43:18 101

原创 数的范围 二分

二分 数的范围 #include<iostream>#include <algorithm>#include <vector>using namespace std;const int maxn=100010;const int INF=2*int(1e9)+10;#define LL long longint n, m;int q[maxn];int main(){ cin >> n >> m; for(int i = 0

2021-03-15 16:08:39 102

原创 游戏

#include <iostream>#include <cstdio>#include <vector>using namespace std;const int maxn = 100010;int visit[1100];int main() { int n, k, num = 0; cin >> n >> k; int ans, cont; while(1) { cont = 0; for(int i = 1

2021-03-14 19:21:28 130

原创 公共钥匙盒

为操作建立结构体#include <iostream>#include <cstdio>#include <algorithm>using namespace std;const int maxn = 1010;struct node{ int id, flag, t; bool operator < (const node &k) const { if(t != k.t) return t < k.t; if(flag

2021-03-14 18:29:43 69

原创 2020-12-2 期末预测之最佳阈值

#include <iostream>#include <cstdio>#include <algorithm>#include <vector>#include <map>using namespace std;const int maxn = 100010;struct node{ int x, y;}Node[100010];int cont_0[100010], cont_1[100010];struct nnod

2021-03-10 15:02:46 179

原创 201912-2 回收站选址

#include <iostream>#include <cstdio>#include <map>using namespace std;const int maxn = 100010;struct node{ int x,y;}Node[3010];map<pair<int,int>, int> m;bool select(int x, int y){ if(m[make_pair(x,y+1)] &&amp

2021-03-08 22:50:04 82

原创 201604-2 俄罗斯方块

枚举 确定新板块的起点位置再根据新板块内的相对位置确定新板块在整个画布中的绝对位置在新画布中记录方块位置被访问的次数 如果是2说明发生了碰撞 输出上一时刻的画布#include <iostream>#include <cstdio>#include <cstring>#include <memory>using namespace std;int a[20][20], a1[20][20];int b[5][5];bool draw.

2021-03-07 15:15:53 113

原创 L2-012 关于堆的判断 (25 分)

#include <iostream>#include <cstdio>#include <vector>#include <algorithm>using namespace std;const int maxn = 1010;vector<int> v;int n, m;void upAdjust(int i){ if(i == 1) return; while(i != 1) { if(v[i] < v[i

2021-03-06 21:53:37 83

原创 201512-2 消除类游戏

#include <iostream>#include <cstdio>#include <algorithm>using namespace std;int a[31][31], b[31][31];int main(){ int n, m; cin >> n >> m; for(int i = 0; i < n; i++) { for(int j = 0; j < m; j++) { cin &g

2021-03-06 18:31:20 162

原创 201809-2 买菜

注意:if(b < h[i].l || a > h[i].r) continue; b与a关系并不确定#include <iostream>#include <cstdio>#include <algorithm>using namespace std;const int maxn = 2000;struct node{ int l; int r;}h[maxn];int n;int get(int a, int b){ int

2021-03-06 17:02:08 96

原创 L2-025 分而治之 (25 分)

我看这道题的时候想到的是天梯红色警报这道题,都考察了连通性问题,但这么写了一个超内存了hhh 改了半天也没改成功 应该是复原方法有问题就不该用二维数组存 后来查了优秀代码用的是度、邻接表 开个一维数组来存储每个节点的度 这样空间就是一维 不会超内存了AC代码:#include <iostream>#include <cstring>#include <vector>#include <stack>#include <algorithm&gt

2021-03-05 10:16:21 183 1

原创 L2-025 分而治之 (25 分)

简简单单dfs#include <iostream>#include <cstring>#include <vector>#include <stack>#include <algorithm>using namespace std;const int maxn = 100010;vector<vector<int>> Node(maxn);int s;vector<int> ans;in

2021-03-04 22:23:32 127 1

原创 20141202-Z字形扫描

近期写算法最笨蛋的方法了真是????明后天再补y总的简洁版吧#include <iostream>#include <cstring>#include <vector>using namespace std;const int maxn = 510;int main(){ int n; cin >> n; int c[maxn][maxn]; for(int i = 0; i < n; i++) { for(int j =0

2021-03-03 23:00:18 87 1

原创 L2-031 深入虎穴 (25 分)

memset(visit, true, sizeof(visit));报错 添加#include <cstring>头文件我以前怎么没发现这个问题 以为是逻辑错误卡了半天 加个头文件就啥事没有了 我一直以为memset是memory头文件里的。。老爷爷看手机.jpg#include <iostream>#include <cstring>#include <vector>using namespace std;const int maxn = 1

2021-03-03 17:43:37 149 1

原创 L1-058 6翻了 (15 分)

很easy的一道题哈 但我就是想写个题解????#include <cstdio>#include <iostream>#include <string>#include <cctype>#include <vector>#include <algorithm>using namespace std;int main(){ string str; getline(cin, str); int cont = 0

2021-03-03 11:08:25 74

原创 L2-020 功夫传人 (25 分)

就很灵活 dfs可以写很多种其实只要知道两点就行1、看懂题整明白功力怎么传怎么算2、判断如何到达底端了 我是通过没有孩子还可以通过是否访问过 判断标志随自己定啦#include <iostream>#include <vector>#include <map>using namespace std;const int maxn = 100010;int n;double z,r,result = 0.0;struct Node{ int id;

2021-02-28 21:17:33 67

原创 L2-021 点赞狂魔 (25 分)

卡了一下 输出“-”n = 0 1 2 都得自动补“-”注意一下就行 简单题#include <iostream>#include <algorithm>#include <map>#include <set>using namespace std;const int maxn = 1010;struct node{ string id; int num; int dif; double ave;}Node[maxn];bo

2021-02-28 21:12:27 115

原创 L2-019 悄悄关注 (25 分)

这题本身很简单 但是看了柳神的还是学到不少auto用法 很方便map容器 m->first,m->second;要善用用flag标志#include <iostream>#include <set>#include <map>using namespace std;const int maxn = 5010;int main(){ set<string> s; map<string, int> m; int n

2021-02-28 17:30:01 100

原创 期末预测之最佳阈值(2020年12月13日)

思路:计算比自己小的0的个数 大的1的个数利用指针去双层循环下标从1开始处理 因为 stu[i].sum = stu[i-1].zero + stu[i].one 初始化stu[0].zero = 0#include <iostream>#include <algorithm>using namespace std;const int maxn = 100010;struct node{ int id; int yuce;}data[maxn];bool

2021-02-19 08:17:25 230

原创 201909-2 小明种果树

初始化初始化 注意计数变量初始化 cont_drop = 0;因为写代码不规范就白白浪费好多时间555#include <iostream>using namespace std;const int maxn = 1010;bool isdiaoluo[maxn] = {false};int main(){ int n,k,x; cin >> n; int ans = 0,temp,cont_drop = 0; //结果 和 正数之前的结果 for(int i

2021-02-04 23:18:32 135

原创 201912-2 回收站选址

stl解法set:pairset:#include <iostream>#include <algorithm>#include <set>#include <vector>using namespace std;struct point{ int x,y; point(int _x, int _y):x(_x),y(_y){} bool operator < (const point &p) const { if(

2021-02-04 20:43:05 62

原创 L2-020 功夫传人 (25分)

想想是不是因为忘记存值导致结果不对还有注意理解递归里的return#include <iostream>#include <string>#include <vector>#include <algorithm>using namespace std;//const int maxn = 100010;struct node{ double data,v,power; vector<int> child; int levea

2021-02-02 08:38:20 111 1

原创 L3-003 社交集群 (30分)

原题链接并查集要想明白 合并的是什么是通过什么合并的合并的是人的编号 通过是否喜欢同一个活动x进行判断1、int course[x]; //喜欢活动x的人的编号 如果这个活动没人喜欢过就要设置course[x] = i;喜欢过的话就合并2、findfather(course[x]) 喜欢活动x的人所在的社交圈子的根结点,需要与当前编号i进行合并。#include <iostream>#include <string>#include <queue>#inc

2021-02-01 11:22:04 106

原创 L1-043 阅览室 (20分)

原题链接这道题我是以E为判断组合标准的1 3测试点无法通过是因为没有考虑到S E E的情况visit[id] = true; //解决S E E 的情况加个判断标志就好啦#include <iostream>#include <string.h>using namespace std;const int maxn = 10010;struct read{ string s; int hh,mm;}per[maxn];bool visit[maxn] ={f

2021-01-30 18:08:08 111

原创 L2-026 小字辈 (25分)

原题链接嘻BFSDFSBFS结构体存孩子,以及层数BFS每次访问的加入的是节点queue<int> q;对应操作的是他的孩子Node[Node[now].child[i]]和他孩子的层数Node[Node[now].child[i]].leval直接存节点就是思路比较简单但是表示起来好长hhhh每次便利需要记录最大层数maxleval,存储对应的节点vector<int> ans需要注意:ans.clear(); ans.push_back(now); //清空

2021-01-30 12:44:11 82

原创 L2-023 图着色问题 (25分)

原题链接#include <iostream>#include <set>#include <vector>using namespace std;//颜色不到6个直接剔除//存相邻的边 查看相邻点颜色是否相同const int maxv = 501;int v, e,k;vector<int> color(maxv);vector<vector<int>> vi(maxv);bool visit[maxv] =

2021-01-29 18:55:36 96

原创 1099 Build A Binary Search Tree (30分)

原题链接中序遍历 权值呈递增序列题目给出的是节点序号间的关系 就用二叉树的静态写法会比较方便#include <iostream>#include <algorithm>#include <queue>#include <vector>using namespace std;const int maxn = 110;struct node{ int data; int lchild,rchild;}Node[maxn];int vi

2021-01-25 09:26:40 73

原创 1064 Complete Binary Search Tree (30分)

原题链接不是简单的push_back()操作的话要事先为vector声明空间 否则会报段错误#include <iostream>#include <algorithm>#include <vector>using namespace std;const int maxn = 10010;vector<int> vi,CBT(maxn);int num = 0,n;void inorder(int root){ if(root >

2021-01-25 08:45:11 89

原创 1053 Path of Equal Weight (30分)

原题链接难 但是我今天懒的写思路题解555DFS:#include <iostream>#include <algorithm>#include <stack>#include <queue>#include <vector>using namespace std;const int maxn = 10010;vector<int> temp;int w[maxn];int n,m,s;struct node

2021-01-24 20:35:38 68

原创 1004 Counting Leaves (30分)

原题链接这道题本质就是在求每层叶子结点个数DFS用惯了BFS用起来有点困难 还是要多练DFS:#include <iostream>#include <vector>#include <math.h>using namespace std;const int maxn = 100010; //求每层叶子结点个数vector<int> Node[maxn];int n,m;int hashtable[maxn] = {0}; //记录第

2021-01-24 12:41:48 91

原创 1090 Highest Price in Supply Chain (25分)

原题链接树图结合 DFS 更新路径 跟上道题蛮像 注意r = r/100#include <iostream>#include <vector>#include <math.h>using namespace std;const int maxn = 100010; double p, r;struct node{ int depth; vector<int> child;}Node[maxn];int maxdepth = 0,n

2021-01-23 21:50:19 74

操作系统课程设计大作业

通过设计进程管理和内存管理,进一步理解进程和内存的基本概念,加强理解进程管理中主要数据结构的设计、进程调度算法及内存管理方式。显示系统在运行过程中各进程的状态及有关参数的变化情况。通过可视化窗口,显示时间片使用情况,正在运行的进程,正在执行的指令等等,并对就绪队列和阻塞队列中存放的信息进行显示。在进程创建时为每个进程分配相应的内存,程序结束时调用进程撤销原语撤销进程,回收之前分配的内存,然后进行进程调度,在I/O中断时将阻塞结束的进程唤醒。在进程时间片用完时,将正在运行的进程添加到就绪队列,重新进程调度,并实现相对时钟的模拟题目中要求写出模拟中断的种类和中断处理方式。模拟内存管理时用可变分区管理方式对内存进行分配与回收,减少碎片化带来的影响。

2022-05-16

空空如也

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

TA关注的人

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