Language: C++

#include <bits/stdc++.h>
#define LL long long
using namespace std;
const int maxn = 2e5+10;
const int mod = 1000000007;
LL GCD(LL a, LL b) return a == 0 ? b : GCD(b%a,a);
LL a[maxn], b[maxn];
int id[maxn];
bool cmp(int p, int q){
	return b[p] == b[q] ? a[p] < a[q]: b[p] < b[q];
}
int main(){
  	int n;
  	LL x,y,gcd;
  	for (int i=1;i<=n;i++){
      	cin>>x>>y;
      	if (x == 0 || y == 0) {a[i] = x; b[i] = y; continue;}
      	gcd = GCD(x,y);
      	if (x > 0 && y > 0) {a[i] = x / gcd; b[i] = y / gcd; continue;}
      	if (x < 0 && y < 0) {a[i] = -x / gcd; b[i] = -y / gcd; continue;}
      	if (x > 0 && y < 0) {a[i] = -y / gcd; b[i] = x / gcd; continue;}
        if (x < 0 && y > 0) {a[i] = y / gcd; b[i] = -x / gcd; continue;}
    	id[i] = i;
    }
  	sort(id+1,id+1+n,cmp);
  	int zero = 0, now = 0;
  	LL ans = 1;
  	for (int i=1;i<=n;i++){
    	if (a[i] == 0 && b[i] == 0 ){ zero++; continue; }
      	if (a[i] == a[i-1] && b[i] = b[i-1]) now++;
        else {
          	ans = ( ans * (now + 1) ) % mod;
        	now = 1;
        }
    }
  	ans = (ans * (now + 1) ) % mod;
  	ans += zero;
  	ans += mod - 1;
  	ans %= mod;
  	cout<<ans<<endl;
	return 0;
}


Compiler output:
a.cc: In function 'long long int GCD(long long int, long long int)':
a.cc:6:20: error: named return values are no longer supported
    6 | LL GCD(LL a, LL b) return a == 0 ? b : GCD(b%a,a);
      |                    ^~~~~~
a.cc:10:18: error: 'p' was not declared in this scope
   10 |         return b[p] == b[q] ? a[p] < a[q]: b[p] < b[q];
      |                  ^
a.cc:10:26: error: 'q' was not declared in this scope
   10 |         return b[p] == b[q] ? a[p] < a[q]: b[p] < b[q];
      |                          ^
a.cc: In function 'int main()':
a.cc:17:32: error: 'a' was not declared in this scope
   17 |         if (x == 0 || y == 0) {a[i] = x; b[i] = y; continue;}
      |                                ^
a.cc:17:42: error: 'b' was not declared in this scope
   17 |         if (x == 0 || y == 0) {a[i] = x; b[i] = y; continue;}
      |                                          ^
a.cc:19:30: error: 'a' was not declared in this scope
   19 |         if (x > 0 && y > 0) {a[i] = x / gcd; b[i] = y / gcd; continue;}
      |                              ^
a.cc:19:46: error: 'b' was not declared in this scope
   19 |         if (x > 0 && y > 0) {a[i] = x / gcd; b[i] = y / gcd; continue;}
      |                                              ^
a.cc:20:30: error: 'a' was not declared in this scope
   20 |         if (x < 0 && y < 0) {a[i] = -x / gcd; b[i] = -y / gcd; continue;}
      |                              ^
a.cc:20:47: error: 'b' was not declared in this scope
   20 |         if (x < 0 && y < 0) {a[i] = -x / gcd; b[i] = -y / gcd; continue;}
      |                                               ^
a.cc:21:30: error: 'a' was not declared in this scope
   21 |         if (x > 0 && y < 0) {a[i] = -y / gcd; b[i] = x / gcd; continue;}
      |                              ^
a.cc:21:47: error: 'b' was not declared in this scope
   21 |         if (x > 0 && y < 0) {a[i] = -y / gcd; b[i] = x / gcd; continue;}
      |                                               ^
a.cc:22:30: error: 'a' was not declared in this scope
   22 |         if (x < 0 && y > 0) {a[i] = y / gcd; b[i] = -x / gcd; continue;}
      |                              ^
a.cc:22:46: error: 'b' was not declared in this scope
   22 |         if (x < 0 && y > 0) {a[i] = y / gcd; b[i] = -x / gcd; continue;}
      |                                              ^
a.cc:23:9: error: 'id' was not declared in this scope; did you mean 'i'?
   23 |         id[i] = i;
      |         ^~
      |         i
a.cc:25:14: error: 'id' was not declared in this scope
   25 |         sort(id+1,id+1+n,cmp);
      |              ^~
a.cc:25:26: error: 'cmp' was not declared in this scope; did you mean 'bcmp'?
   25 |         sort(id+1,id+1+n,cmp);
      |                          ^~~
      |                          bcmp
a.cc:29:13: error: 'a' was not declared in this scope
   29 |         if (a[i] == 0 && b[i] == 0 ){ zero++; continue; }
      |             ^
a.cc:29:26: error: 'b' was not declared in this scope
   29 |         if (a[i] == 0 && b[i] == 0 ){ zero++; continue; }
      |                          ^
a.cc:30:13: error: 'a' was not declared in this scope
   30 |         if (a[i] == a[i-1] && b[i] = b[i-1]) now++;
      |             ^
a.cc:30:31: error: 'b' was not declared in this scope
   30 |         if (a[i] == a[i-1] && b[i] = b[i-1]) now++;
      |                               ^