摘要:
JugsTime Limit:1000MSMemory Limit:65536KTotal Submissions:4076Accepted:2411Special JudgeDescriptionIn the movie "Die Hard 3", Bruce Willis and Samuel L. Jackson were confronted with the following puzzle. They were given a 3-gallon jug and a 5-gallon jug and were asked to fill the 5-gallon 阅读全文
posted @ 2012-11-20 20:45
可笑痴狂
阅读(3993)
评论(0)
推荐(0)
摘要:
转自:http://tieba.baidu.com/p/19883218911. freopen(“1.txt”,”r”,stdin);freopen(“1.txt”,”w”,stdout);2. memset(a,0,sizeof(a));数组定义int a[10] 为全局变量的话,其全部元素默认赋值为0;整型数据默认为0,字符串默认为空。3. #define max 0x0ffffff;#define min -0x0ffffff;4. 多组测试数据使用 while(n--){ 程序 }5. 一般用C语言节约空间,要用C++库函数或STL时才用C++;cout、cin和printf、sca 阅读全文
posted @ 2012-11-20 20:23
可笑痴狂
阅读(193)
评论(0)
推荐(0)
摘要:
Function Run FunTime Limit:1000MSMemory Limit:10000KTotal Submissions:13517Accepted:7040DescriptionWe all love recursion! Don't we?Consider a three-parameter recursive function w(a, b, c):if a <= 0 or b <= 0 or c <= 0, then w(a, b, c) returns:1if a > 20 or b > 20 or c > 20, the 阅读全文
posted @ 2012-11-20 17:11
可笑痴狂
阅读(191)
评论(0)
推荐(0)