Language: C++

#include<iostream>
#include<iomanip>
#include<queue>
#include<string>
#include<stack>
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<cstring>
#include<cassert>
#include<ctime>
#include<algorithm>
#include<utility>
#include<map>
#include<set>
#include<vector>
#include<functional>

using namespace std;

typedef  long long           ll;
typedef  unsigned            ui;
typedef  unsigned long long  ull;
typedef  pair<int,int>       i_i;
typedef  pair<ll,int>        ll_i;
typedef  pair<ll,ll>         ll_ll;
typedef  pair<double,int>    d_i;
typedef  pair<double,double> d_d;

#ifdef DEBUG
#define dprintf      printf
#define dputs        puts
#define dout(x)      cout<<#x" = "<<(x)<<endl
#define darray(x,n)  {int i;rep(i,n)cout<<#x"["<<i<<"] = "<<*((x)+i)<<endl;}
#define dloop(i,s,g) for(int (i)=(s);(i)<(g);(i)++)
#define drep(i,n)    for(int (i)=0;(i)<(n);(i)++)
#define dstop()      scanf("%*c")
#else
#define dprintf      (1)?0:printf
#define dputs        (1)?0:puts
#define dout(x)
#define darray(x,n)
#define dloop(i,s,g) if(int i=0){}else
#define drep(i,n)    if(int i=0){}else
#define dstop()
#endif

#define F    first
#define S    second
#define pb   push_back
#define mp   make_pair

#define loop(i,s,g) for((i)=(s);(i)<(g);(i)++)
#define rep(i,n)    for((i)=0;(i)<(n);(i)++)
#define all(x)      (x.begin(),x.end())
#define in(T,...) T __VA_ARGS__; impl(__VA_ARGS__)
#define array(T,id,n) T id[(n)]; for(int i=0;i<(n);i++)cin>>id[i]
#define putv(n)     cout<<(n)<<endl

//#define int long long
#ifndef int
#define INF __INT32_MAX__
#else
#define INF __INT64_MAX__
#endif

void impl(){};
template <typename T,typename... TS >
void impl(T &head,TS &... tail)
{
  cin>>head;
  impl(tail ...);
}

#define V 112345
bool G[V][V]={};
bool used[V][V]={};
int X;
int n,m;

ll dfs(int d,int now)
{
  if(d==4)return 0;
  used[X][now]=1;
  dprintf("d,X,now=%d,%d,%d\n",d,X+1,now+1);
  int i;
  int sum=0;
  
  if(d==3 && G[X][now]==0 && G[now][X]==0)
    {
      used[X][now]=0;
      dprintf("    edge %d,%d\n",X+1,now+1);
      G[X][now]=1;
      G[now][X]=1;
      return 1;
    }
  rep(i,n)
    if(G[now][i] && used[X][i]==0)
      sum+=dfs(d+1,i);
  used[X][now]=0;
  return sum;
}
signed main(void)
{
  cin>>n>>m;
  int i;
  rep(i,m)
    {
      int a,b;
      cin>>a>>b;
      G[a-1][b-1]=1;
      G[b-1][a-1]=1;
    }
  ll sum=0;
  int j;
  rep(j,10)
    {
      rep(X,n)
	sum+=dfs(0,X);
    }
  putv(sum);
  
  return 0;
}


Compiler output:
/tmp/ccMXKnVz.o: in function `dfs(int, int)':
a.cc:(.text+0x27): relocation truncated to fit: R_X86_64_PC32 against symbol `X' defined in .bss section in /tmp/ccMXKnVz.o
a.cc:(.text+0x40): relocation truncated to fit: R_X86_64_PC32 against symbol `used' defined in .bss section in /tmp/ccMXKnVz.o
a.cc:(.text+0x5d): relocation truncated to fit: R_X86_64_PC32 against symbol `X' defined in .bss section in /tmp/ccMXKnVz.o
a.cc:(.text+0x8d): relocation truncated to fit: R_X86_64_PC32 against symbol `X' defined in .bss section in /tmp/ccMXKnVz.o
a.cc:(.text+0xb9): relocation truncated to fit: R_X86_64_PC32 against symbol `X' defined in .bss section in /tmp/ccMXKnVz.o
a.cc:(.text+0xd2): relocation truncated to fit: R_X86_64_PC32 against symbol `used' defined in .bss section in /tmp/ccMXKnVz.o
a.cc:(.text+0xde): relocation truncated to fit: R_X86_64_PC32 against symbol `X' defined in .bss section in /tmp/ccMXKnVz.o
a.cc:(.text+0x103): relocation truncated to fit: R_X86_64_PC32 against symbol `X' defined in .bss section in /tmp/ccMXKnVz.o
a.cc:(.text+0x161): relocation truncated to fit: R_X86_64_PC32 against symbol `X' defined in .bss section in /tmp/ccMXKnVz.o
a.cc:(.text+0x17a): relocation truncated to fit: R_X86_64_PC32 against symbol `used' defined in .bss section in /tmp/ccMXKnVz.o
a.cc:(.text+0x1ad): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status