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 |
暴力1A only 157ms 两点注意设求解的循环变量为i 一,i起始值是g,而不用从1开始,显然模g个数值均不同的数是不会小于g的(可以认为是鸽笼原理) 二,bool flag[]设初始false时,memset的最后一个参量应为sizeof(bool)*i,而sizeof(flag)即sizeof(bool)*1000000是多浪费时间不用说了 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator