![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Practice
Re1own
coding the world
展开
-
构造+模拟codeforces1262C
codeforces1262C思路:构造一个正确的目标字符串,遍历当前字符串,如果当前同一index的字符与目标字符串的字符不同,则把子字符串后面的字符都反转代码:#include <iostream>#include <algorithm>#include <string>#include <vector>using namespa...原创 2019-12-05 22:17:45 · 145 阅读 · 0 评论 -
小算法小技巧总结
变量交换(罕见):a = a + b;b = a - b;a = a - b;此时a、b就互换了也可以用指针交换二者变量的地址从而实现输出时数据交换原创 2018-11-05 14:44:14 · 128 阅读 · 0 评论