Generation Gap

There are n people standing in a queue. The age of the ith person is ai. The more the age gap between two persons, the more uncomfortable they feel with each other. We define the level of discomfort between person i and j as | ai - aj |. Also, the total discomfort of the queue is the sum of the level of discomfort between all adjacent pairs.

This is a companion discussion topic for the original entry at

what does internal error mean?

@likhon5 It’s mean your internet connection slow, that’s why the submission is not running properly. :slightly_smiling_face:

@likhon5 This is happening because of an issue with the custom checker. This is being fixed by the problem author and will be updated soon.

I am sorry for any inconvenience you may have faced.