lemon-project-template-glpk
view deps/glpk/examples/sql/sudoku.sql @ 11:4fc6ad2fb8a6
Test GLPK in src/main.cc
author | Alpar Juttner <alpar@cs.elte.hu> |
---|---|
date | Sun, 06 Nov 2011 21:43:29 +0100 |
parents | |
children |
line source
1 CREATE DATABASE glpk;
2 CREATE USER glpk@localhost IDENTIFIED BY 'gnu';
3 GRANT ALL PRIVILEGES ON glpk.* TO glpk@localhost;
4 USE glpk;
5 DROP TABLE sudoku;
6 CREATE TABLE sudoku (
7 ID INT ,
8 COL INT ,
9 LIN INT ,
10 VAL INT ,
11 PRIMARY KEY ( ID, COL, LIN )
12 );
13 DROP TABLE sudoku_solution;
14 CREATE TABLE sudoku_solution (
15 ID INT ,
16 COL INT ,
17 LIN INT ,
18 VAL INT ,
19 PRIMARY KEY ( ID, COL, LIN )
20 );
21 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 1, 1, 5);
22 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 1, 2, 0);
23 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 1, 3, 0);
24 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 1, 4, 0);
25 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 1, 5, 4);
26 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 1, 6, 0);
27 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 1, 7, 0);
28 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 1, 8, 0);
29 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 1, 9, 0);
30 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 2, 1, 0);
31 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 2, 2, 0);
32 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 2, 3, 3);
33 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 2, 4, 0);
34 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 2, 5, 0);
35 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 2, 6, 0);
36 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 2, 7, 6);
37 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 2, 8, 2);
38 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 2, 9, 0);
39 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 3, 1, 0);
40 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 3, 2, 0);
41 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 3, 3, 0);
42 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 3, 4, 0);
43 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 3, 5, 0);
44 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 3, 6, 9);
45 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 3, 7, 0);
46 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 3, 8, 0);
47 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 3, 9, 4);
48 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 4, 1, 0);
49 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 4, 2, 0);
50 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 4, 3, 6);
51 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 4, 4, 0);
52 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 4, 5, 0);
53 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 4, 6, 7);
54 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 4, 7, 2);
55 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 4, 8, 0);
56 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 4, 9, 0);
57 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 5, 1, 8);
58 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 5, 2, 1);
59 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 5, 3, 0);
60 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 5, 4, 0);
61 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 5, 5, 0);
62 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 5, 6, 0);
63 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 5, 7, 0);
64 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 5, 8, 4);
65 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 5, 9, 3);
66 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 6, 1, 0);
67 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 6, 2, 0);
68 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 6, 3, 9);
69 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 6, 4, 1);
70 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 6, 5, 0);
71 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 6, 6, 0);
72 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 6, 7, 0);
73 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 6, 8, 0);
74 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 6, 9, 0);
75 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 7, 1, 7);
76 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 7, 2, 0);
77 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 7, 3, 0);
78 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 7, 4, 5);
79 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 7, 5, 0);
80 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 7, 6, 0);
81 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 7, 7, 0);
82 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 7, 8, 0);
83 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 7, 9, 0);
84 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 8, 1, 0);
85 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 8, 2, 9);
86 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 8, 3, 2);
87 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 8, 4, 0);
88 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 8, 5, 0);
89 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 8, 6, 0);
90 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 8, 7, 8);
91 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 8, 8, 0);
92 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 8, 9, 0);
93 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 9, 1, 0);
94 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 9, 2, 0);
95 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 9, 3, 0);
96 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 9, 4, 0);
97 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 9, 5, 3);
98 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 9, 6, 0);
99 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 9, 7, 0);
100 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 9, 8, 0);
101 INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 9, 9, 6);