this follwoing code runs abolutely fine in visul studio ide with the same set of inputs for all types of testcases but when i execute it codinggame ide its failing not sure why.
CODE BEGIN*********
using System;
using System.Linq;
using System.IO;
using System.Text;
using System.Collections;
using System.Collections.Generic;
class Player
{
static void Main(string[] args)
{
int[] arr = new int[8] ;
// game loop
while (true)
{
for (int i = 0; i < arr.Length; i++)
{
arr[i] = int.Parse(Console.ReadLine());
}
arr = arr.OrderByDescending(c => c).ToArray();
foreach (int value in arr)
{
Console.WriteLine(Array.IndexOf(arr, value));
}
}
}
}
CODE END*********
can anyone tell me why the mountains are not sorting and getting fired with this code in coding game ide.?