Search found 20 matches

by harry
Sun Feb 27, 2005 10:07 pm
Forum: Volume 108 (10800-10899)
Topic: 10810 - Ultra-QuickSort
Replies: 36
Views: 20669

10810 confuse

can any one explain why the output for 5 9 1 0 5 4 is 6 it seems to be 5 for me using mergesort here is my code #include<stdio.h> #include<stdlib.h> #define Max 500000 #define MaxValue 999999999 long long int A[Max+2],temp[Max+2],R[Max+2],swap,s,n,inf = MaxValue+1; void merge(long long int numbers[]...
by harry
Sat Jan 01, 2005 10:28 am
Forum: C
Topic: help needed for priority queue using stl?
Replies: 2
Views: 1846

thanks for the reply.
i have got the website.
but i could not find any help what i needed.
so i asked for help in the board.

can u explain how can i do that.
one thing i want to use priority queue
by harry
Fri Dec 31, 2004 8:49 pm
Forum: C
Topic: help needed for priority queue using stl?
Replies: 2
Views: 1846

help needed for priority queue using stl?

i want to insert two types of value in a proirity q using stl. the problem is shown in the follwing example: 10 1 100 2 12 4 1000 3 so if i call q.top() then it will be 1000. now i also want to get the position of 1000 which is 3. how can i get it. details information will be helpful. thanks in adva...
by harry
Fri Dec 17, 2004 7:32 pm
Forum: Volume 105 (10500-10599)
Topic: 10592 - Freedom Fighter
Replies: 17
Views: 9632

hi everybody.
can anybody who got a.c. explain his algo.
i got stuck to solve this problem.
plz........
by harry
Sun Dec 12, 2004 8:36 pm
Forum: Algorithms
Topic: need to learn basic geometry
Replies: 1
Views: 1571

need to learn basic geometry

hi everybody.i became very week in geometry(due to lack of practice).
so can someone provide me some online references so that i could get some help from the very begining.
n.b: i find hard searching at mathworld
by harry
Sun Dec 12, 2004 8:24 pm
Forum: Volume 107 (10700-10799)
Topic: 10791 - Minimum Sum LCM
Replies: 46
Views: 22252

thanks adrian . i was thinking in a wrong way.i forgot to consider
"Clearly, each pi^qi has to be a divisor of one of the numbers"
by harry
Sun Dec 12, 2004 8:12 pm
Forum: Volume 107 (10700-10799)
Topic: 10791 - Minimum Sum LCM
Replies: 46
Views: 22252

now i am a bit confused.how can i get solution for such input.
by harry
Sun Dec 12, 2004 8:09 pm
Forum: Volume 107 (10700-10799)
Topic: 10791 - Minimum Sum LCM
Replies: 46
Views: 22252

what abt 4
4 = 4,since 2*2=4 but lcm of 2,2=2;//corrcted
or 4 = 5, 4*1=4,4+1=5
by harry
Sun Dec 12, 2004 7:39 pm
Forum: Volume 107 (10700-10799)
Topic: 10791 - Minimum Sum LCM
Replies: 46
Views: 22252

hi totster.
should the answer of 234 be 21.
you have write for 234 , 24
atleat i can say that 234=2*3*3*13,then sum =21.
by harry
Sun Dec 12, 2004 6:00 pm
Forum: Volume 107 (10700-10799)
Topic: 10793 - The Orc Attack
Replies: 35
Views: 19608

thanks a lot.really a silly mistake.thanks onece again.
by harry
Sun Dec 12, 2004 12:11 pm
Forum: Volume 107 (10700-10799)
Topic: 10793 - The Orc Attack
Replies: 35
Views: 19608

the shortest one.


if(G[s][e]>cost)
{
G[s][e]=cost;
G[e][s]=cost;
}
hope i am right
by harry
Sun Dec 12, 2004 11:19 am
Forum: Volume 107 (10700-10799)
Topic: 10793 - The Orc Attack
Replies: 35
Views: 19608

10793 - The Orc Attack

Hi every body. this problem seems to be easy. what i have done is 1. i used floyd warshall for shortest distance 2. then check whether any point exist which is equidistance from 1,2,3,4,5 (the fr five points) 3.if such point exists then did what the problem said. sorry for paosting the code. but i h...
by harry
Fri Oct 22, 2004 8:49 pm
Forum: Algorithms
Topic: k-th shortest path
Replies: 2
Views: 1246

k-th shortest path

can some body give me some useful link for finding the k-th shortest path in c or c++.
by harry
Fri Sep 24, 2004 7:17 pm
Forum: Volume 100 (10000-10099)
Topic: 10092 - The Problem with the Problem Setter
Replies: 31
Views: 12529

Thanks a lot. :wink:
Finally i got A.C. :lol:
by harry
Sat Sep 18, 2004 8:06 am
Forum: Volume 100 (10000-10099)
Topic: 10092 - The Problem with the Problem Setter
Replies: 31
Views: 12529

10092 Why this code gives w.a.

i have solved several problems of bm using my modified ford fulkerson
algorithm.
but why the following code gives w.a.
plz help.thanks in advance.

Code: Select all

Code removed .Got A.C. :lol: 

Go to advanced search