Language: C

#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include <math.h>

#include <stdio.h>
#include "stdafx.h"
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include <math.h>
#define MAX_INP (100)
#define MAX_DEG (100)
#define MAX_DATA (32*4)

//#define TEST

typedef struct {
	int deg;
	int data[MAX_DEG];
	unsigned long bitmap[4];
	int st;
	int end;
//	unsigned long data;
} TAG_T;

TAG_T graph[MAX_INP];
int n,u,k;

int stack[MAX_DEG];
int stack_num;

/**------------ SUB ROUTIONE -------------*/
int get_idx(int set_dt,int *idx_p,int *wk_p)
{
	if (set_dt <= 0) {
		printf("ERROR\n");
		return -1;
	}


	*idx_p = (set_dt-1) / 32;
	*wk_p  = set_dt % 32;
//	*wk_p  = set_dt - (*idx_p * 32) - 1;
	if (*wk_p < 0) {
		printf("ERROR1\n");
		return -1;
	}
	if (*idx_p > 3) {
		printf("ERROR2\n");
		return -2;
	}
	return 0;
}
int bit_set(unsigned long *bitmap_p , int bit_idx,int setdt)
{
	int idx;
	int wk;
	int rtn;
	int bit;

	if ((rtn=get_idx(bit_idx,&idx,&wk)) != 0) {
		printf("ERROR 3\n");
		return rtn;
	}
	if (setdt == 0) {
		bitmap_p[idx] &= ~(1 << (wk-1));
	}
	else {
		bitmap_p[idx] |= 1 << (wk-1);
	}
	return 0;
}

int bit_cmp(unsigned long *bitmap_p , int cmpdt)
{
	int idx;
	int wk;
	int rtn;

	if ((rtn=get_idx(cmpdt,&idx,&wk)) != 0) {
		printf("ERROR 4\n");
		return rtn;
	}
	if (((bitmap_p[idx] >> (wk-1)) & 1) != 0) {
		return 1;
	}
	else {
		return 0;
	}
}
int sch_idx(int loop,int max)
{
	int i,wk;

	for (i=0 ; i<max ; i++) {
		wk = bit_cmp(graph[loop].bitmap,i+1);
		if (wk != 0) {
			return i+1;
		}
	}
	return -1;
}

int pop(void)
{
	int rtn;
	if (stack_num == -1) {
		return -1;
	}
	stack_num--;
	rtn = stack[stack_num];

	return rtn;
}

int push(int deg_num)
{
	if (stack_num >= MAX_DEG) {
		return -1;
	}
	stack[stack_num] = deg_num;
	stack_num++;

	return stack_num;
}

/**------------ SUB ROUTIONE -------------*/

void test()
{
	unsigned long data[4];
	int dt;
	int rtn;

	while (1) {
		memset(data,'\0',sizeof(data));
		printf("Input=");
		scanf("%d",&dt);
		bit_set(data,dt,1);
		printf("bit_set() data[0 1 2 3]=0x%08x 0x%08x 0x%08x 0x%08x\n",data[0],data[1],data[2],data[3]);

		rtn = bit_cmp(data,dt);
		printf("bit_cmp() rtn=%d\n",rtn);
	}
}

int main()
{
	int i,l,v;
	int wk,cnt,tmp;
	unsigned long data[4];
	char inp[128];
	char *wk_p;
	char *dmy_p;
#ifdef TEST
	test();
#else

	/** INIT **/
	n=u=k=0;
	stack_num=-1;
	for (i=0 ; i<MAX_INP ; i++) {
		graph[i].st=0;
		graph[i].end =0;
	}


	/** INPUT **/
	gets(inp);
	sscanf(inp,"%d",&n);

	/***************/
	/*--- n     ---*/
	/***************/
	for (i=0 ; i<n ; i++) {
		gets(inp);
		wk_p = strtok(inp, " ");
		sscanf(wk_p,"%d",&u); //???????????????
		wk_p = strtok(NULL, " ");
		sscanf(wk_p,"%d",&k); //????¬???°
		graph[i].deg = k;
//		graph[i].data= 0;
		wk_p = strtok(NULL, " ");
		for (l=0 ; l<k ; l++) {
			sscanf(wk_p,"%d",&v);
			graph[i].data[l] = v;
//			graph[i].data |= 1 << (v-1);
			wk_p = strtok(NULL, " ");
		}

	}


	/*CALC*/
	/*bitmap make*/
	for (i=0 ; i<n ; i++) {
		k = graph[i].deg;
		data[0]=data[1]=data[2]=data[3]=0;
		for (l=0 ; l<k ; l++) {
			wk = graph[i].data[l];
			bit_set(data,wk,1);
		}
		memcpy(graph[i].bitmap,data,sizeof(graph[i].bitmap));
	}

	/* main proc */
	k = n;
	i = 0;
	cnt=1;
	while (1) {
		if (graph[i].st == 0) {
			graph[i].st = cnt;
			cnt++;
		}

		for (l=0 ;i<MAX_DATA; l++) {
//			tmp = sch_idx(l,graph[i].deg);
			tmp = sch_idx(i,MAX_DATA-1);
			if (tmp != -1){
				bit_set(graph[i].bitmap,tmp,0); //bit clear
				push(i);  //i?????????
				i = tmp-1;
				break;
			}
			else {
				if (graph[i].end == 0) {
					graph[i].end = cnt;
					cnt++;

					if (i==0) { //END CHECK
						goto EXIT;
					}
				}
				i = pop();
				if (i == -1) {
					printf("POP ERROR\m");
					return -1;
				}
				continue;
			}
		}
	}
EXIT:
	/* PRINT */
	for (i=0 ; i<n ; i++) {
		printf("%d ",i+1);
		printf("%d ",graph[i].st);
		printf("%d\n",graph[i].end);
	}
	return 0;
#endif
}

Compiler output:
main.c:8:10: fatal error: stdafx.h: No such file or directory
    8 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.