keep failing, problem is k fibonacci for beginner

I keep failing this problem…
I use vector, and it has TLE, I use dynamic array and it says runtime error…which i think is weird, because vector uses dynamic array and it don’t produce runtime error…weird
and here’s the list of my submission…


I am very close to giving this problem up…but since I decided to give it a try by maybe asking… I used deque as well…and it didn’t work well, by still having TLE

You could have simply used array. Have a look at this->
https://www.codechef.com/viewsolution/18741968

Why complicate things??

It’s bad practice to declare such a big size of array locally. Declare them globally

array gives me runtime error, on the first subtask…I made an array of 200000, and the first subtask gave me…runtime error

https://www.codechef.com/status/KFIB,flaze07 my new solution…I got it all correct, but…I used an array with the same size as the one where an array of the same size gives me runtime error, weird, oh well I am happy

huh…why is it ?

I know it is an old post. But if someone is getting a lot of WA remember you have to mod each value that you are storing in sequence and also mod the final ans. It worked for me.