版本比较
题解:AT_abc129_f [ABC129F] Takahashi's Basics in Education and Learning
正文
增加 2 行删除 2 行
53 行未改动5455565758596061623 行未改动66676869707172737453 行未改动{base.n=base.m=3;base.a[1][1]=pw%p;base.a[3][2]=b%p;base.a[2][1]=base.a[2][2]=base.a[3][3]=1;if(pw>a){int tmp=(pw-a-1)/b+1;if(tmp>n) tmp=n;3 行未改动a+=tmp*b;ans=ans*qpow(base,tmp);}}}cout<<ans.a[1][1];return 0;}```53 行未改动5455565758596061623 行未改动66676869707172737453 行未改动{base.n=base.m=3;base.a[1][1]=pw%p;base.a[3][2]=b%p;base.a[2][1]=base.a[2][2]=base.a[3][3]=1;if(pw>a){int tmp=(pw-a-1)/b+1;if(tmp>n) tmp=n;3 行未改动a+=tmp*b;ans=ans*qpow(base,tmp);}}}cout<<ans.a[1][1];return 0;}```