| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
我的分析In Reply To:Re:关键不是输出结果,是运行过程,他竟然没有RE,没有TLE,也没有MLE~递归需要栈空间啊 Posted by:Moon_1st at 2011-05-31 13:55:39 #include <iostream>
#include <cstdio>
using namespace std;
typedef long long llg;
llg a, b;
llg f(llg a, llg b, int depth)
{
llg i, j, k, l, v, m, ks;//这些变量编译的时候就被优化掉了吧
if(depth == 100000000) return a+b;
else return f(a, b, depth+1);//这个不能算作递归的,我做过实验
}
int main()
{
while(cin>>a>>b) cout<<f(a, b, 0)<<endl;
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator