摘要: a,b 为二进制位串d:下一进位c:当前进位x:和的当前位#include #include #include using namespace std;int main(){ string a = "101"; string b = "11111"; string s; st... 阅读全文
posted @ 2016-01-23 23:27 celahir 阅读(511) 评论(0) 推荐(0) 编辑
摘要: 模块1:线性扫描,试图将每个a[i]插入到前面的有序序列中。模块2:[0, i]的无序区间进行扫描,找出插入的位置,该位置使得插入的瞬间:[0, k]区间有序,而[k+1, i]区间无序,所以插入点在k+1。#include #include using namespace std;template... 阅读全文
posted @ 2016-01-23 21:11 celahir 阅读(99) 评论(0) 推荐(0) 编辑