Search found 108 matches

by Angeh
Thu Aug 19, 2010 3:47 pm
Forum: Volume 7 (700-799)
Topic: 719 - Glass Beads
Replies: 41
Views: 20718

Re: 719 - Glass Beads

I Need some Clear hints please .....
how to find the O(n) algorithm ...
by Angeh
Sat Aug 14, 2010 2:11 am
Forum: Volume 107 (10700-10799)
Topic: 10743 - Blocks on Blocks
Replies: 20
Views: 11006

Re: 10743 - Blocks on Blocks

hi alll .... can somebody help it doesnt work for n==999 ... returns negative number ..... why???????!!!!!! #include<iostream> using namespace std; const long long Mode=10000; #define FOR(i,n) for(int i=0;i<n;++i) long long matrix[3][3]={0,0,4,1,0,-7,0,1,5},result[3][3],temp[3][3]; void power(int n ...
by Angeh
Wed May 05, 2010 9:34 am
Forum: Volume 4 (400-499)
Topic: 473 - Raucous Rockers
Replies: 16
Views: 7533

Re: 473 - Raucous Rockers

its easy to solve in N^2*m..but i can't get he m*n*t solution
Could anyone Give some hints ....?

thanks in advance ...:)
by Angeh
Fri Apr 23, 2010 10:34 pm
Forum: Volume 113 (11300-11399)
Topic: 11324 - The Largest Clique
Replies: 11
Views: 6561

Re: 11324 - The Largest Clique

Hi all , i'm confused .. whats the problem ... The algorithm is right but is getting WA on the posted Test cases ..:(( /* */ #include<iostream> #include<vector> using namespace std; #define FOR(i,n) for(int i=0;i<n;++i) const int MAX=1010; vector<int> Graph[1010]; struct Union { vector<int> data; Un...
by Angeh
Wed Mar 31, 2010 3:10 pm
Forum: Volume 101 (10100-10199)
Topic: 10187 - From Dusk Till Dawn
Replies: 50
Views: 18220

Re: 10187 - From Dusk till Dawn

I cant understand whats wrong with this code ... could some one give some test case to break my algorithm ....:( /* 11.50 */ #include<iostream> #include<string> #include<map> #include<vector> #include<queue> using namespace std; #define FOR(i,n) for(int i=0;i<n;++i) typedef pair<int ,int > Pii; vect...
by Angeh
Wed Mar 31, 2010 12:55 pm
Forum: Volume 101 (10100-10199)
Topic: 10187 - From Dusk Till Dawn
Replies: 50
Views: 18220

Re: 10187 - From Dusk till Dawn

Hi , experts ...
I need some help , how to constrcut the Graph ????
how to manage the 2-D states ...
thanks in advance ....
by Angeh
Fri Mar 26, 2010 2:23 pm
Forum: Volume 105 (10500-10599)
Topic: 10511 - Councilling
Replies: 26
Views: 11814

Re: 10511 - Councilling

Hi all, i implemented a maxFlow algorithm using adjecency list ...but getting Lime limit ...:( could some one help me how to avoid this problem ... thanks in advance ... #include<iostream> #include<vector> #include<string> #include<map> using namespace std; #define FOR(i,n) for(int i=0;i<n;++i) stru...
by Angeh
Sun Mar 21, 2010 12:49 pm
Forum: Volume 101 (10100-10199)
Topic: 10158 - War
Replies: 23
Views: 9330

Re: 10158 - War

Hi all ,
would sombody how has solved the problem give some hints ...
:(
by Angeh
Fri Mar 19, 2010 11:57 pm
Forum: Volume 1 (100-199)
Topic: 104 - Arbitrage
Replies: 223
Views: 14335

Re: hints for 104

The most important problem of those who cant get Acepted ......
the output may have loops 1->2->3->1->2->3->1 may produce a profit more than .01 but 1->2->3 wont ...
by Angeh
Thu Mar 18, 2010 9:33 pm
Forum: Volume 107 (10700-10799)
Topic: 10731 - Test
Replies: 13
Views: 5562

10731 - Test

I think its a strong connected component problem ... solved it but WA ... Why ???!!!!!!! i cant understand ... I'll be Grateful for any help :) #include<iostream> #include<vector> #include<algorithm> using namespace std; #define FOR(i,n) for(int i=0;i<n;++i) vector<int> Graph[2][26]; // 0 original -...
by Angeh
Thu Mar 18, 2010 2:26 pm
Forum: Volume 108 (10800-10899)
Topic: 10881 - Piotr's Ants
Replies: 12
Views: 6957

Re: 10881 - Piotr's Ants

Thanks for your hints ....:)
i konw these facts, but i'm cofused how to use them ...
i have thought about it for 2 days but still .... nothing ...
by Angeh
Fri Feb 19, 2010 10:21 am
Forum: Volume 108 (10800-10899)
Topic: 10881 - Piotr's Ants
Replies: 12
Views: 6957

Re: 10881 - Piotr's Ants

any hints to solve this problem ....
by Angeh
Thu Feb 18, 2010 6:10 pm
Forum: Volume 117 (11700-11799)
Topic: 11752 - The Super Powers
Replies: 6
Views: 3643

11752 - The Super Powers

Any Ideas How To solve This Problem efficiently ....
and How To handle The overflow?
any help is appreciated.....:)
by Angeh
Thu Feb 18, 2010 4:06 am
Forum: Volume 111 (11100-11199)
Topic: 11157 - Dynamic Frog
Replies: 22
Views: 14119

Re: 11157 - Dynamic Frog

The Answer is Quit easy ....
a O(n) Greedy algorithm ....
if we store each small stone once and each big stone twice in an sorted array .......
the answer is the maximum distance between odd stones and even stones ....
its easy to prove it on paper ...
by Angeh
Wed Feb 10, 2010 6:22 pm
Forum: Volume 114 (11400-11499)
Topic: 11495 - Bubbles and Buckets
Replies: 6
Views: 5025

Re: 11495 - Bubbles and Buckets using bubble sort tle

Use modified Merge sort
See 10810

Go to advanced search