Pawn Brotherhood 1 alpha_table = "abcdefgh" 2 3 def safe_pawns(pawns): 4 safe_count = 0 5 6 for spawn in pawns: 7 if spawn[1] == '1'...
分类:
其他好文 时间:
2014-08-05 10:57:49
阅读次数:
278
用户表:select count(*) 总表数 from sysobjects where xtype='u' 刚才那个是用户表,下面这个是系统表加用户表:select count(*) 总表数 from sysobject s where xtype in('u','s')总视图数:select ...
分类:
数据库 时间:
2014-08-05 10:54:39
阅读次数:
198
Count Color
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 34950
Accepted: 10542
Description
Chosen Problem Solving and Program design as an optional co...
分类:
其他好文 时间:
2014-08-05 00:50:18
阅读次数:
307
思路:类似归并排序算法,在合并已经有序的相邻子数组的时候,计算前面数组相对于后面数组的逆序对数,整个递归过程可以算出所有逆序对#include void merge(int A[], int front, int middle, int end, int &count){ if (front ...
分类:
其他好文 时间:
2014-08-04 21:26:48
阅读次数:
262
1 #include 2 #include 3 #include 4 using namespace std; 5 6 const int maxn=100005; 7 8 int count[maxn]; 9 int num[maxn],ll[maxn],rr[maxn];10 int...
分类:
其他好文 时间:
2014-08-04 21:03:37
阅读次数:
261
函数memcpy() 从source 指向的区域向dest指向的区域复制count个字符,如果两数组重叠,不定义该函数的行为。 而memmove(),如果两函数重叠,赋值仍正确进行。 memcpy函数假设要复制的内存区域不存在重叠,如果你能确保你进行复制操作的的内存区域没有任何重叠,可以直接用...
分类:
其他好文 时间:
2014-08-04 17:28:02
阅读次数:
236
mysqlErrcode28磁盘还可以但是inode表没有了ddif=/dev/zeroof=tmpforindecount=1024bs=1024KB
mke2fs-N5000000-b1024-I128tmpforinde#格式化成ext2分区(因为ext3有日志系统,会消耗空间),制定inode大小为
mount-olooptmpforinde/var/tmp
root@eccubuntu:/var#df-h
Filesys..
分类:
数据库 时间:
2014-08-04 14:43:09
阅读次数:
313
Given a string S and a string T, count the number of distinct subsequences of T in S.A subsequence of a string is a new string which is formed from th...
分类:
其他好文 时间:
2014-08-04 13:50:57
阅读次数:
208
题目链接:
啊哈哈,选我选我
思路是:
相当于模拟约瑟夫环,只不过是从顺逆时针同时进行的,然后就是顺逆时针走可以编写一个函数,只不过是走的方向的标志变量相反。。还有就是为了(pos+flag+n-1)%n+1的妙用。。。
题目:
The Dole Queue
In a serious attempt to downsize (reduce...
分类:
其他好文 时间:
2014-08-04 11:09:37
阅读次数:
206
题目:The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1 is read off as "one 1" or 11.11 is read ....
分类:
编程语言 时间:
2014-08-04 04:11:06
阅读次数:
293