/home/toolbox/public_html/solutions/126/12633/a.c
1 #include <stdio.h>
2 #include <string.h>
3 #include <sys/types.h>
4 #include <sys/stat.h>
5 #include <fcntl.h>
6 #include <stdlib.h>
7 #include <math.h>
8 #include <stdint.h>
9
10 #define TRUE (1 == 1)
11 #define FALSE (1 != 1)
12
13 #define DEBUG if (FALSE)
14
15 /* fprintf(stderr, "functionName: message", varslist); */
16
17 /*
18 * Author: Isaac Traxler
19 * Date: 2015-10-06
20 * Purpose: fun
21 * Problem: 12633 - Super Rooks on a Chessboard
22 */
23
24 /*
25 * This template reads data a specified number of times.
26 */
27
28 #define MAX_ROWS 22
29 #define X 0
30 #define Y 1
31
32 int numberOfTimes;
33 int rooks[MAX][2];
34 int T;
35 int R;
36 int C;
37
38 /* logic:
39 a single rook takes C squares (the row it is on)
40 and R-1 squares (the column not counting one already used by row
41 and diagonal (subtract used square), diagonal is equal to
42 whatever the diagonal length is.
43 exclude a rooks row if it is same as a previous row
44 exclude a rooks column if same as a previous rook
45 figure out which diagonal spaces are excluded
46 */
47
48 void init()
49 {
50 /* FUNCTION init */
51 scanf("%d ", &numberOfTimes);
52 } /* FUNCTION init */
53
54 void dump()
55 {
56 /* FUNCTION dump */
57 } /* FUNCTION dump */
58
59 void getInput()
60 {
61 /* FUNCTION getInput */
62 } /* FUNCTION getInput */
63
64 void process()
65 {
66 /* FUNCTION process */
67 } /* FUNCTION process */
68
69 int main()
70 {
71 /* main */
72 int i;
73
74 init();
75 for (i=0; i<numberOfTimes; i++)
76 {
77 /* while */
78 getInput();
79 process();
80 } /* while */
81
82 return EXIT_SUCCESS;
83 } /* main */
84
85