随笔分类 - 刷题
摘要:构造 string::string - C++ Reference (cplusplus.com) 常用函数 分离字符串abc.in - 顿河顿河 - 博客园 (cnblogs.com) 特殊的成员 https://cplusplus.com/reference/string/string/npos
阅读全文
摘要:cout的计算顺序从右向左,输出顺序从左向右 假设a = 1; b = 2; c = 3;cout<<a<<b<<c<<endl;缓冲区:|3|2|1|<- (把“<-”看作是指针)输出: |3|2|<- (输出 1) |3|<- (输出 2) |<- (输出 3)结果就是123. C++输出流co
阅读全文
摘要:注意对 bool 变量按位取反永远是 true; 0000 0001 1111 1110 所以用非运算符!代替 bool showGrid; showGrid=!showGrad; //这个才变 showGrid=~showGrad; //不变
阅读全文
摘要:题目: 解析 (10条消息) 蓝桥杯 I.双向排序_Jozky86的博客-CSDN博客_蓝桥杯双向排序 代码 static const int N = 100010; //vector<PII<int, int> >ord; PII<int, int> ord[N]; //++top模式,0号元素没
阅读全文
摘要:这是过了的: inline int expand(string s, int left, int right) { while (left >= 0 && right < s.size() && s[left] == s[right]) { --left; ++right; } return (ri
阅读全文

浙公网安备 33010602011771号