找最近的数 记忆化 (我也不知道为什么对的) #include<cstdio> #include<algorithm> #include<map> using namespace std; int q,lim=85,id; long long F[105]; map<long long,int> M; int dfs(long long x){ if (M[x]) return M[x]; int id1=lower_bound(F+1,F+lim+1,x)…
题目描述 The Fibonacci sequence is a sequence of integers, called Fibonacci numbers, defined as follows: Fib0=0,Fib1=1,Fibn=Fibn−2+Fibn−1 for n>1Fib_{0}=0,Fib_{1}=1,Fib_{n}=Fib_{n-2}+Fib_{n-1}\ for\ n>1Fib0=0,Fib1=1,Fibn=Fibn−2+Fibn−1 for n>1 It…