Use \b or \r and then store the output in a file. Then you may see some unusual characters. So, don't use them. (I am sure about \b, not sure about \r)
Jan wrote:Use \b or \r and then store the output in a file. Then you may see some unusual characters. So, don't use them. (I am sure about \b, not sure about \r)
Why would you want to output \b and \r?
For almost all problems, the output is always an ASCII text file, and never needs such characters.
Only a couple or so problems (about encryption/compression) use binary output format, but you'd probably want to use putchar/fwrite there instead of printf.
The judge runs Linux, so it would expect LF (\n) line endings, and not Windows's CR LF (\r\n), But if you're using standard library functions like printf, you don't need to worry about it. Just use \n, and the library will automatically output the right line ending for the current OS.