Search found 5 matches

by karu
Thu Jun 29, 2006 9:49 am
Forum: Volume 5 (500-599)
Topic: 551 - Nesting a Bunch of Brackets
Replies: 56
Views: 11840

The problem description is completely wrong. "In this problem we consider expressions containing brackets that are properly nested. These expressions are obtained by juxtaposition of properly netsted expressions in a pair of matching brackets, the left one an opening and the right one a closing brac...
by karu
Wed Jun 28, 2006 12:36 pm
Forum: Volume 5 (500-599)
Topic: 526 - String Distance and Transform Process
Replies: 34
Views: 15436

I was getting WA on this problem until I realised the that it didn't say anywhere in the input that the strings weren't empty. I got AC after I made my program handle empty lines (and spaces). Here is some input and the output generated by my AC program. Input: testing a b Output: 7 1 Delete 7 2 Del...
by karu
Thu Jun 22, 2006 5:42 am
Forum: Other words
Topic: Help with string tying problem
Replies: 1
Views: 1652

I figured out how to do it - brute force + recursion + memoization. I was missing the memoization before, I never realised it would make that much difference...
by karu
Mon Jun 19, 2006 8:59 am
Forum: Other words
Topic: Help with string tying problem
Replies: 1
Views: 1652

Help with string tying problem

I've been trying to do this problem for a few days and have had pretty much no success whatsoever. I just need the basic algorithm, or even what kind of algorithm to use. On the table in front of you lie a bunch of pieces of coloured thread. All the threads are different colours and the ends have be...
by karu
Mon Jun 19, 2006 6:32 am
Forum: Other words
Topic: Bricks problem
Replies: 1
Views: 1760

Here is what I would do (in C++): int main(){ //in the comments i assume m is the horizontal dimension and n is the vertical dimension int n, m, k; cin>>n>>m>>k; int maxn=n/k;//maximum number of bricks that can be laid down the board int maxm=m/k;//maximum number of bricks that can be laid across th...

Go to advanced search