Hi,
Today, I find a problem from an old Google Code Jam Contest.
You can read the problem statement here :
http://www3.sympatico.ca/red.zrari/problem.htm
I solved the problem in 15 min (wow, c# is very productive but...) but
my program takes a long time (1 min 15 sec) to solve the example 5 (see
the problem statement).
I found a C++ program that uses the same method than my program.
However, this program is a lot faster : it solves the example 5
in...0sec.
I can't understand why my C# program takes more than 1 minutes since
they use the same method.
The link to my C# program source code :
http://www3.sympatico.ca/red.zrari/csharp.htm
The link to the C++ program source code :
http://www3.sympatico.ca/red.zrari/c++.htm
Man, it's really embarrassing -_-
Hope it's my fault and not the .net framework fault.
My PC Configuration:
- AMD Athlon XP 2800+
- Windows XP Pro SP2
- .Net framework 2.0
- Visual C# Express 2005 and Visual C++ Expresss 2005