摘要:
题意:给出x 和k,求解p和q使得等式x = p[x / k] + q [ x / k], 两个[x / k]分别为向下取整和向上取整题解:扩展欧几里得//meek///#include#include #include #include #include #include #include #in... 阅读全文
摘要:
Larry is very bad at math — he usually uses a calculator, whichworked well throughout college. Unforunately, he is now struck ina deserted island with... 阅读全文
摘要:
D. ZumaGenos recently installed the game Zuma on his phone. In Zuma there exists a line ofngemstones, thei-th of which has colorci. The goal of the ga... 阅读全文
摘要:
C. Chain ReactionThere arenbeacons located at distinct positions on a number line. Thei-th beacon has positionaiand power levelbi. When thei-th beacon... 阅读全文
摘要:
B. Hamming Distance SumGenos needs your help. He was asked to solve the following programming problem by Saitama:The length of some stringsis denoted|... 阅读全文
摘要:
A. Saitama Destroys HotelSaitama accidentally destroyed a hotel again. To repay the hotel company, Genos has volunteered to operate an elevator in one... 阅读全文