Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:自己推了一个公式 :)In Reply To:自己推了一个公式 :) Posted by:888899977 at 2007-10-12 17:25:56 > int f(int n,int m,int t) > { > if(t==1) return (m-1)%n; > else return (m%n+f(n-1,m,t-1))%n; > }//n人报m第t轮出列的人的编号(从0到n-1) > > 这样就可以ac了。 Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator