Search found 50 matches

by sidky
Sat Apr 03, 2004 2:47 am
Forum: Volume 106 (10600-10699)
Topic: 10621 - Jack and Jill
Replies: 1
Views: 1646

10621 - Jack and Jill

I used a heap to find the routes, my program ran around 8 seconds and got accepted. how can i speed this up?
by sidky
Thu Mar 18, 2004 6:08 am
Forum: Volume 100 (10000-10099)
Topic: 10005 - Packing polygons
Replies: 49
Views: 15609

Here's my Output: The polygon can be packed in the circle. There is no way of packing that polygon. The polygon can be packed in the circle. There is no way of packing that polygon. The polygon can be packed in the circle. There is no way of packing that polygon. The polygon can be packed in the cir...
by sidky
Mon Mar 08, 2004 2:05 pm
Forum: Volume 4 (400-499)
Topic: 497 - Strategic Defense Initiative
Replies: 144
Views: 21822

i didn't check your code thoroughly, but possibly you should make your data array bigger. my AC prog is capable of handling 1000 heights.
by sidky
Mon Mar 08, 2004 8:42 am
Forum: Volume 4 (400-499)
Topic: 455 - Periodic Strings
Replies: 73
Views: 17451

It seems to me that, you didn't handle multiple input properly. There are blank lines between the cases, and for those strings, your program will produce 0 as output.
by sidky
Mon Mar 08, 2004 8:22 am
Forum: Volume 4 (400-499)
Topic: 482 - Permutation Arrays
Replies: 159
Views: 32309

I just submitted your code with the language C++, and it didn't produce any compile error. Please recheck your submission method.
by sidky
Fri Mar 05, 2004 5:48 pm
Forum: Volume 102 (10200-10299)
Topic: 10235 - Simply Emirp
Replies: 150
Views: 31995

http://online-judge.uva.es/board/viewtopic.php?t=2004

1 or 0 are not even prime. So, they can't be emirp
by sidky
Fri Mar 05, 2004 5:41 am
Forum: Volume 3 (300-399)
Topic: 300 - Maya Calendar
Replies: 69
Views: 10051

The Haab Months can be given in upper case. So, ignore the case while comparing.
by sidky
Tue Mar 02, 2004 8:27 pm
Forum: Volume 104 (10400-10499)
Topic: 10404 - Bachet's Game
Replies: 10
Views: 4697

I don't know about bashe game, so i cant help you with that. But you can solve this problem with dynamic programming.
by sidky
Mon Feb 09, 2004 5:23 pm
Forum: Volume 7 (700-799)
Topic: 760 - DNA Sequencing
Replies: 33
Views: 12867

Actually, this is not a Longest Common Subsequence problem. Instead, you have to find the longest common substring of the given DNA strands.

the output for angga888's input:

Code: Select all

aa
not

Code: Select all

aaaa  <---- Wrong
by sidky
Thu Dec 18, 2003 8:50 am
Forum: Volume 100 (10000-10099)
Topic: 10020 - Minimal coverage
Replies: 57
Views: 20883

This problem is a special judge problem. It wouldn't matter as long as that solves the problem.
by sidky
Sun Nov 09, 2003 4:51 pm
Forum: Volume 101 (10100-10199)
Topic: 10123 - No Tipping
Replies: 2
Views: 2226

10123 - No Tipping

I solved this problem with some recursion. I saved the intermediate values. My program took 9.59 seconds. But a lot of people solved it in 0.0 second. Can anyone please help me, how to speed this up that fast?
by sidky
Mon Oct 13, 2003 8:20 am
Forum: Volume 103 (10300-10399)
Topic: 10324 - Zeros and Ones
Replies: 179
Views: 44569

About 10324:

You cant avoid TLE if you use such search. Try using better search method. Remember that, you only have to consider whether the digits between ith and jth are the same, u dont have to know, whether they are zero or one.
by sidky
Tue Oct 07, 2003 5:18 pm
Forum: Volume 100 (10000-10099)
Topic: 10085 - The most distant state
Replies: 10
Views: 3252

10085 - The most distant state

I solved this problem with simple bfs and it took me almost 10 seconds. But i saw that many people have solved that in 0.000 seconds. Can anyone please help me how can i attain such speed?
by sidky
Thu Sep 11, 2003 8:14 am
Forum: Volume 102 (10200-10299)
Topic: 10268 - 498-bis
Replies: 51
Views: 17876

Maybe the problem is, you used unsigned long to store the value. Although the problem description says that the output will fit in 32 bit integer, but the intermediate values may be larger than that. Try using custom data type for calculation
by sidky
Thu Feb 06, 2003 5:09 pm
Forum: Volume 100 (10000-10099)
Topic: 10020 - Minimal coverage
Replies: 57
Views: 20883

My program produces this output:

Code: Select all

2
-1 3 
3 4 

2
0 1 
1 19 

Go to advanced search