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 1286. Starship Travel

1286 Standart way is too slow
Posted by svr 8 Feb 2007 13:04
A standart way of solution  has appeared too slow(TLE14)!
Standard way is to make Hermit form above __int64
of the matrix
A=
[p q -p -q]
[q p q   p]
or form
[0 0 * *]
[0 0 0 *]
by Gauss operations on columns in int ring.
For initial A and Hermit form answer is equel.
I were very suprized what for so small matrix we have big Time. This is due to many operations need to make zeros.
Re: 1286 Standart way is too slow
Posted by svr 8 Feb 2007 13:10
Excuse me!
I got quick AC(0.015) by replacing __int64 by int
in the same program.
I think that it because weak tests