Search found 7 matches

by Karim
Wed Mar 14, 2007 5:52 pm
Forum: Volume 100 (10000-10099)
Topic: 10029 - Edit Step Ladders
Replies: 70
Views: 33486

10029 TLE

I tried to solve the problem but i am getting TLE

My algorithm is :

1) Read the words and insert in map
2) generate all edit step words from each word (i) and if the word

exist then add edge between word (i) and the other word
3) DFS to get Max depth

I think it works in 25000*16*26*(log 25000 ...
by Karim
Sat Jan 20, 2007 7:25 pm
Forum: Volume 111 (11100-11199)
Topic: 11155 - Be Efficient
Replies: 15
Views: 13184

my algorithm is trying all subsets and check if divisible by m

i think O( n ^ 2)
by Karim
Sat Jan 20, 2007 6:47 pm
Forum: Volume 111 (11100-11199)
Topic: 11155 - Be Efficient
Replies: 15
Views: 13184

11155 - Be Efficient

Can anyone tell me whats the idea of this problem

cause i am getting TLE

thanks
by Karim
Mon Jan 01, 2007 6:05 pm
Forum: Volume 111 (11100-11199)
Topic: 11151 - Longest Palindrome
Replies: 65
Views: 43110

i used longest common subsequence between string A and reversed string A

but i am getting WA

can anyone help me ??

Code: Select all

cut got AC 
a stupid mistake :oops: (small array )

Thanks
by Karim
Sun Dec 31, 2006 1:12 pm
Forum: Volume 111 (11100-11199)
Topic: 11151 - Longest Palindrome
Replies: 65
Views: 43110

Can u Explain your algorithm ..???

Thanks
by Karim
Sun Dec 31, 2006 3:03 am
Forum: Volume 111 (11100-11199)
Topic: 11151 - Longest Palindrome
Replies: 65
Views: 43110

11151 WA

I am getting wrong answer but i dont know why

can anyone tell me

Here is the code

#include<iostream>
#include<string>
#include<algorithm>
using namespace std;

string s,t1,t2;

int main()
{
//freopen("d.in","rt",stdin);
int t;
int i,j;

cin>>t;
getline(cin,s);
for(i=0;i<t;i ...
by Karim
Sat Oct 07, 2006 6:55 pm
Forum: Algorithms
Topic: Help with DP
Replies: 1
Views: 1982

Help with DP

i code DP(LCS)using memoization

i am facing a problem in how to find the sequence it self

not how long is it

my function works fine in getting the length of the sequnce

but i dont know how to get the sequence please can anyone help me

here is my function

int LCS (int i , int j)
{

if(i ...

Go to advanced search