1 #include//竹子 2 using namespace std; 3 ifstream cin("eat.in"); 4 ofstream cout("eat.out"); 5 const int MAXT=100; 6 int a[MAXT+1],b[MAXT+1]; 7 int m.....
分类:
其他好文 时间:
2015-07-11 14:59:42
阅读次数:
111
感觉后缀数组很难学的说= =不过总算是啃下来了首先 我们需要理解一下倍增法构造的原理设原串的长度为n 对于每个子串 我们将它用'\0'补成长度为2^k的串(2^k-1#include #include #include #define rep(i,n) for(int i=1;iy?x:y)#def...
分类:
编程语言 时间:
2015-07-11 14:55:44
阅读次数:
127
public Bitmap resizedBitmap(Bitmap bitmap, int screenW, int tv_count) { int width = bitmap.getWidth(); int height = bitmap.getHeight(); int newWidt...
分类:
移动开发 时间:
2015-07-11 14:53:58
阅读次数:
134
violate在多线程当中的用来修饰某个变量,这个变量只有一份,也就是不存在多线程cache它们本地的情况出现。从而保证对他的读和写是唯一的,不会存在不一致的情况。一、适用的情况对于某个变量只有读和写两种单一操作。violate int count;count=1;count=0;if(count=...
分类:
编程语言 时间:
2015-07-11 14:51:36
阅读次数:
145
题目:
Divide two integers without using multiplication, division and mod operator.
If it is overflow, return MAX_INT.
题意:
不使用乘法,除法和取余操作,令两个整数相除.
如果溢出,就返回 MAX_INT.
算法分析:
参考博客http://blog.csdn...
分类:
编程语言 时间:
2015-07-11 13:44:27
阅读次数:
163
在Service中onStartCommand(Intent intent, int flags, int startId)这三个参数的含义分别是,intent就是startService(Intent intent)中的intent;flags代表flags表示启动服务的方式: ? Additional data about ...
分类:
其他好文 时间:
2015-07-11 13:44:13
阅读次数:
131
网站:www.sqlite.org
1、打开数据库:
int sqlite3_open(
const char *filename, /*数据库名,可包含路径*/
sqlite3 **ppDb /*指向sqlite句柄的指针*/
);
成功返回0(宏定义为SQLITE_OK),失败返回错...
分类:
数据库 时间:
2015-07-11 13:42:37
阅读次数:
162
题意:按层,将元素收集在一个二维数组中。思路:广搜应该是普遍的方法了。还能避免栈溢出,多好用。搭配deque,因为要经常删除。 1 /** 2 * Definition for a binary tree node. 3 * struct TreeNode { 4 * int val;...
分类:
其他好文 时间:
2015-07-11 13:36:40
阅读次数:
96
下面以linux x86 下的程序来说明一个源程序是怎样变成一个可执行的二进制文件的。下面是我由一个交换数组中两个元素的值得简单程序来说明main.c源文件的代码,和swap.c源文件代码分别如下:1 #include2 #define SIZE 23 int buf[SIZE]={1,2}...
分类:
其他好文 时间:
2015-07-11 13:31:56
阅读次数:
169
main函数应写为int main( int argc, char* args[] )而不是int main()形式 链接库时应注意顺序 mingw32;SDL2main;SDL2; 颠倒会出现错误 应注意SDL 是32bit还是64bit。要与mingw一致
分类:
其他好文 时间:
2015-07-11 13:31:39
阅读次数:
137