I think the greatest mistake was the timing Ancelotti swapped players.
He subbed in Neymar and another, then ONE MINUTE later, there was the hydratation stop.
So, he basically screammed: "hey, here is my last card". The Norway coach had enough time to re organize the team. Not only to complete break the good momento Brazil had at that point, but also to explore the weak points that appeared in the right side.
I do believe if Ancelotti had wait a fricking minute to change the team, at least we could go to the extra time.
But meh, Norway played a lot better the entire game.
The result was earned by them.