146. The Runner time limit per test: 0.25 sec.memory limit per test: 4096 KB input: standard inputoutput: standard output The runner moves along the ring road with length L. His way consists of N intervals. First he ran T1 minutes with speed V1, then…
比如模数是1e15这种,相乘的时候爆LL了,但是又不想用大数,咋办呢? long long ksc(long long a, long long b, long long mod){ ; while(b){ ) res = (res + a)%mod; (a<<=)%=mod; b >>= ; } return res; } 转long double再搞回来 <算法竞赛进阶指南> 听说很稳? a∗bmodp=a∗b−⌊a∗bp⌋∗pa∗bmodp=a∗b−⌊a∗bp⌋∗…
pog loves szh II Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 2106 Accepted Submission(s): 606 Problem Description Pog and Szh are playing games.There is a sequence with n numbers, Pog wi…