#include #define int long long #define double long double #define F first #define S second using namespace std; void solve(){ int n,q; cin>>n>>q; int x=1,y=1,c=2; vectorfib; fib.push_back(1); fib.push_back(1); fib.push_back(2); while(c<=2e9){ x=y,y=c; c=x+y; fib.push_back(c); } mapmp; int a[n]; vectorlst[n+1]; for(int i=0;i>a[i]; for(int j=0;j>zap[n]; for(int i=0;i>x>>y; zap[y].push_back({x,i}); } int res[q+1]; int ls[50]; memset(ls,-0x3f,sizeof ls); for(int i=0;i=l); } res[x]=r; } } for(int i=0;i>t; for(int i=1;i<=t;i++){ solve(); } return 0; }