Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

输入的时候要MOD7啊,我范了一个小错误,导致迟迟不AC。,第一次写要判断无解情况的高斯消元。原来以前写的是错的,只能解有解的情况。

Posted by yygy at 2012-10-22 21:36:25 on Problem 2947
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator