Search found 8 matches

by nahidshahin
Fri Oct 22, 2004 7:03 am
Forum: Volume 107 (10700-10799)
Topic: 10744 - The Optimal Super-Highway
Replies: 29
Views: 19197

Need Help on p10744

shahriar_manzoor wrote:
There are ways to find medians in linear time
But I can't understand How I find medians in linear time ? I use partition method that use quick sort.
But it's worst case complexity is O(nlogn)

Please some one help me to get medians in linear time.
by nahidshahin
Wed Sep 15, 2004 5:28 am
Forum: Volume 3 (300-399)
Topic: 358 - Don't Have A Cow
Replies: 52
Views: 16382

p358 Don't Have A Cow, Dude Why WA

I don't understand why I get wa in this easy problem.
The idea is easy. (Bsearch)
But what is the reson of wa.
Can any one give any correction ?
Here My code



#include <stdio.h>
#include <math.h>
#define esp 0.000001

double pi,r,p;

double area(double rp) {
double x,y,theta,arp,ar;
x = (rp*rp ...
by nahidshahin
Mon Aug 02, 2004 5:05 am
Forum: Volume 100 (10000-10099)
Topic: 10000 - Longest Paths
Replies: 160
Views: 56508

10000

why DFS not work here.
But BFS working
I get AC using BFS
by nahidshahin
Mon Jul 12, 2004 4:23 am
Forum: Java
Topic: Does Any one know that Java support BigInteger Class ?
Replies: 6
Views: 4163

Does Any one know that Java support BigInteger Class ?

Does Any one know that Java support BigInteger Class ?
I am new in java.
Please Help me.
Bye
by nahidshahin
Mon Jun 14, 2004 4:35 am
Forum: Algorithms
Topic: what is NP Complete what use of NP Complete
Replies: 2
Views: 1335

what is NP Complete what use of NP Complete

Hello
Can any one explain what is NP Complete.
And what the use of NP Complete.
Thanks
by nahidshahin
Sun Mar 28, 2004 4:06 am
Forum: Volume 102 (10200-10299)
Topic: 10283 - The Kissing Circles
Replies: 13
Views: 7257

10283

I don't know where the error of my code. Why it produce wrong when big number is given.Please some one help me.
Here my code

#include <stdio.h>
#include <math.h>

void main() {
long double n,R,r,t,bluearea,greenarea,pi,pi_n,t1;
pi = 2.0 * acos(0);
while(scanf("%Lf%Lf",&R,&n) != EOF) {
if(n==1 ...
by nahidshahin
Tue Dec 16, 2003 4:01 am
Forum: Algorithms
Topic: Help to find number of swap operation need to sort data
Replies: 17
Views: 7516

Thanks Andrey
You are right, i want to find the least possible number of exchanges.
Your method is first, but I can't understand the term "cycle".
Why 4 2 3 1 is written (14)(2)(3) why not (14)(23).
and how 4 2 3 1 => (14)(2)(3).
do we make a left shift then place 1 at first or not?
I can't ...
by nahidshahin
Thu Dec 11, 2003 1:57 am
Forum: Algorithms
Topic: Help to find number of swap operation need to sort data
Replies: 17
Views: 7516

Help to find number of swap operation need to sort data

Someone please help me to find the number of swap operation need to sort a set of data. For example if data set is 4 2 3 1 then only one swap opration is enough to sort in increasing order. Here we just swap 4 and 1.

ThankYou Very Much

Go to advanced search