Unleash The Geek - default code bug (dlang)

        for (int i = 0; i < height; i++) {
            for (int j = 0; j < width; j++) {
                auto inputs3 = readln.split;
                string ore = inputs3[0]; // amount of ore or "?" if unknown
                int hole = inputs3[1].to!int; // 1 if cell has a hole
            }
        }

I believe the auto inputs3 = readln.split should be outside the inner loop.

Thanks.

A post was merged into an existing topic: [Unleash The Geek] Bugs/questions thread

Not only the inputs2 = readln.split should be outside the inner loop, but it should also be inputs3[j * 2] and inputs[j*2+1].to!int.

I will fix it on Monday, thanks.