Re: [algogeeks] NEED ALGO IN TIME 0.00

2011-06-25 Thread Wladimir Tavares
Try to use fread to read e fwrite to write: char aux[200], *p = aux; fread(aux, 1, 200, stdin); while(1) { n = atoi(p); while(*p != '\n') p++ ; p++; } I think this is not the objective of the problem! Wladimir Araujo Tavares *Federal University of CearĂ¡ * On

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 of > ... > > *-

Re: [algogeeks] NEED ALGO IN TIME 0.00

2011-06-24 Thread prathimzn
sorry my time is 0.2 and i use simple int array and sort function of ... *- - - - - WITH REGARDS, * * PRAMENDRA RATHI * ** *B.TECH 2ND YEAR* *COMPUTER SCIENCE AND ENGINEERING* *NIT ALLAHABAD* On Sat, Jun 25, 2011 at 12:04 AM, sunny agrawal wrote: > i am not sure about this > but when i solved

Re: [algogeeks] NEED ALGO IN TIME 0.00

2011-06-24 Thread sunny agrawal
i am not sure about this but when i solved this problem using simple scanf, printf and sort function of algorithm library, my time was 0.08 so might be reading the values in character buffer and then parsing then in ints may help how did you implemented ? did you implemented your own sort funtion

[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 * - -