|
|
back to boardTo admins: Time Limit in Java Posted by crdp 19 Sep 2007 22:47 I have sent two solutions: one in Java, one in Pascal. Java solution is more efficiently. But Java solution got TL1, and Pascal solution got AC. For optimization, i killed making instances of all classes in Java, but still TL1. Can You change java time limit for this problem? Re: To admins: Time Limit in Java There is no possibility to set different TL for different languages in Timus Online Judge. Your Java solution works more than 5 seconds on 1st test. Write more effective solution. By the way, try to avoid Math.hypot in your program; sqrt works faster. Re: To admins: Time Limit in Java Posted by crdp 20 Sep 2007 14:25 Thanks. But I think, that this situation is unfair for Java-programmers. Re: To admins: Time Limit in Java Change Math.hypot to Math.sqrt and you'll get 20x acceleration! Solution will work even faster than your pascal solution. So, this problem can be solved in Java with the same algorithm. |
|
|