Search found 28 matches

by SePulTribe
Sat Dec 04, 2010 7:43 pm
Forum: Volume 118 (11800-11899)
Topic: 11800 - Determine the Shape
Replies: 47
Views: 20379

Re: 11800 - Determine the Shape

Hi guys. I finally solved it after 11 tries! No need for anything fancy. Use long long and make sure EVERYTHING is done in long long. Don't use any double or it'll fail (I think there are test cases that involve vectors that are very very small degrees apart, thereby causing problems with floating p...
by SePulTribe
Wed Dec 01, 2010 1:54 pm
Forum: Volume 4 (400-499)
Topic: 444 - Encoder and Decoder
Replies: 155
Views: 41947

Re: i got Runtime error in 444 !!! but why

This problem is lying. I had my input array at 100 before and it gave me RTE. I increased it to 1000 and it worked. Stupid.
by SePulTribe
Sun Nov 14, 2010 8:30 am
Forum: Volume 112 (11200-11299)
Topic: 11240 - Antimonotonicity
Replies: 33
Views: 16427

Re: 11240 - Antimonotonicity

Don't forget that if after the first maximum point you encounter a monotonic sequence, the most extreme point of the monotonic sequence will replace the current last element of the subsequence that has been observed so far.
by SePulTribe
Thu Nov 11, 2010 11:27 pm
Forum: Volume 108 (10800-10899)
Topic: 10879 - Code Refactoring
Replies: 17
Views: 11110

Re: 10879 - Code Refactoring

Hi guys, This is my code. I've tested it with everything and it still fails. Is it possible for you guys to help? I'm very frustrated. #include <cassert> #include <cstdio> #include <cmath> using namespace std; long long N, yy, ii, sq, K, countee, prev; int main(void) { scanf("%lld\n", &...
by SePulTribe
Sun May 30, 2010 5:43 pm
Forum: Volume 103 (10300-10399)
Topic: 10385 - Duathlon
Replies: 16
Views: 9888

Re: 10385 - Duathlon

Remember to set precision to 0.001 if using ternary search! Caused me lots of headaches.
by SePulTribe
Sun Sep 06, 2009 2:01 pm
Forum: Volume 115 (11500-11599)
Topic: 11512 - GATTACA
Replies: 23
Views: 12685

Re: 11512 - GATTACA

Here are some killer test cases. The .in file is the input file and the .out file is for you to compare against. Good luck!
by SePulTribe
Tue Mar 24, 2009 10:18 am
Forum: Volume 112 (11200-11299)
Topic: 11275 - 3D Triangles
Replies: 6
Views: 4313

Re: 11275 - 3D Triangles

This question is quite crazy. I've tried many algorithms from Möller to Held to even Guigue but they all took more than 2 seconds and TLEd. I nearly gave up until I tried an algorithm from Hao Shen, Pheng Ann Heng and Zesheng Tang which was the only one which took less than a second to complete. Ama...
by SePulTribe
Wed Mar 04, 2009 7:42 pm
Forum: Volume 112 (11200-11299)
Topic: 11280 - Flying to Fredericton
Replies: 43
Views: 21828

Re: 11280 - Flying to Fredericton

I modified Bellman-Ford but it keeps WA-ing even though I've tried it with many different test cases, including the ones in this forum. Please help! // removed after AC Finally got AC! I found something weird though. From all the proofs I've seen, they do not state that the order of the edges matter...
by SePulTribe
Fri Feb 27, 2009 3:15 pm
Forum: Volume 112 (11200-11299)
Topic: 11283 - Playing Boggle
Replies: 19
Views: 10962

Re: 11283 - Playing Boggle

Thanks man. I got an AC. Turns out my mistake was to count the score in the DFS. Even with a flag to supposedly prevent the counting of the score more than once for a word, the judge's test cases still managed to make it fail.
by SePulTribe
Tue Feb 24, 2009 12:04 pm
Forum: Volume 112 (11200-11299)
Topic: 11283 - Playing Boggle
Replies: 19
Views: 10962

Re: 11283 - Playing Boggle

This is my code. It seems so correct, but it keeps getting WA no matter the fact that I've tried many test cases and checked with different sites. Please help.

Code: Select all

Removed after AC

by SePulTribe
Fri Aug 22, 2008 8:29 pm
Forum: Volume 1 (100-199)
Topic: 147 - Dollars
Replies: 233
Views: 48172

147 TLE despite working for all inputs instantaneously

My code below works perfectly fine with a file with inputs from 5c to $300 instantaneously but the online judge keeps complaining of TLE. Does anybody know why? import java.util.Arrays; import java.util.Scanner; class Main { private static long values[] = new long[6001]; private final static int[] c...
by SePulTribe
Wed Dec 08, 2004 8:49 pm
Forum: Volume 6 (600-699)
Topic: 623 - 500!
Replies: 187
Views: 67749

Haha I will keep posting. And thanks!
by SePulTribe
Sat Dec 04, 2004 5:12 pm
Forum: Volume 6 (600-699)
Topic: 623 - 500!
Replies: 187
Views: 67749

Hey!!! Thanks so much for your help! I followed exactly what you said and true enough I got AC for it. And my code is amazingly fast. I tried it on my comp with an input file containing the numbers 0 to 1000 and it took only about 6 seconds. Anyways, my prog took up 2942 KB of memory. Haha this has ...
by SePulTribe
Fri Dec 03, 2004 5:59 pm
Forum: Volume 6 (600-699)
Topic: 623 - 500!
Replies: 187
Views: 67749

Umm there's a probem with that.My code is now 1.1MB! And the judge has a limit of 40KB on source code. My code works perfectly fast though. Haha.
by SePulTribe
Fri Dec 03, 2004 7:55 am
Forum: Volume 6 (600-699)
Topic: 623 - 500!
Replies: 187
Views: 67749

Yeah I was thinking of precalculation too but, if 500! has 1000 digits, precalculation will take up too much memory!

Go to advanced search