Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
template <typename X> ostream& operator << (ostream& x,const vector<X>& v){for(ll i=0;i<v.size();++i) x<<v[i]<<" ";return x;}
template <typename X> ostream& operator << (ostream& x,const set<X>& v){for(auto it:v) x<<it<<" ";return x;}
template <typename X, typename Y> ostream& operator << (ostream& x, const pair<X,Y>& v) {x<<v.ff<<" "<<v.ss;return x;}
template <typename T, typename S> ostream& operator << (ostream& os, const map<T, S>& v) { for (auto it : v) os << it.first << "=>" << it.second << endl; return os; }
struct pair_hash {inline std::size_t operator()(const std::pair<ll, ll> & v) const {return v.first*31+v.second;}};
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize ("O3")
#pragma GCC optimize ("unroll-loops")
#pragma GCC targett("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define speed ios_base::sync_with_stdio(false);cin.tie(NULL)
#define pb push_back
#define fr first
#define sc second
#define prnt(m) for(auto it = m.begin() ; it != m.end() ; ++it){cout<<*it<<endl;}
#define tra(it,m) for(auto it=m.begin();it!=m.end();++it)
#define dbg(x) cout<<#x<<" = "<<x<<'\n';
#define fri(i,s,n) for(ll i=s;i<n;i++)
#define mod 1000000007LL
#define mod2 998244353
#define vct2 vector<vector<ll>>
#define vct vector<ll>
#define pll pair<ll,ll>
#define rz(n) resize(n)
#define all(v) vdsd.begin(),v.end()
#define mkp make_pair
#define arrin(a,n) for(ll i = 0; i < n ; i++){cin>>a[i];}
#define arrout(a,n) for(ll i = 0;i < n; i++){cout<<a[i]<<" ";}
#define ex(s) cout<<s<<endl,exit(0);
#define inf 4e18
#define five 100005;
#define six 1000005;
#define printclock cerr<<"Time"<<1000*(ld)clock()/(ld)CLOCKS_PER_SEC<<"ms\n";
//_______________________________________________________________________________________
map<pair<ll,ll>,ll> neg,pos;
pll arr;
ll power(ll a,ll b,ll m)
{
   ll ans=1;
   while(b>0)
   {
       if(b%2)
       {
           ans=(ans*a)%m;
       }
       a=(a*a)%m;
       b=b/2;
   }
   return ans;
map<pll,int> vis;
const int N = 2*five;
ll dp[N];
int jj;
ll f(int i)
{
       if(i == jj){
              return 0;
       }
       if(dp[i] != -1){
              return dp[i];
       }
       dp[i] = 0;
       dp[i] = (power(2,pos[arr[i]])*f(i+1))%mod + (power(2,neg[arr[i]])*(f(i+1)))%mod;
       dp[i] %= mod;
       return dp[i];
}
int main()
{
       jj = 0;
       int n;
       cin>>n;
       pll ar[n];
       ll sgn[n];
       fri(i,0,n){
              ll a,b;
              cin>>a>>b;
              if((a/(abs(a))) != (b/(abs(b)))) {
                     sgn[i] = -1;
                     a = abs(a);
                     b = abs(b);
                     ll gg = __gcd(abs(a),abs(b));
                     a /= gg;
                     b /= gg;
                     neg[{a,b}]++;
              }
              else{
                     sgn[i] = 1;
                     a = abs(a);
                     b = abs(b);
                     ll gg = __gcd(abs(a),abs(b));
                     a /= gg;
                     b /= gg;
                     pos[{a,b}]++;
              }
              ar[i].fr = a;
              ar[i].sc = b;
              if(vis[ar[i]] == 0)
              arr[jj++] = ar[i];
              vis[ar[i]] =  1;
              vis[{ar[i].sc,ar[i].fr}] = 1;
       
       }
       ll ans = 0;
       memset(dp,-1,sizeof dp);
       cout<<f(0)-1<<endl;
}


Compiler output:
a.cc: In function 'll power(ll, ll, ll)':
a.cc:58:1: error: a function-definition is not allowed here before '{' token
   58 | {
      | ^
a.cc:70:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   70 | int main()
      |         ^~
a.cc:70:9: note: remove parentheses to default-initialize a variable
   70 | int main()
      |         ^~
      |         --
a.cc:70:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:71:1: error: a function-definition is not allowed here before '{' token
   71 | {
      | ^
a.cc:109:2: error: expected '}' at end of input
  109 | }
      |  ^
a.cc:41:1: note: to match this '{'
   41 | {
      | ^