B. Godsend time limit per test:2 seconds memory limit per test:256 megabytes input:standard input output:standard output Leha somehow found an array consisting of n integers. Looking at it, he came up with a task. Two players play the game on the arr…