摘要: 导学阶段 Rust 基础 推荐学习资源: Rust 圣经 RISC-V 基础 推荐学习资源: RISC-V 官方手册 操作系统基础 推荐书籍: 《操作系统导论》(OSTEP) 第一阶段 任务内容 完成 Rustlings 编程题。 完成 10 道简单的 Rust 数据结构与算法题。 推荐资源 Rus 阅读全文
posted @ 2025-03-19 21:21 phrink 阅读(75) 评论(0) 推荐(0)
摘要: 查看全局 Git 配置 git config --global --list #output user.name=fuck user.email=scpr7@outlook.com eval "$(ssh-agent)" ssh-add -l ssh-add ~/.ssh/id_ed25519_gi 阅读全文
posted @ 2025-03-19 20:25 phrink 阅读(31) 评论(0) 推荐(0)
摘要: FIND.C #include "kernel/types.h" #include "kernel/stat.h" #include "user/user.h" #include "kernel/fs.h" #define PATH_MAX 512 char *path_append(char *d 阅读全文
posted @ 2025-03-19 19:42 phrink 阅读(9) 评论(0) 推荐(0)
摘要: 目标:依赖 执行语句 $ ls -l Makefile main.c #下面是Makefile的命令 # 这是一个注释 # 目标文件 生成的文件名 : 依赖文件 所需的源文件 main: entry.c bar.c gcc -o main main.c # 编译命令 $ ls -l Makefile 阅读全文
posted @ 2025-03-17 23:50 phrink 阅读(35) 评论(0) 推荐(0)
摘要: Ubuntu22.04换源过程 #先备份原来的 sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup #给仓库换源 sudo gedit /etc/apt/sources.list # 默认注释了源码镜像以提高 apt update 速 阅读全文
posted @ 2025-03-08 18:27 phrink 阅读(35) 评论(0) 推荐(0)
摘要: P1 HyperLogLog注意事项 Task1 初始化数据结构 n位和2^n个桶 除了n位之后的,按要求从左到右计算1的位置 对给定val hash PositionOfLeftmostOne(....) : 它计算最左边的 1 的位置。 register[j] 寄存器j的值 register[j 阅读全文
posted @ 2025-02-08 23:38 phrink 阅读(173) 评论(0) 推荐(0)
摘要: 最大流 题目要求:给出n点 m边 src sink 然后每条边有 u v capacity 求最大流 题目链接P3376 【模板】网络最大流 EK(Edmonds–Karp)算法: \[\begin{align} & \color{Red}时间复杂度O(nm^2) \\ & \color{Red}空 阅读全文
posted @ 2024-08-17 18:12 phrink 阅读(19) 评论(0) 推荐(0)
摘要: [P2740 USACO4.2] 草地排水Drainage Ditches) 大意:网络流模板 做法:EK增广路 #include <cstdio> #include <queue> #include <deque> #include <stack> #include <map> #include 阅读全文
posted @ 2024-08-17 18:10 phrink 阅读(8) 评论(0) 推荐(0)
摘要: 最短路 弗洛伊德:全源最短路: \[\Large DP方程:\\ dp[i][j] = min(dp[i] [j],dp[i][k]+dp[k] [j]) \]#include <cstdio> #include <algorithm> #include <iostream> #include <c 阅读全文
posted @ 2024-08-16 22:10 phrink 阅读(19) 评论(0) 推荐(0)
摘要: 2-Sat \[\begin{align*} &\LARGE\color{Red}大意:\\ &有n个数a_i,m个约束条件都需要满足\\ &条件形如(i,a,j,b) \quad a_i=a \ \text{or} \ a_j=b\\\\\\ &\LARGE\color{Red}思路:\\ &让a 阅读全文
posted @ 2024-08-16 20:41 phrink 阅读(14) 评论(0) 推荐(0)