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 1627. Join

I am really poor
Posted by Mahilewets 8 May 2017 14:30
So,  I just wrote solution with C long double and got WA #5 (Laplacian).
Then I just rewrote it in Python with decimal.py and got WA...#3! Then I started to add more precision to decimal and got TLE #3.
Yeah, I use some epsilon constant and add it to determinant  before convert determinant to integer and get its modulo  10**9.
Re: I am really poor
Posted by Mahilewets 8 May 2017 16:08
Lol
FINALLY  understand
I should just made M[row] [col] =LCM
Re: I am really poor
Posted by Mahilewets 8 May 2017 17:14
Re: I am really poor
Posted by Mahilewets 8 May 2017 17:19
Yeah!
I tried this:
3 3
***
*.*
***

And got zero,  not one!
Should correct...
Re: I am really poor
Posted by Mahilewets 8 May 2017 17:42
Corrected that input for 3 3.
But WA#6 still!!!
http://ideone.com/KGeDMM

Edited by author 08.05.2017 17:42
Re: I am really poor
Posted by Mahilewets 8 May 2017 18:46
WA #8.
I am really frustrated.
http://ideone.com/7nPKN0

That time without fractions.  Used decimal with 1450 digits after point.

Edited by author 08.05.2017 18:47
Re: I am really poor
Posted by Mahilewets 8 May 2017 19:12
I realized I need not determinant of a whole matrix but just a minor.
 http://ideone.com/5H6ARH
Submitted corrected solution with Fractions.
Buuut!!  WA #8 still...
Re: I am really poor
Posted by Mahilewets 8 May 2017 19:38
ULTIMATELY got it.
It was really fun...
http://ideone.com/CIEdmo