#SRM

SRM 585

250:递推,从左下角到右下角走一条,剩下的都是子结构 constintmod=1000000007;longlongdp[1000010],s[1000010];classTrafficCongestion{public:inttheMinCars(intn){longlongans=0;dp[0]=1;d...
代码星球 代码星球·2020-08-09

SRM 577 Div II Level Two: EllysRoomAssignmentsDiv2

题目来源: http://community.topcoder.com/tc?module=ProblemDetail&rd=15497&pm=12521这个问题要注意的就是只需要直接将参数ratings中字符串连接起来就可以,不用在每个元素后面加空格.我开始就以为每个元素连接的时候在后面要加...
代码星球 代码星球·2020-08-09

TopCoder SRM704 Div1 800 构造

原文链接https://www.cnblogs.com/zhouzhendong/p/SRM704-800.html考虑构造一个$n=20$的图。先把所有$i$都连向$i-1$,对于所有$i,j(1leqi<j<n)$,加边$i->j$。设$f(i)$表示从点$i$开始经过$icdotsn-1$这些点...
代码星球 代码星球·2020-07-09

最小公倍数 SRM 661 Div1 250: MissingLCM

ProblemStatementTheleastcommonmultiple(denoted"lcm")ofanon-emptysequenceofpositiveintegersisthesmallestpositiveintegerthatisdivisiblebyeachofthem.Fore...