今天和昨天都没有做题,昨天是因为复习太累后面忘了,今天也是上午考毛概,下午又忙着复习计算机图形学,晚上也是忘了结果打了暗黑3,把暗黑3 打通关了,以后都不会玩太多游戏了,争取明天做3题把题目补上,拖越久越难补的道理我是知道的. 亲和数 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 26484    Accepted Submissio…
Dining Description Cows are such finicky eaters. Each cow has a preference for certain foods and drinks, and she will consume no others. Farmer John has cooked fabulous meals for his cows, but he forgot to check his menu against their preferences. Al…
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…
希尔伯特矩阵 希尔伯特矩阵是一种数学变换矩阵 Hilbert matrix,矩阵的一种,其元素A(i,j)=1/(i+j-1),i,j分别为其行标和列标. 即: [1,1/2,1/3,--,1/n] |1/2,1/3,1/4,--,1/(n+1)| |1/3,1/4,1/5,--,1/(n+2)| -- [1/n,1/(n+1),1/(n+2),--,1/(2n-1)] 希尔伯特矩阵是一种数学变换矩阵,正定,且高度病态 (即,任何一个元素发生一点变动,整个矩阵的值和逆矩阵都会发生巨大变化),病态…
帕斯卡矩阵 1.定义       帕斯卡矩阵:由杨辉三角形表组成的矩阵称为帕斯卡(Pascal)矩阵. 杨辉三角形表是二次项 (x+y)^n 展开后的系数随自然数 n 的增大组成的一个三角形表. 如4阶帕斯卡矩阵为 1 2 3 4 5 6 7 8 9 10 11 12 <span style="font-size: 15px;">>> format rat >> pascal(6)   ans =          1              1 …
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): 30385    Accepted Submission(s): 20250 Problem Description HDOJ上面已经有10来道A+B的题目了,相信这些题目曾经是大家的最爱,希望今天的这个A+B能给大家带来好运,也希望这个题目能唤起大家对ACM曾经的热爱.…
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…
Specialized Four-Digit Numbers Time Limit: 2 Seconds      Memory Limit: 65536 KB Find and list all four-digit numbers in decimal notation that have the property that the sum of its four digits equals the sum of its digits when represented in hexadeci…
1048. Find Coins (25) 时间限制 50 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which could accept a…