Search found 4 matches

by Ahadoom
Sun Apr 29, 2007 2:09 am
Forum: Volume 101 (10100-10199)
Topic: 10189 - Minesweeper
Replies: 418
Views: 125428

My mistake, i just realised there is a maximum line limit.

But what if no limit is given.

PS: Of course i was not planning to store all the input, just the current input.
by Ahadoom
Thu Apr 26, 2007 4:18 pm
Forum: Volume 101 (10100-10199)
Topic: 10189 - Minesweeper
Replies: 418
Views: 125428

Reading a variable length input

Hi everyone.

I was looking at this problem and i cant figure a way to store all input without allocating memory dynamically. If somebody could help i would appreciate.

TIA
by Ahadoom
Sun Apr 15, 2007 1:39 pm
Forum: Volume 1 (100-199)
Topic: 102 - Ecological Bin Packing
Replies: 485
Views: 117471

Spykaj wrote:

Code: Select all

while(scanf("%d %d %d %d %d %d %d %d %d", &input[0], &input[1], &input[2], &input[3], &input[4], &input[5], &input[6], &input[7], &input[8])!=EOF)
Thanks i got accepted. I thougth i could use scanf just like std::cin.
by Ahadoom
Sun Apr 15, 2007 1:30 am
Forum: Volume 1 (100-199)
Topic: 102 - Ecological Bin Packing
Replies: 485
Views: 117471

[102] Output limit excedeed

Code: Select all

Removed.
Problem solved, program was not ending at End of file (see the post below)
I already tested several cases posted on this forum and all returned a correct answer. Is int representation enough for this problem?

TIA

Go to advanced search