随笔分类 -  刷题

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