Language: C

7#include<stdio.h>
#include<stdlib.h>
int top = 0;

void push(int stack[], int n, int k) {
	if (top == n)
		return; 
	stack[top++] = k;
}
int pop(int stack[]) {
	if (top == 0)
		return -1;
	return stack[--top];
}
int main(void) {
	int n, m;
	scanf("%d %d", &n, &m);
	int i, j;
	int** a = malloc(sizeof(int*) * n);
	for (i = 0; i < n; i++) {
		a[i] = malloc(sizeof(int) * n);
	}
	int start, end;
	for (i = 0; i < m; i++) {
		scanf("%d %d", &start, &end);
		a[start - 1][end - 1] = 1;
		a[end - 1][start - 1] = 1;
	}
	int k, count = 0;
	int p;
	int count_visit = 0;
	int *stack = malloc(sizeof(int)*n);
	int* check = malloc(sizeof(int) * n);
	for (i = 1; i < n; i++) {
		for (j = 0; j < i; j++) {
			if (a[i][j] == 1) {
				for (k = 0; k < n; k++)
					check[k] = 0;
				p = 0;
				check[0] = 1;
				count_visit = 1;
				a[i][j] = 0;
				a[j][i] = 0;
				top = 0;
				
				while (1) {
					if (count_visit == n) {
						break;
					}
					for (k = 0; k < n; k++) {
						if (a[p][k] == 1 && check[k] == 0) {
							push(stack, n, k);
							check[k] = 1;
						}
					}

					p = pop(stack);
					if (p == -1) {
						count++;
						break;
					}
					count_visit++;
					
				}
				a[i][j] = 1;
				a[j][i] = 1;
			}
		}
	}
	printf("%d", count);
	return 0;
}

Compiler output:
main.c:1:1: error: expected identifier or '(' before numeric constant
    1 | 7#include<stdio.h>
      | ^
main.c:1:2: error: stray '#' in program
    1 | 7#include<stdio.h>
      |  ^
In file included from main.c:2:
/usr/include/stdlib.h:98:8: error: unknown type name 'size_t'
   98 | extern size_t __ctype_get_mb_cur_max (void) __THROW __wur;
      |        ^~~~~~
/usr/include/stdlib.h:57:1: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
   56 | #include <bits/floatn.h>
  +++ |+#include <stddef.h>
   57 | 
/usr/include/stdlib.h:531:25: error: unknown type name 'size_t'
  531 |                         size_t __statelen) __THROW __nonnull ((2));
      |                         ^~~~~~
/usr/include/stdlib.h:531:25: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:561:25: error: unknown type name 'size_t'
  561 |                         size_t __statelen,
      |                         ^~~~~~
/usr/include/stdlib.h:561:25: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:661:42: error: unknown type name 'size_t'
  661 | extern void arc4random_buf (void *__buf, size_t __size)
      |                                          ^~~~~~
/usr/include/stdlib.h:661:42: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:672:22: error: unknown type name 'size_t'
  672 | extern void *malloc (size_t __size) __THROW __attribute_malloc__
      |                      ^~~~~~
/usr/include/stdlib.h:672:22: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:675:22: error: unknown type name 'size_t'
  675 | extern void *calloc (size_t __nmemb, size_t __size)
      |                      ^~~~~~
/usr/include/stdlib.h:675:22: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:675:38: error: unknown type name 'size_t'
  675 | extern void *calloc (size_t __nmemb, size_t __size)
      |                                      ^~~~~~
/usr/include/stdlib.h:675:38: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:683:36: error: unknown type name 'size_t'
  683 | extern void *realloc (void *__ptr, size_t __size)
      |                                    ^~~~~~
/usr/include/stdlib.h:683:36: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:695:41: error: unknown type name 'size_t'
  695 | extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
      |                                         ^~~~~~
/usr/include/stdlib.h:695:41: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:695:57: error: unknown type name 'size_t'
  695 | extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
      |                                                         ^~~~~~
/usr/include/stdlib.h:695:57: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:701:41: error: unknown type name 'size_t'
  701 | extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
      |                                         ^~~~~~
/usr/include/stdlib.h:701:41: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:701:57: error: unknown type name 'size_t'
  701 | extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
      |                                                         ^~~~~~
/usr/include/stdlib.h:701:57: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
In file included from /usr/include/stdlib.h:706:
/usr/include/alloca.h:32:22: error: unknown type name 'size_t'
   32 | extern void *alloca (size_t __size) __THROW;
      |                      ^~~~~~
/usr/include/alloca.h:25:1: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
   24 | #include <stddef.h>
  +++ |+#include <stddef.h>
   25 | 
/usr/include/stdlib.h:712:22: error: unknown type name 'size_t'
  712 | extern void *valloc (size_t __size) __THROW __attribute_malloc__
      |                      ^~~~~~
/usr/include/stdlib.h:712:22: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:718:45: error: unknown type name 'size_t'
  718 | extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
      |                                             ^~~~~~
/usr/include/stdlib.h:718:45: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:718:65: error: unknown type name 'size_t'
  718 | extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
      |                                                                 ^~~~~~
/usr/include/stdlib.h:718:65: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:724:29: error: unknown type name 'size_t'
  724 | extern void *aligned_alloc (size_t __alignment, size_t __size)
      |                             ^~~~~~
/usr/include/stdlib.h:724:29: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:724:49: error: unknown type name 'size_t'
  724 | extern void *aligned_alloc (size_t __alignment, size_t __size)
      |                                                 ^~~~~~
/usr/include/stdlib.h:724:49: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:961:23: error: unknown type name 'size_t'
  961 |                       size_t __nmemb, size_t __size, __compar_fn_t __compar)
      |                       ^~~~~~
/usr/include/stdlib.h:961:23: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:961:39: error: unknown type name 'size_t'
  961 |                       size_t __nmemb, size_t __size, __compar_fn_t __compar)
      |                                       ^~~~~~
/usr/include/stdlib.h:961:39: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:970:34: error: unknown type name 'size_t'
  970 | extern void qsort (void *__base, size_t __nmemb, size_t __size,
      |                                  ^~~~~~
/usr/include/stdlib.h:970:34: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:970:50: error: unknown type name 'size_t'
  970 | extern void qsort (void *__base, size_t __nmemb, size_t __size,
      |                                                  ^~~~~~
/usr/include/stdlib.h:970:50: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:1044:20: error: unknown type name 'size_t'
 1044 |                    size_t __len) __THROW __nonnull ((3, 4, 5));
      |                    ^~~~~~
/usr/include/stdlib.h:1044:20: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:1047:20: error: unknown type name 'size_t'
 1047 |                    size_t __len) __THROW __nonnull ((3, 4, 5));
      |                    ^~~~~~
/usr/include/stdlib.h:1047:20: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:1051:45: error: unknown type name 'size_t'
 1051 |                     char *__restrict __buf, size_t __len)
      |                                             ^~~~~~
/usr/include/stdlib.h:1051:45: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:1055:45: error: unknown type name 'size_t'
 1055 |                     char *__restrict __buf, size_t __len)
      |                                             ^~~~~~
/usr/include/stdlib.h:1055:45: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:1062:36: error: unknown type name 'size_t'
 1062 | extern int mblen (const char *__s, size_t __n) __THROW;
      |                                    ^~~~~~
/usr/include/stdlib.h:1062:36: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:1066:48: error: unknown type name 'size_t'
 1066 |                    const char *__restrict __s, size_t __n) __THROW;
      |                                                ^~~~~~
/usr/include/stdlib.h:1066:48: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:1073:8: error: unknown type name 'size_t'
 1073 | extern size_t mbstowcs (wchar_t *__restrict  __pwcs,
      |        ^~~~~~
/usr/include/stdlib.h:1073:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:1074:53: error: unknown type name 'size_t'
 1074 |                         const char *__restrict __s, size_t __n) __THROW
      |                                                     ^~~~~~
/usr/include/stdlib.h:1074:53: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:1077:8: error: unknown type name 'size_t'
 1077 | extern size_t wcstombs (char *__restrict __s,
      |        ^~~~~~
/usr/include/stdlib.h:1077:8: note: 's