i reduce my code less than 40 KB.
only write some line in one line.
my new code's link:
http://ideone.com/gs2Agf
Search found 4 matches
- Sat Aug 03, 2013 5:48 pm
- Forum: Volume 4 (400-499)
- Topic: 495 - Fibonacci Freeze
- Replies: 222
- Views: 60386
- Fri Aug 02, 2013 6:01 am
- Forum: Volume 4 (400-499)
- Topic: 495 - Fibonacci Freeze
- Replies: 222
- Views: 60386
Re: 495 - Fibonacci Freeze - TLE
full code's link that i submit:
http://ideone.com/GI3Rh2
http://ideone.com/GI3Rh2
- Thu Aug 01, 2013 12:34 pm
- Forum: Volume 4 (400-499)
- Topic: 495 - Fibonacci Freeze
- Replies: 222
- Views: 60386
Re: 495 - Fibonacci Freeze - TLE
this my full code.only i don't write my include.
this my full code:
#include<iostream>
#include<string>
#include"BigIntegerLibrary.h"
using namespace std;
BigInteger fibo[5010];
int main()
{
int input;
fibo[0] = 0;
fibo[1] = 1;
for(int i=2 ; i<5001 ; ++i)
{
fibo[i] = fibo[i-1]+fibo[i-2 ...
this my full code:
#include<iostream>
#include<string>
#include"BigIntegerLibrary.h"
using namespace std;
BigInteger fibo[5010];
int main()
{
int input;
fibo[0] = 0;
fibo[1] = 1;
for(int i=2 ; i<5001 ; ++i)
{
fibo[i] = fibo[i-1]+fibo[i-2 ...
- Wed Jul 31, 2013 2:13 am
- Forum: Volume 4 (400-499)
- Topic: 495 - Fibonacci Freeze
- Replies: 222
- Views: 60386
495 - Fibonacci Freeze - TLE
this my code:
BigInteger fibo[5010];
int main()
{
int input;
fibo[0] = 0;
fibo[1] = 1;
for(int i=2 ; i<5001 ; ++i)
{
fibo[i] = fibo[i-1]+fibo[i-2];
}
while(cin>>input)
cout<<"The Fibonacci number for "<<input<<" is "<<fibo[input]<<endl;
return 0;
}
But i don't know why i get TLE.
Please ...
BigInteger fibo[5010];
int main()
{
int input;
fibo[0] = 0;
fibo[1] = 1;
for(int i=2 ; i<5001 ; ++i)
{
fibo[i] = fibo[i-1]+fibo[i-2];
}
while(cin>>input)
cout<<"The Fibonacci number for "<<input<<" is "<<fibo[input]<<endl;
return 0;
}
But i don't know why i get TLE.
Please ...