link/cut tree
[kudsource.git] / POJ / 2748.cc
blob3af16bbbf771fa4637b1f57fe29af609f550736b
1 #include <cstdio>
2 #include <algorithm>
4 using namespace std;
6 const int maxn=150000;
8 int f[maxn]={0,1,1,2};
10 int main()
12 int tcase;
13 long long n;
14 scanf("%d",&tcase);
15 for (int i=3; i<maxn; ++i) f[i]=(f[i-1]+f[i-2])%100000;
16 while (tcase--)
18 scanf("%lld",&n);
19 --n<<=1;
20 printf("%d\n",f[++n%maxn]);
22 return 0;