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 |
输入的时候要MOD7啊,我范了一个小错误,导致迟迟不AC。,第一次写要判断无解情况的高斯消元。原来以前写的是错的,只能解有解的情况。mat[i][n]=calc(end)-calc(start)+1; mat[i][n]%=MOD;//这儿要模 这儿要小心相差刚好是7的情况。 当时只考虑到负的情况,只判断了加 if(mat[i][n]<0)mat[i][n]+=MOD; Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator