P11145 「SFMOI Round I」Strange Homura Game

笔记

P11145 「SFMOI Round I」Strange Homura Game 很臭的题号…… 观察到 xx 的范围远大于 mm,询问一个很大的 x1x_1,得到回答 y1y_1,设 x1=km+y1x_1=km+y_1,则有 x1−y1=kmx_1-y_1=km, 这时令 x2=x1−y1−1x_2=x_1-y_1-1,不难发现返回的结果正好是 m+1m+1,这道题就被我们观察出来了。 代码: #include using namespace std; #define int long long %fffrf int T; signed main(){ cin>>T; while(T--){ int x1=5e17,y1,y2; cout>y1; cout>y2; cout `#include using namespace std; #define int long long %fffrf int T; signed main(){ cin>>T; while(T--){ int x1=5e17,y1,y2; cout"? " cin>>y1; cout"? "1 cin>>y2; cout"! "1 } return 0; } `

Read more · Journal