Is there anyone who has solved this problem
https://www.spoj.pl/problems/HASHIT/ . Its not a tough problem but i am
having lots of trouble getting it accepted. Can some one who has it accepted
give some test cases.
--~--~-~--~~~---~--~~
You received this message
http://blog.aminooo.com/?p=54
Blog.aminooo.com
www.Aminooo.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com
To
Problem B:
My idea is to have a set(can be implemented using STL's std::set) with
key being a pair (dx,dy).
now, i go through all pairs of points, and i construct the key(x_1-
x_0,y_1,y_0) for them. The idea is that if i have L pairs each with
the same (dx,dy), every two pairs make a
About question C:
I think we can first sort the separating lines according to, say, the
upper coordinate, and then, for each toy, do a binary search, find out
the two adjacent separators that one is to his left, and the other to
his right. To find out of which side the toy is, you can use cross
I have an idea for D as well.
First, suppose we are given an upper bound T on the projects finish
time. we thus want to assign jobs for each employee that this
employees total time doesn't exceed this upper bound T.
This we can do using dynamic programming in O(m^2 * n)
We maintain a table
Question F:
You are given relations A is greater than B.
You create a graph, in which all such pairs form a directed edge
(A,B).
Thus, we want to find for each bead, how many beads it can rach, and
how many can reach it.
This graph is acyclic, and thus, a DAG. Do a topological sort. Then,
use
Yep, something like
define A[1..n]
Gen(k, l):
if(k==0)
print A;
for(i=1; i=l; i++)
Gen(k-1, A[k]=i);
And, in your case, you should call Gen(n, 3), since you want it with 3
numbers (e.g. s,d,t will equal 1,2,3)
On Jul 9, 12:18 pm, Miroslav Balaz gpsla...@googlemail.com wrote:
LOL,
the lexicographical permutation is solution .am i rite??
On Fri, Jul 10, 2009 at 6:33 PM, Spiritus spirit...@gmail.com wrote:
Yep, something like
define A[1..n]
Gen(k, l):
if(k==0)
print A;
for(i=1; i=l; i++)
Gen(k-1, A[k]=i);
And, in your case, you should call Gen(n, 3),
hello :
dear Sirs And Madams :
I want c++ sorcre code program for those 4 problems . I sincerely hope you
will be able to help me in this matter . Iwould greately apperciate an early
reply
fithfully yours
--~--~-~--~~~---~--~~
You received this message because