dragon2.cpp:2:138: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
typedef long long ll;struct P{ll x,y;}A,B;bool C(P X,P Y,P Z){return(X.x-Y.x)*(Z.y-Y.y)<(X.y-Y.y)*(Z.x-Y.x);}std::vector<P>T[30001];main(){int n,m,q,x,y;scanf("%d %d",&n,&m);while(n--){scanf("%lld %lld %d",&A.x,&A.y,&q);T[q].push_back(A);}scanf("%lld %lld %lld %lld\n%d",&A.x,&A.y,&B.x,&B.y,&q);while(q--){scanf("%d %d",&x,&y);m=0;for(P i:T[x])for(P j:T[y]){if(C(i,A,B))m+=(C(i,A,j)&C(j,B,i));else m+=(C(j,A,i)&C(i,B,j));}printf("%d\n",m);}}
^
dragon2.cpp: In function 'int main()':
dragon2.cpp:2:159: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
typedef long long ll;struct P{ll x,y;}A,B;bool C(P X,P Y,P Z){return(X.x-Y.x)*(Z.y-Y.y)<(X.y-Y.y)*(Z.x-Y.x);}std::vector<P>T[30001];main(){int n,m,q,x,y;scanf("%d %d",&n,&m);while(n--){scanf("%lld %lld %d",&A.x,&A.y,&q);T[q].push_back(A);}scanf("%lld %lld %lld %lld\n%d",&A.x,&A.y,&B.x,&B.y,&q);while(q--){scanf("%d %d",&x,&y);m=0;for(P i:T[x])for(P j:T[y]){if(C(i,A,B))m+=(C(i,A,j)&C(j,B,i));else m+=(C(j,A,i)&C(i,B,j));}printf("%d\n",m);}}
~~~~~^~~~~~~~~~~~~~~
dragon2.cpp:2:191: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
typedef long long ll;struct P{ll x,y;}A,B;bool C(P X,P Y,P Z){return(X.x-Y.x)*(Z.y-Y.y)<(X.y-Y.y)*(Z.x-Y.x);}std::vector<P>T[30001];main(){int n,m,q,x,y;scanf("%d %d",&n,&m);while(n--){scanf("%lld %lld %d",&A.x,&A.y,&q);T[q].push_back(A);}scanf("%lld %lld %lld %lld\n%d",&A.x,&A.y,&B.x,&B.y,&q);while(q--){scanf("%d %d",&x,&y);m=0;for(P i:T[x])for(P j:T[y]){if(C(i,A,B))m+=(C(i,A,j)&C(j,B,i));else m+=(C(j,A,i)&C(i,B,j));}printf("%d\n",m);}}
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dragon2.cpp:2:245: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
typedef long long ll;struct P{ll x,y;}A,B;bool C(P X,P Y,P Z){return(X.x-Y.x)*(Z.y-Y.y)<(X.y-Y.y)*(Z.x-Y.x);}std::vector<P>T[30001];main(){int n,m,q,x,y;scanf("%d %d",&n,&m);while(n--){scanf("%lld %lld %d",&A.x,&A.y,&q);T[q].push_back(A);}scanf("%lld %lld %lld %lld\n%d",&A.x,&A.y,&B.x,&B.y,&q);while(q--){scanf("%d %d",&x,&y);m=0;for(P i:T[x])for(P j:T[y]){if(C(i,A,B))m+=(C(i,A,j)&C(j,B,i));else m+=(C(j,A,i)&C(i,B,j));}printf("%d\n",m);}}
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dragon2.cpp:2:312: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
typedef long long ll;struct P{ll x,y;}A,B;bool C(P X,P Y,P Z){return(X.x-Y.x)*(Z.y-Y.y)<(X.y-Y.y)*(Z.x-Y.x);}std::vector<P>T[30001];main(){int n,m,q,x,y;scanf("%d %d",&n,&m);while(n--){scanf("%lld %lld %d",&A.x,&A.y,&q);T[q].push_back(A);}scanf("%lld %lld %lld %lld\n%d",&A.x,&A.y,&B.x,&B.y,&q);while(q--){scanf("%d %d",&x,&y);m=0;for(P i:T[x])for(P j:T[y]){if(C(i,A,B))m+=(C(i,A,j)&C(j,B,i));else m+=(C(j,A,i)&C(i,B,j));}printf("%d\n",m);}}
~~~~~^~~~~~~~~~~~~~~