
Algorithm++
Eric_Wei
这个作者很懒,什么都没留下…
展开
-
poj1664解题报告
//DP问题:a[i][j]=a[i][j-1]+a[i-j][x]:x属于i-j,j中较小的//a[x][1]=1//a[1][x]=1//a[x][y]=a[x][x];当且x<=y//author:wei.steve#include #include #include #include #include #include #include us原创 2008-10-01 16:27:00 · 894 阅读 · 0 评论 -
一道有趣的数学题分析步骤
123456789这九个按顺序排列的数,要求在它们之间插入若干个+,-,*,/ ,使其结果正好等于100如: 1*2*3*4+5+6+7*8+9=100解析过程(进攻参考):1-------2------3------4------5------6------7------8------99个数字共有8个间隙,可以置入的符号有+,-,*,/,#5个符号,分别代表加减乘除连接物种操作。原创 2009-11-21 15:50:00 · 1173 阅读 · 0 评论 -
几道AMAZON的面试题
1.数组有N+M个数字,AMAZON的面试题 数字的范围为1 ... N, 打印重复的元素, 要求O(M + N), 不可以用额外的空间。 2.数组有N-2个数字,数字的范围为1 ... N,没有重复的元素,要求打印缺少的2个数字,不可以用额外的空间。 3.输入上百万个行星的位置, 求距离第K近的两个行星。 4.一个int 的数组, 有些数字只出现一次, 有些数字出现两次, 只有一个数字出现了转载 2009-11-24 12:02:00 · 13844 阅读 · 0 评论 -
阿里巴巴面试三题目其二的个人理解
阿里巴巴面试题目引入:http://topic.youkuaiyun.com/u/20091024/12/989417aa-60e9-45d1-a96f-a623695fc6d7.html?316361. 有无序的实数列V[N],要求求里面大小相邻的实数的差的最大值,关键是要求线性空间和线性时间 2. 25匹赛马,5个跑道,也就是说每次有5匹马可以同时比赛。问最少比赛多少次可以知道跑得最快的5匹马 3原创 2009-11-23 18:12:00 · 2015 阅读 · 1 评论 -
POJ3712Edges and More Edges
pku3712Edges and More Edges #includeint main(){ int n,k; while(scanf("%d%d",&n,&k),!(n==0&&k==0)) { if(k==1) {printf("%d/n",0);continue;} if(2*k>n) { pri原创 2009-11-23 18:10:00 · 897 阅读 · 0 评论 -
高精度计算的相关题目
2305(Basic remains)源代码1001(Exponentiation)10011503(Integer Inquiry)POJ1503(困在了Jcreator的调试上面了)1454(Factorial Frequencies)ACM1454(困在了Java格式化输出上面了)2389(水题)POJ23891602(TLE)POJ26023331(The Idio原创 2009-12-16 12:48:00 · 796 阅读 · 0 评论 -
一道碰面率很低的Intel面试题
#include struct A { int i; char j; char * ptr; long Array[100]; char b[2]; char * c;};#define PRINT_ME (char *)&(((struct A *)0)->c)int main() { printf("%d/n", (int)PRINT_ME);}原创 2010-05-07 10:04:00 · 1375 阅读 · 0 评论 -
FileSystem & DataBase System
While writing Inklog, I’ve been debating with myself regarding my use of the filesystem as a datastore. While the filesystem certainly makes creating, updating, visualizing, backing up, and restoring转载 2010-05-31 00:31:00 · 1016 阅读 · 0 评论