会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
见习牧师转职中..
博客园
首页
新随笔
联系
管理
订阅
2016年1月25日
模指数运算
摘要: 离散数学p216
阅读全文
posted @ 2016-01-25 16:19 celahir
阅读(1301)
评论(0)
推荐(0)
2016年1月23日
二进制相加
摘要: 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
阅读(528)
评论(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
阅读(108)
评论(0)
推荐(0)
2016年1月21日
数众数
摘要: 有序整数序列,数出所有众数及其个数模块1:线性扫描模块2:cnt计数:条件:遇见不等,计a[i-1]的cntnotice: 最后一个数一定不会入栈,需要单独处理 1 #include 2 #include 3 #include 4 using namespace std; 5 void fin...
阅读全文
posted @ 2016-01-21 18:43 celahir
阅读(164)
评论(0)
推荐(0)
公告