-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
31 lines (25 loc) · 790 Bytes
/
Program.cs
File metadata and controls
31 lines (25 loc) · 790 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using System;
namespace JSolveSharp
{
public class Program
{
public static unsafe void Main(string[] args)
{
var solver = new Solver();
string inData = "4...3.......6..8..........1....5..9..8....6...7.2........1.27..5.3....4.9........";
string result;
int solutions;
const int rounds = 1000;
var sw = System.Diagnostics.Stopwatch.StartNew();
{
for (int i = 0; i < rounds; i++)
{
solutions = solver.JSolve(inData, out result, 2);
}
}
sw.Stop();
var elapsed = sw.Elapsed.TotalMilliseconds / rounds;
Console.WriteLine("Elapsed: " + elapsed);
}
}
}