Google code Jam, new platform.

Google uses a new new platform for there programming competitions "Google Code Jam". I was a bit supprised by how it worked. Just found out about the new platform when the qualification round started. I did not have any test tools or examples that showed me how to use the new platform. For further reference i show here my code for the "Trouble Sort Problem" that can be used as a example.

using System;
using System.Collections.Generic;
using System.Linq;

namespace GoogleCodeJam
{
    class Program
    {
        static void Main(string[] args)
        {
            int num_test_cases = Convert.ToInt32(Console.ReadLine());
            for (int i = 1; i <= num_test_cases; ++i)
            {
                string n = Console.ReadLine();
                string v = Console.ReadLine();
                string answer = doTestcase(n,v);
                string line = string.Format("Case #{0}: {1}", i, answer);
                writeLn(line);
            }
            Console.ReadLine();
        }

        static string doTestcase(string n, string v)
        {
            int sortCount = convert.toInt(n);
            List<string> stringList = v.Split(' ').ToList();
            List<int> list = new List<int>();
            foreach (string item in stringList)
            {
                list.Add(convert.toInt(item));
            }

            bool done = false;
            while (done == false)
            {
                done = true;
                for (int i = 0; i < list.Count - 2; i++)
                {
                    if (list[i] > list[i + 2])
                    {
                        done = false;
                        int t = list[i];
                        list[i] = list[i + 2];
                        list[i + 2] = t;
                    }
                }
            }
            
            int error = -1;
            for (int i = 0; i < list.Count - 1; i++)
            {
                if (list[i] > list[i + 1])
                {
                    error = i;
                    break;
                }
            }

            if (error == -1)
            {
                return "OK";
            }
            else
            {
                return error + "";
            }

        }

        static void write(string txt)
        {
            Console.WriteLine(txt);
        }
        static void writeLn()
        {
            writeLn("");
        }
        static void writeLn(string txt)
        {
            write(txt + Environment.NewLine);
        }
    }

    public static class convert
    {
        public static int toInt(string txt)
        {
            return int.Parse(txt);
        }
    }
}

Also there was the new first interactive problem. For further reference i show here my code for the "Trouble Sort Problem" that can be used as a example.

using System;
using System.Collections.Generic;

namespace GoogleCodeJam
{
    class Program
    {
        static void Main(string[] args)
        {
            int numberOfTestCases = int.Parse(Console.ReadLine());

            for (int i = 0; i < numberOfTestCases; i++)
            {
                int a = int.Parse(Console.ReadLine());

                int x = (int)Math.Floor(Math.Sqrt(a)) + 1;
                int y = 1;
                while (x*y > a)
                {
                    y++;
                }
                
                bool[,] boomgaard = new bool[x + 4, y + 4];

                int aantal = 0;
                bool cleared = false;
                while (cleared == false)
                {
                    for (int k = 0; k < x; k++)
                    {
                        for (int l = 0; l < y; l++)
                        {
                            Console.WriteLine((k + 2) + " " + (l + 2));
                            string antwoord = Console.ReadLine();
                            aantal++;
                            if (antwoord.Equals("0 0"))
                            {
                                cleared = true;
                                
                                break;
                            }
                        }
                        if (cleared) break;
                    }
                    if (cleared) break;
                }
            }
        }
    }
}

Skills:

Autodesk Inventor, Vault, Git, C#, vb, .net, php HTML, css, js

Education:

University computer science.
HBO Mechanical engineer.
MBO Fine mechanics.

Experience:

Programmer and Mechanical engineer at Kelvion
(2016 - 20..)

Mechanical engineer at Strukton
(2009 - 2016)

Mechanical engineer at RDG-engineering
(2007 - 2009)

CNC Programmer at VMC
(2005 - 2007)

volunteer at Taizé
(2007)

Certifications:

Objectgeoriënteerd analyseren en ontwerpen, Objectgeoriënteerd programmeren in Java, Webapplicaties: de clientkant, Databases, Security Aware Programmer, Web Security Specialist