Search found 8 matches

by vladimir manich
Thu Oct 07, 2004 7:25 pm
Forum: Algorithms
Topic: Using Balanced search tree..any answer?8)
Replies: 0
Views: 790

Using Balanced search tree..any answer?8)

To implement the following algorithm using balance(height) search tree,each operation should take O(logn) time.(n is the number of elements in the queue, described later) 1)You have a set of programs that r to be run in an O.S. say P_1,P_2,P_3,......,P_n. each program has a memory requirement m_1,m_...
by vladimir manich
Wed Sep 29, 2004 8:03 pm
Forum: Volume 2 (200-299)
Topic: 264 - Count on Cantor
Replies: 47
Views: 14029

Prob 264

Hey, Can nbody who got any AC give me some output he got for numbers around 10^7. or may be 10 outputs from 10^7 - 1 to 10^7. :) Well my C++ basics r also not strong in certain cases so plz could you tell me "The input list contains a single number per line and will be terminated by end-of-file." th...
by vladimir manich
Sun Sep 26, 2004 9:46 pm
Forum: Algorithms
Topic: how to compute composite of 2 polynomials
Replies: 2
Views: 917

can u be a little more explicit about how to use horner's rule
Thankyou
by vladimir manich
Sun Sep 26, 2004 4:43 pm
Forum: Algorithms
Topic: how to compute composite of 2 polynomials
Replies: 2
Views: 917

how to compute composite of 2 polynomials

can any body give an algorithm to compute the composite of 2 polynomials,
for e.g p(x)=x^2 +1
q(x)=x^2
=> p(q(x))=x^4 + 1.

(2) p(x)=x^2 - x + 4
q(x)=x^4 - x^2
p(q(x))=x^8 - 2*x^6 + x^2 + 4. :))
by vladimir manich
Sun Sep 26, 2004 9:13 am
Forum: Volume 1 (100-199)
Topic: 147 - Dollars
Replies: 233
Views: 22487

thankx a lot,but my question was about the logic that i am using in the function dollars.I am not convinced that i am handling all the possible cases ,for eg. take input as .5 and just manually go thru it ,if u can find the missing link that would be great.
by vladimir manich
Sun Sep 26, 2004 6:33 am
Forum: Volume 1 (100-199)
Topic: 147 - Dollars
Replies: 233
Views: 22487

help with 147!

hi Plz tell me what is the logic that is wrong orwhat cases am i missing for the prob 147 ,here is my code: :( #include<iostream> using namespace std; int a[]={10000,5000,2000,1000,500,200,100,50,20,10,5}; int dollars(int i,int n) { int chng=0; if(i<11&&n>0) { if(n%a[i]==0) { chng=chng+dollars(i,n-a...
by vladimir manich
Fri Sep 24, 2004 9:34 pm
Forum: Volume 1 (100-199)
Topic: 160 - Factors and Factorials
Replies: 205
Views: 25922

thankyou
by vladimir manich
Fri Sep 24, 2004 8:56 am
Forum: Volume 1 (100-199)
Topic: 160 - Factors and Factorials
Replies: 205
Views: 25922

i am getting the correct answer on my comp but the judge said it gave a WA ,why? here's my code: #include<iostream> #include<queue> using namespace std; void gen_prime(queue<int> &p,int n) { int i=2,j; while(i<=n) { for(j=2;j<i;j++) { if(i%j==0) break; } if(i==j) p.push(i); i++; } } int powr(int b,i...

Go to advanced search