[algogeeks] Re: HOW TO IMPLEMENT WITH DP..

2011-07-01 Thread prathimzn
can anyone tell me hoe to think with DP in this ques. *- - - - - WITH REGARDS, * * PRAMENDRA RATHI * ** *B.TECH 2ND YEAR* *COMPUTER SCIENCE AND ENGINEERING* *NIT ALLAHABAD* On Fri, Jul 1, 2011 at 3:32 PM, prathimzn wrote: > here is a question: > https://www.spoj.pl/problems/MK

[algogeeks] HOW TO IMPLEMENT WITH DP..

2011-07-01 Thread prathimzn
here is a question: https://www.spoj.pl/problems/MKBUDGET/ can anyone tell me how to implement this by DP.. i could implement it.. and how you will grade this ques ; is this a simple DP ques or good ONE..? *- - - - - WITH REGARDS, * *PRAMENDRA RATHI * ** *B.TECH 2ND YEAR* *COMPUTER SCIENCE AND E

Re: [algogeeks] NEED ALGO IN TIME 0.00

2011-06-25 Thread prathimzn
somebody answer how to reduce time *- - - - - WITH REGARDS, * * PRAMENDRA RATHI * ** *B.TECH 2ND YEAR* *COMPUTER SCIENCE AND ENGINEERING* *NIT ALLAHABAD* On Sat, Jun 25, 2011 at 12:27 AM, prathimzn wrote: > sorry my time is 0.2 and i use simple int array and sort function

Re: [algogeeks] NEED ALGO IN TIME 0.00

2011-06-24 Thread prathimzn
ich input/output methods you used ? > > > On Fri, Jun 24, 2011 at 11:23 PM, prathimzn wrote: > >> >> http://www.spoj.pl/problems/FASHION/ >> >> i summit this question and my time is 0.02 as i used sorting and then >> multiply corresponding index value and sum

[algogeeks] NEED ALGO IN TIME 0.00

2011-06-24 Thread prathimzn
http://www.spoj.pl/problems/FASHION/ i summit this question and my time is 0.02 as i used sorting and then multiply corresponding index value and sum them to get ans. but best time is 0.00 and 1.6M in C. can anyone tell me what is the best algo to solve this problem in 0.00 i.e. best algo * - -

Re: [algogeeks] How to remove return 0

2011-06-23 Thread prathimzn
tnx piyush.. is any other small way? *- - - - - WITH REGARDS, * * PRAMENDRA RATHI * ** *B.TECH 2ND YEAR* *COMPUTER SCIENCE AND ENGINEERING* *NIT ALLAHABAD* On Fri, Jun 24, 2011 at 12:24 AM, piyush kapoor wrote: > exit(0) is one option..( > http://cboard.cprogramming.com/c-programming/118998

[algogeeks] How to remove return 0

2011-06-23 Thread prathimzn
can anyone tell me any alternate of return 0 from main(); how i can remove it to reduce code length..? *- - - - - WITH REGARDS, * * PRAMENDRA RATHI * ** *B.TECH 2ND YEAR* *COMPUTER SCIENCE AND ENGINEERING* *NIT ALLAHABAD* -- You received this message because you are subscribed to the Google

Re: [algogeeks] c doubt

2011-06-23 Thread prathimzn
i thing that if u negate any value by ! the result will be always a int.. so !a will be a integer value and !a+b due to typecast will be also int.. you can verified this fact by seeing the result of sizeof (!a+a) => 12 sizeof (!b) =>4 sizeof (!a) =>4 sizeof(!(a+b)) =>4 si