Treasure

Limits 1s, 512 MB

There's a hidden treasure in a castle. There are nnn guards protecting the treasure. But the guards are not very sincere. They sometimes go outside the castle and walk around. Unfortunately, there's a thief waiting right outside the castle. The thief can only steal the treasure when there are less than 444 guards inside the castle. Given the information about when the guards went outside and when they came back inside, you need to tell whether the thief successfully stole the treasure. Note that, in the beginning, all nnn guards were inside.


This is a companion discussion topic for the original entry at https://toph.co/p/treasure