Number of Containers Time Limit: 1 Second Memory Limit: 32768 KB For two integers m and k, k is said to be a container of m if k is divisible by m. Given 2 positive integers n and m (m < n), the function f(n, m) is defined to be the number of contain…
IP Address Time Limit: 2 Seconds      Memory Limit: 65536 KB Suppose you are reading byte streams from any device, representing IP addresses. Your task is to convert a 32 characters long sequence of '1s' and '0s' (bits) to a dotted decimal format. A…
动态链接库:我们经常把常用的代码制作成一个可执行模块供其他可执行文件调用,这样的模块称为链接库,分为动态链接库和静态链接库. 对于静态链接库,LIB包含具体实现代码且会被包含进EXE中,导致文件过大,浪费磁盘和内存: 对于动态链接库,DLL不必被包含在最终的EXE中,EXE执行时可以动态地装载和卸载DLL文件. 导出函数 将函数声明为导出函数有两种方式: 1. 在函数声明上加上_declspec(dllexport): 如:extern "C" int__declspec(dllexp…
DFS算法: #include<stdio.h> #include<math.h> void find(int k,int w); int num[23]={0}; int min=20001; int n,max=0; void find(int k,int w){ int sum=(int)fabs(max-w-w); if(k==n)return; if(sum<min)min=sum; find(k+1,w+num[k]); find(k+1,w); } int ma…
人见人爱A-B Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 53836    Accepted Submission(s): 15147 Problem Description 参加过上个月月赛的同学一定还记得其中的一个最简单的题目,就是{A}+{B},那个题目求的是两个集合的并集,今天我们这个A-B求的是两个集合的差,就是做集合的…
人见人爱A^B Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 27711    Accepted Submission(s): 18946 Problem Description 求A^B的最后三位数表示的整数. 说明:A^B的含义是"A的B次方"   Input 输入数据包含多个测试实例,每个实例占一行,由两个正整 数A和…
人见人爱A+B Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 30385    Accepted Submission(s): 20250 Problem Description HDOJ上面已经有10来道A+B的题目了,相信这些题目曾经是大家的最爱,希望今天的这个A+B能给大家带来好运,也希望这个题目能唤起大家对ACM曾经的热爱.…
SCU - 4440 Rectangle Time Limit: Unknown   Memory Limit: Unknown   64bit IO Format: %lld & %llu Submit Status Description Rectangle frog has a piece of paper divided into n rows and m columns. Today, she would like to draw a rectangle whose perimeter…
Choose the best route Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 8224    Accepted Submission(s): 2706 Problem Description One day , Kiki wants to visit one of her friends. As she is liable…
FatMouse' Trade Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 63198 Accepted Submission(s): 21342 Problem Description FatMouse prepared M pounds of cat food, ready to trade with the cats guardin…