[gcj] Re: MULTIPLE TEST CASES

2009-10-01 Thread Mikhail Dektyarev
If you have a way to read one and only one case - you'll simple read tests until the end of file.If no - there is no way to do it. On Thu, Oct 1, 2009 at 7:58 PM, kumaran arumugam wrote: > > Hw to accept multiple test cases as input when the number of test > cases is not known..? > > > > -- B

[gcj] Re: MULTIPLE TEST CASES

2009-10-01 Thread kumaran arumugam
Ya i have the option to take 1 case... n hw to use the eof approach..can u give an example please? On 10/1/09, Mikhail Dektyarev wrote: > If you have a way to read one and only one case - you'll simple read tests > until the end of file.If no - there is no way to do it. > > On Thu, Oct 1, 2009

[gcj] Re: MULTIPLE TEST CASES

2009-10-01 Thread Lev Neiman
while( !cin.eof() ) { // process cases. } Sincerely, Lev A. Neiman. On Thu, Oct 1, 2009 at 12:31 PM, kumaran arumugam wrote: > > Ya i have the option to take 1 case... > n hw to use the eof approach..can u give an example please? > > > On 10/1/09, Mikhail Dektyarev wrote: > > If you ha

[gcj] Re: MULTIPLE TEST CASES

2009-10-01 Thread kumaran arumugam
Thank you... On 10/1/09, Lev Neiman wrote: > while( !cin.eof() ) > { > // process cases. > > } > Sincerely, >Lev A. Neiman. > > > On Thu, Oct 1, 2009 at 12:31 PM, kumaran arumugam wrote: > >> >> Ya i have the option to take 1 case... >> n hw to use the eof approach..can u give an examp

[gcj] Re: MULTIPLE TEST CASES

2009-10-01 Thread kumaran arumugam
I tried d same.. But the practice judge says that time limit is exceeded... On Thu, Oct 1, 2009 at 11:13 PM, kumaran arumugam wrote: > Thank you... > > > On 10/1/09, Lev Neiman wrote: > > while( !cin.eof() ) > > { > > // process cases. > > > > } > > Sincerely, > >Lev A. Neiman. > >

[gcj] Re: MULTIPLE TEST CASES

2009-10-01 Thread Lev Neiman
are you referring to acm problems? Sincerely, Lev A. Neiman. On Thu, Oct 1, 2009 at 2:06 PM, kumaran arumugam wrote: > I tried d same.. > But the practice judge says that time limit is exceeded... > > > On Thu, Oct 1, 2009 at 11:13 PM, kumaran arumugam wrote: > >> Thank you... >> >> >> O

[gcj] Re: MULTIPLE TEST CASES

2009-10-01 Thread kumaran arumugam
No... its a local coding problem... On Thu, Oct 1, 2009 at 11:37 PM, Lev Neiman wrote: > are you referring to acm problems? > Sincerely, >Lev A. Neiman. > > > > On Thu, Oct 1, 2009 at 2:06 PM, kumaran arumugam wrote: > >> I tried d same.. >> But the practice judge says that time limit is exce

[gcj] Re: MULTIPLE TEST CASES

2009-10-01 Thread kumaran arumugam
its like this *Problem Statement:* Asif and Nafisa are very interested in solving puzzles.They always try to give one another puzzles to see who is the best.So ,as usual, one day, Nafisa gave Asif a matrix.The matrix is as follows : A B C D E F G H I J K L M N O P Q R S T U V W X Y

[gcj] Re: MULTIPLE TEST CASES

2009-10-01 Thread Lev Neiman
what do you mean. this is google code jam discussion group. in GCJ you run your own program on the input and the GCJ judge just checks your output file. Sincerely, Lev A. Neiman. On Thu, Oct 1, 2009 at 2:09 PM, kumaran arumugam wrote: > No... > its a local coding problem... > > > On Thu,

[gcj] Re: MULTIPLE TEST CASES

2009-10-01 Thread kumaran arumugam
ya...fine.. i just thought that we could discuss how to handle coding flaws.. On Thu, Oct 1, 2009 at 11:43 PM, Lev Neiman wrote: > what do you mean. this is google code jam discussion group. in GCJ you > run your own program on the input and the GCJ judge just checks your output > file. > Sinc

[gcj] Re: MULTIPLE TEST CASES

2009-10-01 Thread Lev Neiman
link to acm judge plz. this problem looks interesting. Sincerely, Lev A. Neiman. On Thu, Oct 1, 2009 at 2:15 PM, kumaran arumugam wrote: > ya...fine.. > i just thought that we could discuss how to handle coding flaws.. > > > On Thu, Oct 1, 2009 at 11:43 PM, Lev Neiman wrote: > >> what do yo

[gcj] Re: MULTIPLE TEST CASES

2009-10-01 Thread kumaran arumugam
https://iws60.iiita.ac.in/alkhwarizm/?page=intro On Thu, Oct 1, 2009 at 11:50 PM, Lev Neiman wrote: > link to acm judge plz. this problem looks interesting. > Sincerely, >Lev A. Neiman. > > > > On Thu, Oct 1, 2009 at 2:15 PM, kumaran arumugam wrote: > >> ya...fine.. >> i just thought that w

[gcj] Re: MULTIPLE TEST CASES

2009-10-01 Thread Anil Kishore
This works ? while( scanf("%d",&N)!=EOF ) -AK On Thu, Oct 1, 2009 at 11:52 PM, kumaran arumugam wrote: > https://iws60.iiita.ac.in/alkhwarizm/?page=intro > > > On Thu, Oct 1, 2009 at 11:50 PM, Lev Neiman wrote: > >> link to acm judge plz. this problem looks interesting. >> Sincerely, >>Lev

[gcj] Re: MULTIPLE TEST CASES

2009-10-01 Thread kumaran arumugam
hmm...ya..it seems to..thanks On 10/1/09, Anil Kishore wrote: > This works ? > > while( scanf("%d",&N)!=EOF ) > -AK > > On Thu, Oct 1, 2009 at 11:52 PM, kumaran arumugam wrote: > >> https://iws60.iiita.ac.in/alkhwarizm/?page=intro >> >> >> On Thu, Oct 1, 2009 at 11:50 PM, Lev Neiman >> wrote: >

[gcj] Re: MULTIPLE TEST CASES

2009-10-01 Thread Bartholomew Furrow
> > while( scanf("%d",&N)!=EOF ) Also: int x; while (cin >> x) { } works. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "google-codejam" group. To post to this group, send email to google-code@googlegroups.com

[gcj] Re: MULTIPLE TEST CASES

2009-10-01 Thread Lev Neiman
Alternatively you can just use Java, and it's Scanner class :D Sincerely, Lev A. Neiman. On Thu, Oct 1, 2009 at 5:20 PM, Bartholomew Furrow wrote: > while( scanf("%d",&N)!=EOF ) > > > Also: > > int x; > while (cin >> x) { > > } > > works. > > > > --~--~-~--~~~---

[gcj] Re: MULTIPLE TEST CASES

2009-10-02 Thread Lucas Piva
On Thu, Oct 1, 2009 at 6:31 PM, Lev Neiman wrote: > Alternatively you can just use Java, and it's Scanner class :D But then, even if he got scanning right, he'd still get TLE. > Sincerely, >    Lev A. Neiman. > > > On Thu, Oct 1, 2009 at 5:20 PM, Bartholomew Furrow wrote: >>> >>> while( scanf(