Search found 6 matches

by seulkiro
Thu Feb 08, 2007 6:55 pm
Forum: Volume 100 (10000-10099)
Topic: 10029 - Edit Step Ladders
Replies: 70
Views: 22376

Re: Runtime error (0.000 CPU, Min memory)

My algo in short is this: hash all words into hash-table, for each word generate all possible edit-steps and check hash-table to see if it exists. Build a graph and do DFS. Im sorry the code's huge. :oops: I don't think that DFS is required to solve this problem. My accepted program is very similar...
by seulkiro
Sat Feb 03, 2007 9:56 pm
Forum: Volume 7 (700-799)
Topic: 705 - Slash Maze
Replies: 13
Views: 11383

Man.. I had a stupid mistake. I was printing ":" after k Cycles instead of ';'. I was somehow getting wrong answer rather than presentation error. I guess it's because of the lack of a blank line after the last case. When I changed ':' to ';' in my output, I got presentation error. And putting a bla...
by seulkiro
Sun Nov 26, 2006 1:49 am
Forum: Volume 101 (10100-10199)
Topic: 10132 - File Fragmentation
Replies: 24
Views: 11827

I used backtracking to solve this problem and got AC 0.020. :wink:

Anyone got AC by naive brute force approach to compare all the possible pairs?
by seulkiro
Sat Nov 18, 2006 3:32 am
Forum: Volume 100 (10000-10099)
Topic: 10055 - Hashmat the Brave Warrior
Replies: 166
Views: 49761

I had to use long long for input in C++. I had a wrong answer when I used int. The problem might be data type you are using. BTW, I'm not familiar with Pascal.
by seulkiro
Thu Nov 16, 2006 8:29 pm
Forum: Volume 2 (200-299)
Topic: 272 - TEX Quotes
Replies: 136
Views: 39000

Hey Rushow.. Does your program print newline for each line? When I tried to compile your code, I got an error saying that main() needs return statement. And when I fixed it and run it, output your program generated didn't have newlines at all for each line. Another thing is that quotes can be broken...
by seulkiro
Fri Nov 10, 2006 9:38 pm
Forum: Volume 6 (600-699)
Topic: 673 - Parentheses Balance
Replies: 243
Views: 51220

Try the following input:

Code: Select all

(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((())))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
64 open brackets and 64 close brackets.

I think the answer should be Yes, since the maximum string length is 128 according to the description.

Go to advanced search