正文
增加 7 行删除 7 行
20 行未改动2122232425262728293 行未改动3334353637383940412 行未改动44454647484950515211 行未改动646566676869707172737475767778798081828323 行未改动20 行未改动#define pc _putchar_nolock#endif#define int long long#define _ read<int>()#define rint register inttemplate<class T>inline T read(){T r=0,f=1;char c=gc();while(!isdigit(c))3 行未改动}while(isdigit(c)) r=(r<<1)+(r<<3)+(c^48),c=gc();return f*r;}inline void out(int x){if(x<0) pc('-'), x=-x;if(x<10) pc(x+'0');else out(x/10),pc(x%10+'0');2 行未改动signed main(){rint t=_;static int a[100];a[1]=1;a[2]=1;for(int i=3;i<=91;i++){a[i]=a[i-1]+a[i-2];11 行未改动if(d==0){bx=px;by=py-a[i];//向下}else if(d==1){bx=px+a[i-1];by=py;//向右}else if(d==2){bx=px-(a[i]-a[i-1]);by=py+a[i-1];//向上}else{bx=px-a[i];by=py-(a[i]-a[i-1]);//向左}23 行未改动20 行未改动2122232425262728293 行未改动3334353637383940412 行未改动44454647484950515211 行未改动646566676869707172737475767778798081828323 行未改动20 行未改动#define pc _putchar_nolock#endif#define int long long#define _ read<int>()#define rint register inttemplate<class T>inline T read(){T r=0,f=1;char c=gc();while(!isdigit(c))3 行未改动}while(isdigit(c)) r=(r<<1)+(r<<3)+(c^48),c=gc();return f*r;}inline void out(int x){if(x<0) pc('-'), x=-x;if(x<10) pc(x+'0');else out(x/10),pc(x%10+'0');2 行未改动signed main(){rint t=_;static int a[100];a[1]=1;a[2]=1;for(int i=3;i<=91;i++){a[i]=a[i-1]+a[i-2];11 行未改动if(d==0){bx=px;by=py-a[i];//向下}else if(d==1){bx=px+a[i-1];by=py;//向右}else if(d==2){bx=px-(a[i]-a[i-1]);by=py+a[i-1];//向上}else{bx=px-a[i];by=py-(a[i]-a[i-1]);//向左}23 行未改动