#include <stdio.h>
int arr[201][201];
int main() {
int n, m;
long long cnt=0;
scanf("%d %d", &n, &m);
for(int i=0; i<m; i++) {
int a, b;
scanf("%d %d", &a, &b);
arr[a][b]=arr[b][a]=-1;
}
for(int i=0; i<n; i++) {
for(int j=i+1; j<n; j++) {
for(int k=j+1; k<n; k++) {
cnt++;
//printf("%d %d %d\n", i, j, k);
if(arr[i][j]==-1 || arr[j][k]==-1 || arr[k][i]==-1) cnt--;
}
}
}
printf("%lld", cnt);
}
To embed this project on your website, copy the following code and paste it into your website's HTML: