Graph 图 BFS/DFS 例题连通分量https://cses.fi/problemset/task/1666 一个连通分量是无向图中一个最大的连通节点集合。换句话说,两个节点位于同一个连通分量中,当且仅当它们可以通过图中的边相互到达。 在上述重点问题中,目标是添加尽可能少的边,使得整个图形成一个单一的连通分量。 Solution - Building Roads请注意,每条边会将连通分量的数量减少零个或一 2026-05-08 刷题笔记 #BFS #DFS #图搜索算法
Casework 案例分析 03_Casework 案例分析什么是案例分析?案例分析(Casework)是一种通过分情况讨论来解决问题的算法思想。当问题存在多种不同的情况,且每种情况需要不同的处理方式时,这种方法特别有效。 案例分析的特点 分情况讨论:将问题分成若干种情况分别处理 逻辑清晰:每种情况独立分析 避免复杂公式:用简单逻辑处理边界情况 需要仔细分析:确保覆盖所有可能的情况 适用场景 问题有多种边界情况 不同输入范 2026-04-30 刷题笔记 #分情况讨论 #枚举 #案例分析
git git远程推送本地项目到远程仓库 git init git add . git commit -m "first_commit" git remote add origin <远程仓库地址> git push -u origin "main" 重新设置远程仓库 git remote set-url origin <远程仓库地址> 2026-04-30 开发杂记 #常用命令
push 到 github 时出错 push 到 github 时出错: fatal: unable to access ‘https://github.com/…/.git‘: Could not resolve host: github.com 编辑C:\Windows\System32\drivers\etc\下的hosts文件,在末尾添加: 140.82.113.3 github.com 140.82.113.3 是 git 2026-04-30 开发杂记 #bug修复
Two Pointer - Problems Problems01-Subarray Sums与 Solution - Books 做法类似。不同之处在于,更新 $ans$ 时改为判断 当前子数组之和 $cur$ 是否等于 目标和 $x$ ,是的话 $ans+1$ https://cses.fi/problemset/task/1660 n, x = map(int, input().split()) arr = list(map(int 2026-04-30 刷题笔记 #双指针 #滑动窗口
bug修复:GPU内存不足问题 nvidia-smi kill -9 34069 # 占用最多的进程 # 或者使用pkill pkill -f "python" 2026-04-30 开发杂记 #GPU内存不足 #bug修复
expected str, bytes or os.PathLike object, not MultiplexedPath 错误信息显示: TypeError: expected str, bytes or os.PathLike object, not MultiplexedPath 这个错误是因为 tn库(text normalization库)在创建缓存目录时收到了一个 MultiplexedPath对象而不是字符串路径。 MultiplexedPath是 HuggingFace 的 huggingface_hu 2026-04-30 开发杂记 #bug修复 #TypeError
tumx tumx连接上次的窗口tmux a 简介tumx主要有三种模式:Session windows panel。 每个Session下有很多windows 每个windows下有很多panel。一般一个Session 就足够使用。 https://tmuxcheatsheet.com/ 这里有主要的命令 在~/.tmux.conf文件下添加: set-option -g mouse on 然后按 ct 2026-04-30 开发杂记 #常用命令
huggingface huggingface加速下载在服务器中下载huggingface model 首先,安装huggingface-cli。 pip install -U huggingface_hub 接着,设置环境变量。 # 写入 ~/.bashrc export HF_ENDPOINT=https://hf-mirror.com source .bashrc 最后下载即可。 hf download 2026-04-30 开发杂记 #常用命令
Codeforces 备忘 模板#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "algo/debug.h" #else #define debug(...) 42 #endif int main() { ios::sync_with_stdio(false); cin.tie 2026-09-19 #Codeforces #C++ #竞赛