The Haunted House

Limits: 1s, 512 MB

Once some friends were walking in a forest on a dirk night. Suddenly they realized that they had lost their way.

This is a companion discussion topic for the original entry at

Unwanted whitespace characters in the problem testcases.
Codes do not work in Python3 unless I use strip()

1 Like

Thanks @touhidur!

The test cases had CRLF line endings. This has been fixed now.

DONT USE PYTHON FOR competitive programming. Its supper slow.

I agree, it’s quite slower than most of the other languages.
But, Python is a bit higher-level than some of the languages.

Some of the the advantages of Python are-

  • It’s easy to learn and code with Python.
  • The code readability is better than the other languages.
  • The syntax is more English-like.
  • Good for areas like data science, where codes tend to be very long.

But a bad disadvantage of Python is its sluggish speed.
Using compiled languages without garbage collection like C, C++, Rust etc. is better for solving problems where time is a concern. I personally use C/C++ for those problems.

1 Like