本人在写leecode第46题全排列的过程中,先在vscode上调试好代码然后上传leetcode,报错:runtime error: load of null pointer of type ‘std::_Bit_type’ (aka ‘unsigned long’) (stl_bvector.h)。 检查了很多遍,并没有逻辑错误。 代码如下: 后...Leetcode-runt
(a) 本地使用 vscode 撰写 markdown,通过 GitBook 引擎渲染成静态 HTML 文件; (b) 将静态 HTML 文件 push 到远程服务器的 Git 仓库,触发 git hooks 将文件拷贝到服务器中预设的网页目录; (c) DNS 服务商那里新建一个二级域名解析到远程服务器 IP,比如 gitbook.shipengx.com; (d) 自定义 Nginx 配置,将...
2.VSCODE 中 MinGW 编译 C++ cout无法输出值 3.Vue + Node.js + Three.js 注意点 4.tntorch的一些函数 5.WSL2 通过 CLASH 配置 6.vim一些小技巧(备忘) 7.python小技巧合集 8.*星号在python函数变量中代表的含义 9.GMRES VS BiCGStab 10.BICGSTAB不收敛的坑!! 随笔分类 DP练习(13) ...
classSolution {public:intleastBricks(vector<vector<int>>&wall) { unordered_map<int,int> mp;//统计缝的重复数量for(inti=0;i<wall.size();++i){intlen=0;for(intj=0;j<wall[i].size()-1;++j){//注意不统计最后一个位置len+=wall[i][j];//该层的各个长度++mp[len]; } }intres=0;for...
//日积月累,水滴石穿 classSolution {public:stringlongestCommonPrefix(vector<string>&strs) {if(strs.empty())return"";//必须要加空的特判stringres ="";for(inti=0;i < strs[0].size();i++){for(intj=0;j < strs.size();j++){if(i >= strs[j].size() || strs[j][i] != st...
回溯写到自闭;不想就删了; classSolution {public: vector<int> grayCode(intn) { vector<vector<int>>res; vector<int> add(n,0); DFS(res,add,n,0); vector<int>realres;for(inti=0;i < res.size();i++){ realres.push_back(func(res[i])); }returnrealres; }intfunc(vector<int>nums)...