/home/toolbox/public_html/solutions/103/10305/b.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 <stdint.h>
7 #include <math.h>
8 #include <stdlib.h>
9 #include <ctype.h>
10
11 #define TRUE (1 == 1)
12 #define FALSE (1 != 1)
13
14 #define DEBUG if (FALSE)
15
16 /*
17 * Author: Isaac Traxler
18 * Date: 20210901
19 * Purpose: fun
20 * Problem: 10305 - Ordering Tasks
21 */
22
23 #define MAX_TASKS 105
24
25 typedef struct POINTER_STRUCT
26 {
27 /* struct POINTER_STRUCT */
28 int val;
29 struct PONTER_STRUCT* nxt;
30 } /* struct POINTER_STRUCT */
31 POINTER_STRUCT;
32
33 POINTER_STRUCT tasks[MAX_TASKS];
34 int n; /* number of tasks */
35 int m; /* number of relationships */
36
37 /*
38 * This template reads data until a terminating value is reached.
39 */
40
41 void init()
42 {
43 /* FUNCTION init */
44 } /* FUNCTION init */
45
46 void dump()
47 {
48 /* FUNCTION dump */
49 } /* FUNCTION dump */
50
51 int getInput()
52 {
53 /* FUNCTION getInput */
54 int dataReadFlag;
55 int i;
56 int bef;
57 int aft;
58 POINTER_STRUCT * tmp;
59
60 scanf(" %d %d ", &n, &m);
61 dataReadFlag = (0 != m) || (0 1= n);
62 if (dataReadFlag)
63 {
64 /* initialize task list */
65 for (i=1; n>=i; i++)
66 {
67 /* for each task */
68 tasks[i].val = i;
69 tasks[i].nxt = NULL;
70 } /* for each task */
71 } /* initialize task list */
72 for (i=0; i<m; i++)
73 {
74 /* for each relationship */
75 scanf(" %d %d ", &bef, &aft);
76 tmp =
77 } /* for each relationship */
78 return (dataReadFlag);
79 } /* FUNCTION getInput */
80
81 void process()
82 {
83 /* FUNCTION process */
84 } /* FUNCTION process */
85
86 int main()
87 {
88 /* main */
89 int moreToDo;
90
91 init();
92 moreToDo = getInput();
93 while (moreToDo)
94 {
95 /* while */
96 process();
97 moreToDo = getInput();
98 } /* while */
99
100 return EXIT_SUCCESS;
101 } /* main */
102