码迷,mamicode.com
首页 > 其他好文
poj 3252 Round Numbers (组合数学)
题意:一个数转化成二进制之后,0的个数大于等于1的为round数, 给定一个区间[m,n],问这区间内有多少round数 分析:要求[m,n]间的的round数, 可以用[1,n+1)的个数减去[1,m)的个数,...
分类:其他好文   时间:2014-11-11 19:20:23    阅读次数:172
对称排列
描述 In your job at Albatross Circus Management (yes, it's run by a bunch of clowns), you have just finished writing a program whose output is a list of names in nondescending order by length (so that ...
分类:其他好文   时间:2014-11-11 19:19:41    阅读次数:210
assertion: 18 { code: 18, ok: 0.0, errmsg: "auth fails" }
assertion: 18 { code: 18, ok: 0.0, errmsg: "auth fails" }...
分类:其他好文   时间:2014-11-11 19:19:31    阅读次数:293
性能测试(做反射时,拼setter方法想到的)
性能测试,string/stringbuffer...
分类:其他好文   时间:2014-11-11 19:20:16    阅读次数:146
strchr的返回值
返回值是查找的字符做为首地址,返回的是一个字符串如果我们想提取这个位置开始的某一个字符的时候只需要使用指针数组就ok了 #include #include int main(void) { char string[17]; char*ptr,c=':'; strcpy(string,"Thisis:string"); ptr=strchr(string,c); if(ptr)  ...
分类:其他好文   时间:2014-11-11 19:18:59    阅读次数:293
Qt实现小型的超市收银系统
用Qt实现的一个简单的超市收银系统。可以实现简单进销存功能...
分类:其他好文   时间:2014-11-11 19:19:27    阅读次数:374
poj 1850 Code (组合数学)
题意:合法的字符串序列:由小写字母组成,每一个字符比后一个字符ASCII码要大。 将这样的字符串序列按字典序排列编码,第一小的编码为1,第二小的编码为2...依次类推 如:a->1,b->2……z->26,ab->27……vwxyz->83681. 给定一个字符串,若其合法,输出其编码,否则输出0 分析:先判断是否合法,若合法,再算其编码 计算编码即计算比该字符串小的字符串的个数,再加1即为其编码...
分类:其他好文   时间:2014-11-11 19:20:06    阅读次数:142
EF直接查询一张子表的注意事项
项目用到的一个查询,看着再简单不过的查询,没想到居然栽跟头了。 有两张表,一张主表,一张子表【1→多】 在这里我主要是想对子表操作,之所以加主表,是因为在添加子表数据的时候,可以只用一个主表的对象,然后用上下文添加一次,EF自动开存储过程,自动添加关联子表数据。如果大家有什么好的办法让子表一次添加一千多条数据,请指教。【因为我也不太想这样添加数据】 问题就出现在我查询这个子表数据的时...
分类:其他好文   时间:2014-11-11 19:18:23    阅读次数:214
POJ 1011 Sticks
题目来源:http://poj.org/problem?id=1011 Sticks Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 122460   Accepted: 28373 Description George took sticks...
分类:其他好文   时间:2014-11-11 19:18:12    阅读次数:181
【LeetCode】【Solution】Maximum Product Subarray
【题目】 Find the contiguous subarray within an array (containing at least one number) which has the largest product. For example, given the array [2,3,-2,4], the contiguous subarray [2,3] has th...
分类:其他好文   时间:2014-11-11 19:18:19    阅读次数:217
POJ3616 Milking Time 【DP】
Milking Time Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 4917   Accepted: 2062 Description Bessie is such a hard-working cow. In fact, she is so focuse...
分类:其他好文   时间:2014-11-11 19:18:30    阅读次数:162
二叉树的基本操作(二)
这是对二叉树一的补充 #include #include #define MaxSize 100 #define MaxWidth 40 int LeafCount=0; int Layer=1; typedef char ElemType; typedef struct tnode { ElemType data; struct tnode *lchild,*rchil...
分类:其他好文   时间:2014-11-11 19:17:41    阅读次数:207
POJ 1111 Image Perimeters
题目来源:http://poj.org/problem?id=1111 Image Perimeters Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 7896   Accepted: 4711 Description Technicians...
分类:其他好文   时间:2014-11-11 19:17:19    阅读次数:206
CentOS 6.5 配置IP地址的三种方法
实验软件环境:虚拟机Vmware Workstation10.0 、CentOS 6.5 32位 1、自动获取IP地址 虚拟机使用桥接模式,相当于连接到物理机的网络里,物理机网络有DHCP服务器自动分配IP地址。 #dhclient 自动获取ip地址命令 #ifconfig 查询系统里网卡信息,ip地址、MAC地址   分配到ip地址后,...
分类:其他好文   时间:2014-11-11 19:15:51    阅读次数:234
activeMQ发布订阅模式中中常用工具类
package com.jms; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import javax.jms.BytesMessage; import javax.jms.Connection; import javax.jms.ConnectionFactory; import javax.jms...
分类:其他好文   时间:2014-11-11 19:17:09    阅读次数:289
链队的基本操作
链式队列...
分类:其他好文   时间:2014-11-11 19:16:47    阅读次数:227
HDU-4461-The Power of Xiangqi
The Power of Xiangqi Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1420    Accepted Submission(s): 775 Problem Description Xi...
分类:其他好文   时间:2014-11-11 19:16:37    阅读次数:187
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!