摘要: 拓扑排序 https://www.acwing.com/problem/content/850/ include include include include include using namespace std; const int N=1e5+10; int ver[N],head[N],n 阅读全文
posted @ 2020-04-16 20:50 arbor_one 阅读(113) 评论(0) 推荐(0)
摘要: 模板题 快速幂求矩阵的幂 https://www.luogu.com.cn/problem/P3390 include include include using namespace std; const int N = 110; long long n, k; const int mod = 10 阅读全文
posted @ 2020-04-15 20:13 arbor_one 阅读(265) 评论(0) 推荐(0)
摘要: 记录简单路径 并且求出路径权值的积 "原题链接" 下面附上模板 include include include include using namespace std; const int M=100010,N=100100; int d[N],Next[N],edge[M],head[N],tot 阅读全文
posted @ 2020-04-13 21:01 arbor_one 阅读(126) 评论(0) 推荐(0)
摘要: spfa算法 o(nm) 适用的地方 权值可以为负的时候,也是单源最短路径的一个算法 include include include include include using namespace std; const int N=100100,M=1000010; queueq; int d[N] 阅读全文
posted @ 2020-04-09 21:06 arbor_one 阅读(135) 评论(0) 推荐(0)
摘要: 求单源最短路径 迪杰斯特拉算法 O(n n) inlcude include Include include using namespace std; int a[1000][1000],d[1000],n,m; bool v[1000]; void dijkstra() { memset(d,0f 阅读全文
posted @ 2020-04-09 16:05 arbor_one 阅读(123) 评论(0) 推荐(0)
摘要: 求有权无向图两点之间的最长距离 这是根据蓝桥杯大臣的旅费一题 看一位大佬写的 https://blog.dotcpp.com/a/7027 这个是链接 include include include include include using namespace std; int cnt,node, 阅读全文
posted @ 2020-04-08 20:01 arbor_one 阅读(524) 评论(0) 推荐(0)
摘要: 创建用户和删除用户 $useradd xh 在根目录下输入useradd 这个命令就添加了新的用户,xh就是用户名 对应的删除 $userdel xh $useradd d /home/tiger/ xh 这个就是创建在了home目录下的用户 对应的删除 $userdel r xh 查询用户信息 $ 阅读全文
posted @ 2020-03-07 17:35 arbor_one 阅读(171) 评论(0) 推荐(0)
摘要: linux实操篇 实用指令 指定运行级别 系统的运行级别配置文件 /etc/inittab 切换到指定运行级别的指令 $init [012356] 输入init 5切换到图形化界面 $init 5 如何找回root密码 进入到单用户模式,然后修改root密码。因为进入单用户模式,root不需要密码就 阅读全文
posted @ 2020-03-07 17:33 arbor_one 阅读(255) 评论(0) 推荐(0)
摘要: 组管理 文件/目录的所有者 文件/目录的创建者就是文件的所有者 查看所有者 指令 ls ahl eg:1 创建一个组police 再创建一个用户 tom 将tom放在police中,然后使用tom来创建一个文件ok.txt 看看情况如何 创建一个新组 groupadd police 新添加一个用户 阅读全文
posted @ 2020-03-07 17:31 arbor_one 阅读(170) 评论(0) 推荐(0)
摘要: 首次进入root 开机进入桌面 CTRL+ALT+T打开终端 输入 sudo psswd root [sudo] password for gutar: 输入你的用户密码 输入新的 UNIX 密码(新的密码,也是root密码): 重新输入新的 UNIX 密码: 重复输入passwd: 已成功更新密码 阅读全文
posted @ 2020-03-04 22:24 arbor_one 阅读(192) 评论(0) 推荐(0)