dragon2.cpp:2:153: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
typedef long long ll;using namespace std;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);}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);}return 0;}
^
dragon2.cpp: In function 'int main()':
dragon2.cpp:2:174: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
typedef long long ll;using namespace std;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);}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);}return 0;}
~~~~~^~~~~~~~~~~~~~~
dragon2.cpp:2:206: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
typedef long long ll;using namespace std;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);}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);}return 0;}
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dragon2.cpp:2:260: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
typedef long long ll;using namespace std;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);}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);}return 0;}
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dragon2.cpp:2:327: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
typedef long long ll;using namespace std;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);}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);}return 0;}
~~~~~^~~~~~~~~~~~~~~