ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1041. Nikifor

WA 20 (new test)
Posted by LLI_E_P_JI_O_K 23 Apr 2023 15:12
If you got problems with WA 20 (new test), just know - it is because of precision issue. Not use double or long double - only long integer arithmetic   or   integer modular arithmetic.

P.S.
   authors of new tests - it is not good to add tests to the OLD task after 23 years of time passed. It is so strange. Why authors of solutions must return to the OLD task and resolve it again???????
Re: WA 20 (new test)
Posted by Bunny Peng 23 Apr 2023 23:39
Thanks LLI! By the way, I used integer modular arithmetic in the first place, and still got WA 20 after rejudge.

After some debugging I realize I checked the linear independency incorrectly (in particular, I did the row echelon form wrongly). Here is the test case helped me find out the bug:

Input:
5 4
1 2 3 4
2 4 5 9
3 6 7 1
1 1 1 9
3 2 1 9
1
2
3
4
5

Expected output:
10
1
2
3
4