Language: C

#include<cstdio>
#include<algorithm>
#include<math.h>
using namespace std;
const int MAXN=1200;
const double pi=acos(-1.0);
const double eps=e-8;
struct point{
    double x,y;
};
struct node{
    double a;
    int ind;
};
node t[MAXN*2];
point p[MAXN];
int s[MAXN][MAXN];
int ss[MAXN][MAXN];
int seg[MAXN][MAXN],sseg[MAXN][MAXN];
double cross(point a,point b,point c){
    return (c.x-a.x)*(b.y-a.y)-(b.x-a.x)*(c.y-a.y);
}
bool cmp(node a,node b){
    return a.a<b.a;
}
void init(int n){
    for(int i=0;i<n;i++){
        int cnt=0;
        for(int k=0;k<n;k++){
            if(i!=k){
                t[cnt].ind=k;
                t[cnt++].a=atan2(p[k].y-p[i].y,p[k].x-p[i].x);
            }
        }
        sort(t,t+n-1,cmp);
        for(int k=0;k<n-1;k++)
            s[i][t[k].ind]=k;
        for(int k=0;k<n-1;k++){
            t[n+k-1].a=t[k].a+2*pi;
            t[n+k-1].ind=t[k].ind;
        }
        int tt=1;
        for(int k=0;k<n-1;k++){
            while(t[tt].a<t[k].a+pi)
                tt++;
            if(i<t[k].ind)
                seg[i][t[k].ind]=tt-k-1;
        }
    }
}
void init1(int n){
    for(int i=0;i<n;i++){
        int cnt=0;
        for(int k=0;k<n;k++){
            if(i!=k){
                t[cnt].ind=k;
                t[cnt++].a=atan2(p[k].y-p[i].y,p[k].x-p[i].x);
            }
        }
        sort(t,t+n-1,cmp);
        for(int k=0;k<n-1;k++)
            ss[i][t[k].ind]=k;
        for(int k=0;k<n-1;k++){
            t[n+k-1].a=t[k].a+2*pi;
            t[n+k-1].ind=t[k].ind;
        }
        int tt=1;
        for(int k=0;k<n-1;k++){
            while(t[tt].a<t[k].a+pi)
                tt++;
            if(i<t[k].ind)
                sseg[i][t[k].ind]=tt-k-1;
        }
    }
}
bool clockwise(point a,point b,point c){
    if(cross(a,b,c)>0)
        return true;
    return false;
}
int compute(int a,int b,int c,int n){
    double a1=atan2(p[b].y-p[a].y,p[b].x-p[a].x);
    double a2=atan2(p[c].y-p[a].y,p[c].x-p[a].x);
    if(a1<=0 && a2>=0)
        return n-(s[a][c]-s[a][b])-2;
    return s[a][b]-s[a][c]-1;
}
int compute1(int a,int b,int c,int n){
    double a1=atan2(p[b].y-p[a].y,p[b].x-p[a].x);
    double a2=atan2(p[c].y-p[a].y,p[c].x-p[a].x);
    if(a1<=0 && a2>=0)
        return n-(s[a][b]-s[a][c])-2;
    return s[a][c]-s[a][b]-1;
}
int compute2(int a,int b,int c,int n){
    double a1=atan2(p[b].y-p[a].y,p[b].x-p[a].x);
    double a2=atan2(p[c].y-p[a].y,p[c].x-p[a].x);
    if(a1<=0 && a2>=0)
        return n-(ss[a][c]-ss[a][b])-2;
    return ss[a][b]-ss[a][c]-1;
}
int compute3(int a,int b,int c,int n){
    double a1=atan2(p[b].y-p[a].y,p[b].x-p[a].x);
    double a2=atan2(p[c].y-p[a].y,p[c].x-p[a].x);
    if(a1<=0 && a2>=0)
        return n-(ss[a][b]-ss[a][c])-2;
    return ss[a][c]-ss[a][b]-1;
}
main(){
    int n,m;
    int T=1;
    while(scanf("%d%d",&n,&m)!=-1){
        for(int i=0;i<n;i++)
            scanf("%lf%lf",&p[i].x,&p[i].y);
        init(n);
        for(int i=0;i<m;i++)
            scanf("%lf%lf",&p[i+n].x,&p[i+n].y);
        init1(n+m);
        int ANS=0;
        for(int i=0;i<n;i++){
            for(int j=i+1;j<n;j++){
                for(int k=j+1;k<n;k++){
                   int a=i,b=j,c=k;
                   int A1=0,A2=0;
                   if(clockwise(p[a],p[b],p[c])){
                        A1+=compute(a,b,c,n);
                        A1+=compute(b,c,a,n);
                        A1+=compute(c,a,b,n);
                        A2+=seg[a][b];
                        A2+=seg[b][c];
                        A2+=(n-seg[a][c]-2);
                   }
                   else{
                        A1+=compute1(a,b,c,n);
                        A1+=compute1(b,c,a,n);
                        A1+=compute1(c,a,b,n);
                        A2+=(n-seg[a][b]-2);
                        A2+=(n-seg[b][c]-2);
                        A2+=seg[a][c];
                   }
                   int ans1=A2+A1-2*(n-3);
                     A1=0,A2=0;
                   if(clockwise(p[a],p[b],p[c])){
                        A1+=compute2(a,b,c,n+m);
                        A1+=compute2(b,c,a,n+m);
                        A1+=compute2(c,a,b,n+m);
                        A2+=sseg[a][b];
                        A2+=sseg[b][c];
                        A2+=(n+m-sseg[a][c]-2);
                   }
                   else{
                        A1+=compute3(a,b,c,n+m);
                        A1+=compute3(b,c,a,n+m);
                        A1+=compute3(c,a,b,n+m);
                        A2+=(n+m-sseg[a][b]-2);
                        A2+=(n+m-sseg[b][c]-2);
                        A2+=sseg[a][c];
                   }
                   int ans=A2+A1-2*(n+m-3);
                   if((ans-ans1)%2)
                        ANS++;
                }
            }
        }
        printf("Case %d: %d\n",T++,ANS);
    }
}

Compiler output:
main.c:1:9: fatal error: cstdio: No such file or directory
    1 | #include<cstdio>
      |         ^~~~~~~~
compilation terminated.