C# Cooling Pies [COOLING] - Runtime Error(NZEC)

I keep getting runtime error(NZEC), I tried everything to fix this but I’m not sure how to fix it. Here are all my tries to fix this error :frowning: http://www.codechef.com/status/COOLING,melvis . plz help, thank you.

using System;
using System.Collections.Generic;
class Program
{
static void Main(string[] args)
{
int testCases = 100;
int[] result;
while (testCases > 30)
{
testCases= Int32.Parse(Console.ReadLine());
}
result = new int[testCases];
for (int i = 0; i < testCases; i++)
{
int numberOfPiesNRacks = Int32.Parse(Console.ReadLine());
var pies = new List();
string[] piesString = Console.ReadLine().Split(' ');
var racks = new List();
string[] racksString = Console.ReadLine().Split(' ');
int numberofPiesThatFit = 0;
for (int i1 = 0; i1 < piesString.Length; i1++)
{
pies.Add(Int32.Parse(piesString[i1]));
}
for (int i1 = 0; i1 < racksString.Length; i1++)
{
racks.Add(Int32.Parse(racksString[i1]));
}
racks.Sort();
pies.Sort();
for (var i1 = 0; i1 < pies.Count; i1++)
{
int pieSize = pies[i];
for(var i2 = 0; i2 < racks.Count; i2++)
{
var weight = racks[i2] - pieSize ;
if (weight >= 0)
{
racks.RemoveAt(i2);
numberofPiesThatFit++;
break;
}
}
}
//find a home for the pies
result[i] = numberofPiesThatFit;
}
foreach (var test in result)
{
Console.WriteLine(test);
}
}
}