摘要:
###常见运算 //集合A、B,元素c --> int A,B c = 0 ~ 31 //A中插入c A |= (1<<c) //A中去除c A &= ~(1<<c) A ^= (1<<c) //A B 合并 A | B //判断B是不是A的子集 return (A&B) == B //判断c在不在 阅读全文
摘要:
使用Qtcreator 写完 shader文件之后运行时出现标题的这个错误 报错信息如下: QOpenGLShader::compile(Fragment): 0(2) : error C0204: version directive must be first statement and may 阅读全文
摘要:
###并查集介绍 今天刷leetcode碰到一个带权重的并查集,记录一下 题目:399. 除法求值 class Solution { public: int findf(vector<int>& f, vector<double>& w, int x) { if (f[x] != x) { int 阅读全文
摘要:
一步一步推导出官方最优解法,详细图解 上面这篇文章讲的很详细了。 ####300. 最长递增子序列 class Solution { public: int lengthOfLIS(vector<int>& nums) { vector<int> minList; for(auto& i : num 阅读全文