Search found 108 matches

by Angeh
Mon Oct 04, 2010 3:27 pm
Forum: Volume 118 (11800-11899)
Topic: 11855 - Buzzwords
Replies: 21
Views: 5291

Re: 11855 - Buzzwords

thanks for your help and sorry for this much Question ...
but if you dont use map , how do save the Hashes ???
i'm confused :(
by Angeh
Mon Oct 04, 2010 3:22 pm
Forum: Volume 118 (11800-11899)
Topic: 11855 - Buzzwords
Replies: 21
Views: 5291

Re: 11855 - Buzzwords

Igor9669 wrote:Yes,it was something likes yours!
try to increase the size of array m!
Array m ?????
do you use STL map to save the Hashes ?
by Angeh
Mon Oct 04, 2010 3:12 pm
Forum: Volume 118 (11800-11899)
Topic: 11855 - Buzzwords
Replies: 21
Views: 5291

Re: 11855 - Buzzwords

ok no problem ... i have Tried what you said ... but i Get Runtime Error ... is your Code Somthing like this .... ? maxes[ k ] is the most repete of string lenght k ... map<long long ,int> MAP; long long P=31; FOR(i,n){ long long Hash=0,Pow=1; for(int j=i;j<n;++i){ Hash += (line[j]-'A'+1)*Pow; MAP[H...
by Angeh
Mon Oct 04, 2010 2:41 pm
Forum: Volume 118 (11800-11899)
Topic: 11855 - Buzzwords
Replies: 21
Views: 5291

Re: 11855 - Buzzwords

I have Got AC this Problem ...
so would you please send me your code
angeh.a2@gmail.com
i Just want to learn more from your code implementation
by Angeh
Mon Oct 04, 2010 1:36 pm
Forum: Volume 118 (11800-11899)
Topic: 11855 - Buzzwords
Replies: 21
Views: 5291

Re: 11855 - Buzzwords

wouldn't long long overflow for strings of size = 999 ?
31^999 ??
Does your Code Work for Case:
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
?
by Angeh
Mon Oct 04, 2010 12:59 pm
Forum: Volume 118 (11800-11899)
Topic: 11855 - Buzzwords
Replies: 21
Views: 5291

Re: 11855 - Buzzwords

Hi ,Igor ...
0.536 is Good Time
do you hash all n(n-1)/2 strings ?
Then How do you Hash them whats your Function for hashig ... ?
by Angeh
Mon Oct 04, 2010 5:08 am
Forum: Volume 118 (11800-11899)
Topic: 11855 - Buzzwords
Replies: 21
Views: 5291

11855 - Buzzwords

why is the First Input
5
4
4
2
2

???

Edit :
GOT AC ... in 0.9
The Test Cases Are Wrong ...
But How to get AC in Less Time ... ???
I Used Trie !! counted the max of each Level .... 26 * N(N-1)/2
is There Any other solution ?????
by Angeh
Thu Sep 30, 2010 3:38 am
Forum: Volume 118 (11800-11899)
Topic: 11828 - Palindrome Again
Replies: 6
Views: 2280

11828 - Palindrome Again

HI all ...
Any Hints How to avoid TLE ... !!!!?
by Angeh
Fri Sep 24, 2010 1:40 am
Forum: Volume 118 (11800-11899)
Topic: 11823 - Two Longest Paths
Replies: 0
Views: 1088

11823 - Two Longest Paths

I Used MinCost - maxFlow with Bellman Ford ....
How Can i Use Dijkstra instead of Bellman Ford ... ??
How To set The Initial vertex Potential .. ?
by Angeh
Wed Sep 22, 2010 11:30 pm
Forum: Volume 118 (11800-11899)
Topic: 11825 - Hackers' Crackdown
Replies: 5
Views: 3782

Re: 11825 - Hackers’ Crackdown

Got Accept in 1.127 :D by using Backtracking ... DP is not essential ...
by Angeh
Wed Sep 22, 2010 6:41 pm
Forum: Volume 111 (11100-11199)
Topic: 11167 - Monkeys in the Emei Mountain
Replies: 30
Views: 15005

Re: 11167 - Monkeys in the Emei Mountain

Hi,Experts ... i used FordFolkerson-Edmond Krap maxFlow Algorithm ... i'm getting continuously WA ... Why!!!!! check every thing 100 of thimes .... :(( i'm going crazy ...:(( can somebody help me ... or if solved by this Method PM his/her code ... I, have got AC on Problem 11358 (The same Without Pr...
by Angeh
Sat Sep 18, 2010 3:19 am
Forum: Volume 7 (700-799)
Topic: 714 - Copying Books
Replies: 29
Views: 19339

Re: 714 - Copying Books

1
6 3
8 3 5 4 1 10

Angeh
by Angeh
Wed Sep 15, 2010 10:59 am
Forum: Volume 104 (10400-10499)
Topic: 10459 - The Tree Root
Replies: 30
Views: 9956

Re: 10459 - The Tree Root

:(( whats wrong withm this code .. the Algorithm is to Find First the Best rrots ... then Run a BFS with the source of Best roosts and find the nodes with Maximum Depht ... whats wrong ???? :(( thanks ... #include<iostream> #include<vector> #include<queue> using namespace std; #define FOR(i,n) for(i...
by Angeh
Fri Sep 03, 2010 9:50 am
Forum: Volume 117 (11700-11799)
Topic: 11700 - Pipes
Replies: 1
Views: 2213

Re: 11700 - Pipes

of course A simple Backtracking with A little Pruning Will work well... notice that the Branching factor is not 4 ... 1-there are only 2 valid rotation for cell row=1,col=1 if the number of lines in it is 1 , else you have only one valid rotation ... 2-never you need to rotate an empty or complete F...
by Angeh
Thu Sep 02, 2010 1:53 pm
Forum: Volume 113 (11300-11399)
Topic: 11365 - Copying DNA
Replies: 12
Views: 5268

Re: 11365 - Copying DNA

HI Experts, my BFS Solution Code Exceeds Time Limit Could Some One Give some Hints For the Solution ... or send his code for me ( angeh.a2@gmail.com ) Thanks Soooo much ... #include<iostream> #include<queue> #include<algorithm> #include<map> using namespace std; #define FOR(i,n) for(int i=0;i<n;++i)...

Go to advanced search