Moderator: Board moderators
Caesum wrote:Does anyone know what:
In case of other errors the program behaviour is unpredictable.
means ? What if the parameters of a command are beyond the bounds of the bitmap, do you draw half a line or ignore the whole command ?
Any other strange trickery in this question ?
Caesum wrote:personally i use an iterative flood fill, looping until no further changes have been made, its to easy to fill the stack with recursion, the judge seems to fall over after about 20 depths mostly.
1. read command (command is a char[10000])
2. if (command[1] != '\0') skip line and go back to 1 (test if command is 1 char only, I've made a test ignoring this too and looking only the first char, but WA)
3. if command is invalid skip line and go back to 1
4. process command
1. read command (as a string)
2. switch on the first letter of command
3. process the command (with no error checking)
4. if command is not on the list of commands, ignore just the command, not the whole line...
5. done!
1. Can it be any commands after a X command?
2. Can a S happen with no NAME? (just S on a line)
3. If the color is not a upper case letter, should I use it?
4. I skip the line with fgets(cmd,10000, stdin); Can a line be > then 10000 chars?
5. Can the filename on S command be > 20 chars? (DOS 8.3 uses one 12 + '\0' chars)
6. Is diagonal neighbours of a pixel?
7. Can u think in any other problem in this problem?
1. read command (as a string)
2. switch on the first letter of command
3. process the command (with no error checking)
4. if command is not on the list of commands, ignore just the command, not the whole line...
5. done!
Users browsing this forum: No registered users and 1 guest