Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
Страница 4 |
If anyone gets WA19... | Hristo Nikolaev (B&W) | 1133. Последовательность Фибоначчи | 9 дек 2022 03:00 | 1 |
Consider the case in which n < i, j That helped me to get AC |
Can someone explain me why's that test case is impossible? | Ivan | 1133. Последовательность Фибоначчи | 14 авг 2022 02:33 | 1 |
-1000 0 0 1 1 My solution do not deal with testcases like this, yet still was accepted. Am I missing something? For those who wonder, my program gives 9079565065540428013 on this testcase lol |
On G++ we can use __int128 | Igor Parfenov | 1133. Последовательность Фибоначчи | 1 авг 2022 02:14 | 1 |
If you calculate with formulas, then long long is not enough. You can use __int128. You can't read and write it, but you can cast it to and from other integer types. |
for runtime error on 10 | Abid29 | 1133. Последовательность Фибоначчи | 9 мар 2021 13:08 | 1 |
intput 4 0 333 0 777 output 0 |
To Get AC test 10 on c++ | i_akash | 1133. Последовательность Фибоначчи | 1 июн 2018 16:56 | 1 |
Use if(c> 8000000000LL || c< -8000000000LL) break ; this line in BInary search... code : [deleted] Edited by author 01.06.2018 17:02 Edited by moderator 20.11.2019 22:45 |
Hints for WA15 | Ade | 1133. Последовательность Фибоначчи | 13 мар 2017 20:16 | 1 |
46 1836311903 -46 -1836311903 45 |
WA #2 | Vishakha Banka | 1133. Последовательность Фибоначчи | 22 янв 2017 19:52 | 1 |
WA #2 Vishakha Banka 22 янв 2017 19:52 I got wrong ans on test case 2. what is the test case? Please help. |
WA8 with formulas | Daniel Mahu | 1133. Последовательность Фибоначчи | 15 окт 2016 18:47 | 2 |
I used the formulas with phi and solved a system of 2 equations to get the coefficients, in python using floats. Any hint why I get WA8? all tests on the forum work. I eventually got AC by trying out several values around the integer the math formula gave and checking each against given initial values. |
Hint: AC in Python 2.7 | SRC | 1133. Последовательность Фибоначчи | 29 июл 2015 15:41 | 1 |
The fastest way is to use matrix exponentiation and it is quite simple to understand. The algorithm is O(log n), yes it is that fast!. I got AC with Python 2.7 with 0.046s. Python has an added advantage for this problem since its Integer type can be as big as the RAM of the device being used. With c++ you can still get answers fast, using matrix exponentiation, but the answers are not precise enough, and leads to WA. Edited by author 29.07.2015 15:42 |
Bugurt thread | Evgeny Shulgin | 1133. Последовательность Фибоначчи | 15 май 2015 01:44 | 2 |
I killed a lot of time writing the solution in C++, Python, Java. Java gives AC with BigInteger -_- It is NOT solvable with int64 It is not solvable BY YOU with int64 |
What is TEST 2? | bluestar | 1133. Последовательность Фибоначчи | 26 мар 2015 14:49 | 3 |
Cleared the fault. But now WA 16. Cleared the fault. But now WA 16. Using C++. Is it a problem due to using long double? |
WA 5. WTF? | nexerd | 1133. Последовательность Фибоначчи | 17 мар 2015 21:41 | 1 |
#include <iostream> #include <conio.h> using namespace std; void find(int j, int i, int &k1,int &k2) { if (j==i+1) return; else { int buf = k1; k1 = k1 + k2; k2 = buf; find(j-1,i,k1,k2); } } int main() { long long Fi, Fj, f1,f2, f3; int i,j,n; cin>>i>>Fi>>j>>Fj>>n; if (j==n) {cout<<Fj<<endl; return 0;} if (i==n) {cout<<Fi<<endl; return 0;} if (i<j) { int buf = i; i = j; j = buf; buf = Fi; Fi = Fj; Fj = buf; } int k1 = 1, k2 = 1; f1 = Fj; if (i!=j+1) { find(i-1,j,k1,k2); f2 = (Fi - k2*Fj)/k1; } else f2 = Fi;
int lim; if (j<0) lim = n - j -1; else if (j == 0 ) lim = n; else lim = n - j +1; for (int count = j +1; count < lim; count++) { f3 = f1 + f2; f1 = f2; f2 = f3; } cout<<f3<<endl; return 0; } |
WA15 with C++ but AC with Python | lennon310 | 1133. Последовательность Фибоначчи | 13 май 2014 08:43 | 1 |
I used C++11 with long long type, still cannot pass #15. After changing my code to python 2.7, I got the AC. Since the input range is [-2000000000,2000000000], long long type should not suffer from overflow. Then what's the reason of WA 15? |
Падает на 6-м тесте, кто-нибудь знает, что там? | Vlad Isayko [SSAU_6107] | 1133. Последовательность Фибоначчи | 29 окт 2013 01:29 | 1 |
|
Runtime error #10 in Java BigInteger | jyysc | 1133. Последовательность Фибоначчи | 31 июл 2013 11:23 | 1 |
It’s Runtime error in case#10 who can tell me Why? 第10组Re为什么? |
WA 10, WA 11 ( if you use a MSVC 2010 ) | Andrew Sboev [USU] | 1133. Последовательность Фибоначчи | 18 мар 2013 19:24 | 1 |
If you precalc real fibonacci numbers from 0 to 2000, double will not be enough - enough will be long double. Keep in mind that in MSVC double and long double are equal, but in GCC they are different; so, if you select at Timus as a compiler a GCC++, everything will be AC :) |
Wrong answer .13 test | Probaa | 1133. Последовательность Фибоначчи | 9 фев 2013 19:50 | 2 |
who know 13 test . Please help me
|
WA #9 Hint | canis_lupus | 1133. Последовательность Фибоначчи | 8 ноя 2013 21:23 | 2 |
It solved my problem 0 1 1 1 0 after this test i pass 9 test and get ac 3 5 -1 4 -1 answear: 4 Edited by author 08.11.2013 21:24 |
Got Wrong Answer on Test3 | Gevorg Soghomonyan | 1133. Последовательность Фибоначчи | 17 сен 2014 21:25 | 3 |
Does anyone what's the test 3????? Edited by author 25.09.2012 09:12 its if n equals to i or j |
Страница 3 |
One test | [MAI] Zhigireva Alex | 1133. Последовательность Фибоначчи | 13 июн 2016 14:08 | 2 |
One test [MAI] Zhigireva Alex 20 июл 2012 18:55 F1 = 1 F4 = 4 what numbers are F2 and F3? F2 = F1+F0 F3 = 2*F1+F0 F4 = 3*F1+2*F0 F0 == 0.5??? anzhig@inbox.ru Edited by author 20.07.2012 18:56 In the problem says: "is an infinite sequence of integers" So, this is an invalid sequence. |