摘要: 在 Mac 上编写 Verilog 代码 前言 本文将会介绍在 Mac 上如何编写,编译和仿真你的 Verilog 代码,来完成冯爱民老师《计算机组成原理A》课程的实验内容,我将会介绍一款免费的文本编辑器 Sublime Text ,一个自由软件 "Icarus Verilog" ,一个免费的波形文 阅读全文
posted @ 2015-05-21 22:10 ljlin 阅读(9408) 评论(2) 推荐(1) 编辑
摘要: ZOJ3543 Number String状态f[i][j]表示长度为I的全排列,符合字符串的要求,最后一位数字是j的方案数。重点在要始终保持是f算的排列的数量,然后转移时用这些推出来新的情况。就是j#include #include using namespace std;const long l... 阅读全文
posted @ 2014-07-20 16:32 ljlin 阅读(343) 评论(0) 推荐(0) 编辑
摘要: poj2749 Building roadshttp://poj.org/problem?id=2749二分答案,以后构造布尔表达式。 相互讨厌是!((a and b)or(!a and !b) 化简得 (!a or !b)and(a or b) 相互喜欢是!(a and !b)or(!a an... 阅读全文
posted @ 2014-07-15 15:06 ljlin 阅读(467) 评论(0) 推荐(0) 编辑
摘要: A -Painting the sticks因为不能覆盖涂/涂两次,所以就数数有几个三个一块儿就行了。#includeint a[100],ans ;int main(){ int n , t = 0 ; while (scanf("%d",&n)!=EOF) { for (... 阅读全文
posted @ 2014-07-10 21:11 ljlin 阅读(220) 评论(0) 推荐(0) 编辑
摘要: ```cpp#includeint a[100],ans ;int main(){ int n , t = 0 ; while (scanf("%d",&n)!=EOF) { for (int i=1; i0) ; ++t ; printf("C... 阅读全文
posted @ 2014-07-10 20:12 ljlin 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 1 线段树回答区间最大字段和对前缀和序列用线段树做RMQ#include #include #include using namespace std;/** * 待处理序列A从1到N * min对应的序列是前缀和序列右移一位 */const int MaxN = 500000;#define le... 阅读全文
posted @ 2014-07-06 00:58 ljlin 阅读(278) 评论(0) 推荐(0) 编辑
摘要: 使用Tire进行DP的递推,f[i+len]+=f[i] 若S[i+1..len]为字典中的元素。 1 #include 2 #include 3 #include 4 5 const long long maxnode = 4010*100; 6 const long long SI... 阅读全文
posted @ 2014-07-04 00:27 ljlin 阅读(233) 评论(0) 推荐(0) 编辑
摘要: 通过写这个东西来学习swift和sprite Kit,参考自https://github.com/croath/PlaneWarOSX,联系了原作者,他也表示感兴趣。传送门:https://github.com/ljlin/PlaneWarSwift 阅读全文
posted @ 2014-06-21 00:06 ljlin 阅读(684) 评论(0) 推荐(0) 编辑
摘要: Graffiti基于矢量图绘图框架的涂鸦应用 支持直线段、折线、三次贝塞尔曲线、矩形、多边形、椭圆、自由手绘轨迹等多种矢量图元,并且可以随时重新编辑。向本地写JSON规范的vg文件录制绘图过程,文本文件体小,储存负担极小,理论支持无限步redo undo。始终使用JSON保存涂鸦内容,支持任意时刻... 阅读全文
posted @ 2014-06-07 17:50 ljlin 阅读(237) 评论(2) 推荐(0) 编辑
摘要: 在使用AutoLayout后,想要使用代码控制ScrollView的contentSize,应该在[super viewDidAppear:animated]之后进行。http://willsbor-blog.logdown.com/posts/179101-ios-autolayout-at-sc... 阅读全文
posted @ 2014-05-22 10:38 ljlin 阅读(933) 评论(0) 推荐(0) 编辑