Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:谁能解释这个程序为啥可以过A+B? 太NB了~

Posted by JohnShuACM at 2011-05-31 11:20:39 on Problem 1000 and last updated at 2011-05-31 11:20:54
In Reply To:谁能解释这个程序为啥可以过A+B? 太NB了~ Posted by:Moon_1st at 2011-05-31 10:47:56
> #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;
> }
的确是AC

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator