Language: C++

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

int main(){
	int N,M,K;
	scanf("%d %d %d",&N,&M,&K);
	
	int A[M],B[M];
	for( int i=0; i<M; i++){
		scanf("%d %d", &A[i] , &B[i] );
	}
	
	int C[K],D[K];
	for( int i=0 ; i<K ; i++ ){
		scanf("%d %d",&C[i] ,&D[i] );
	}
	
	int friend[N];
	friend[0] = N-2;
	friend[N-1] = N-2;
	for( int i=1 ; i<N-1 ; i++ ){
		friend [i] = N-3;
	}
	
	
	for( int i=0 ; i<M ; i++ ){
		if ( A[i] != B[i] +1 && A[i] +1 != B[i] ){
			friend[ A[i]-1 ]--;
			friend[ B[i]-1 ]--;
		}
	}
	
	for( int i=0 ; i<K ; i++ ){
		if ( C[i] != D[i] +1 && C[i] +1 != D[i] ){
			friend[ C[i]-1 ]--;
			friend[ D[i]-1 ]--;
		}
	}	
	
	for( int i=0; i<N; i++){
		printf("%d ",friend[i] );
	}
	
	
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:13: error: 'friend' used outside of class
   19 |         int friend[N];
      |             ^~~~~~
      |             ------
a.cc:19:19: error: structured binding declaration cannot have type 'int'
   19 |         int friend[N];
      |                   ^~~
a.cc:19:19: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:19:20: error: conflicting declaration 'auto N'
   19 |         int friend[N];
      |                    ^
a.cc:6:13: note: previous declaration as 'int N'
    6 |         int N,M,K;
      |             ^
a.cc:19:22: error: expected initializer before ';' token
   19 |         int friend[N];
      |                      ^
a.cc:20:9: error: 'friend' used outside of class
   20 |         friend[0] = N-2;
      |         ^~~~~~
      |         ------
a.cc:20:16: error: expected identifier before numeric constant
   20 |         friend[0] = N-2;
      |                ^
a.cc:20:16: error: expected ']' before numeric constant
   20 |         friend[0] = N-2;
      |                ^
      |                ]
a.cc:20:15: error: ISO C++ forbids declaration of 'structured binding' with no type [-fpermissive]
   20 |         friend[0] = N-2;
      |               ^
a.cc:20:15: error: structured binding declaration cannot have type 'int'
a.cc:20:15: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:20:15: error: empty structured binding declaration
a.cc:21:9: error: 'friend' used outside of class
   21 |         friend[N-1] = N-2;
      |         ^~~~~~
      |         ------
a.cc:21:17: error: expected ']' before '-' token
   21 |         friend[N-1] = N-2;
      |                 ^
      |                 ]
a.cc:21:15: error: ISO C++ forbids declaration of 'structured binding' with no type [-fpermissive]
   21 |         friend[N-1] = N-2;
      |               ^
a.cc:21:15: error: structured binding declaration cannot have type 'int'
a.cc:21:15: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:21:16: error: conflicting declaration 'auto N'
   21 |         friend[N-1] = N-2;
      |                ^
a.cc:6:13: note: previous declaration as 'int N'
    6 |         int N,M,K;
      |             ^
a.cc:23:17: error: 'friend' used outside of class
   23 |                 friend [i] = N-3;
      |                 ^~~~~~
      |                 ------
a.cc:23:24: error: ISO C++ forbids declaration of 'structured binding' with no type [-fpermissive]
   23 |                 friend [i] = N-3;
      |                        ^~~
a.cc:23:24: error: structured binding declaration cannot have type 'int'
a.cc:23:24: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:23:25: error: redeclaration of 'auto i'
   23 |                 friend [i] = N-3;
      |                         ^
a.cc:22:18: note: 'int i' previously declared here
   22 |         for( int i=1 ; i<N-1 ; i++ ){
      |                  ^
a.cc:23:24: error: cannot decompose non-array non-class type 'int'
   23 |                 friend [i] = N-3;
      |                        ^~~
a.cc:29:25: error: 'friend' used outside of class
   29 |                         friend[ A[i]-1 ]--;
      |                         ^~~~~~
      |                         ------
a.cc:29:34: error: expected ']' before '[' token
   29 |                         friend[ A[i]-1 ]--;
      |                                  ^
      |                                  ]
a.cc:29:31: error: ISO C++ forbids declaration of 'structured binding' with no type [-fpermissive]
   29 |                         friend[ A[i]-1 ]--;
      |                               ^
a.cc:29:31: error: structured binding declaration cannot have type 'int'
a.cc:29:31: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:29:41: error: expected initializer before '--' token
   29 |                         friend[ A[i]-1 ]--;
      |                                         ^~
a.cc:29:41: error: expected ';' before '--' token
a.cc:30:25: error: 'friend' used outside of class
   30 |                         friend[ B[i]-1 ]--;
      |                         ^~~~~~
      |                         ------
a.cc:30:34: error: expected ']' before '[' token
   30 |                         friend[ B[i]-1 ]--;
      |                                  ^
      |                                  ]
a.cc:30:31: error: ISO C++ forbids declaration of 'structured binding' with no type [-fpermissive]
   30 |                         friend[ B[i]-1 ]--;
      |                               ^
a.cc:30:31: error: structured binding declaration cannot have type 'int'
a.cc:30:31: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:30:41: error: expected initializer before '--' token
   30 |                         friend[ B[i]-1 ]--;
      |                                         ^~
a.cc:30:41: error: expected ';' before '--' token
a.cc:36:25: error: 'friend' used outside of class
   36 |                         friend[ C[i]-1 ]--;
      |                         ^~~~~~
      |                         ------
a.cc:36:34: error: expected ']' before '[' token
   36 |                         friend[ C[i]-1 ]--;
      |                                  ^
      |                                  ]
a.cc:36:31: error: ISO C++ forbids declaration of 'structured binding' with no type [-fpermissive]
   36 |                         friend[ C[i]-1 ]--;
      |                               ^
a.cc:36:31: error: structured binding declaration cannot have type 'int'
a.cc:36:31: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:36:41: error: expected initializer before '--' token
   36 |                         friend[ C[i]-1 ]--;
      |                                         ^~
a.cc:36:41: error: expected ';' before '--' token
a.cc:37:25: error: 'friend' used outside of class
   37 |                         friend[ D[i]-1 ]--;
      |                         ^~~~~~
      |                         ------
a.cc:37:34: error: expected ']' before '[' token
   37 |                         friend[ D[i]-1 ]--;
      |                                  ^
      |                                  ]
a.cc:37:31: error: ISO C++ forbids declaration of 'structured binding' with no type [-fpermissive]
   37 |                         friend[ D[i]-1 ]--;
      |                               ^
a.cc:37:31: error: structured binding declaration cannot have type 'int'
a.cc:37:31: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:37:41: error: expected initializer before '--' token
   37 |                         friend[ D[i]-1 ]--;
      |                                         ^~
a.cc:37:41: error: expected ';' before '--' token
a.cc:42:30: error: expected primary-expression before 'friend'
   42 |                 printf("%d ",friend[i] );
      |                              ^~~~~~