Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=int(a);i<int(b);i++)
typedef long long ll;
const int MOD=1e9+7;

long long modpow(long long a, long long n, long long mod) {
    long long res = 1;
    while (n > 0) {
        if (n & 1) res = res * a % mod;
        a = a * a % mod;
        n >>= 1;
    }
    return res;
}

int main(){
    ll n;cin>>n;
    ll a[200020],b[200020];
    ll zero=0;
    map<double> m1,m2;
    rep(i,0,n){
        cin>>a[i]>>b[i];
        if(a[i]==0&&b[i]==0){
            zero++;
            a[i]=2e18;b[i]=2e18;
        }
        else if(a[i]==0)m1[0]++;
        else if(b[i]==0)m2[0]++;
    }
    ll an;
    
    an=(m1[0]*(modpow(2,m2[0],MOD)-1)%MOD)*(modpow(2,n-1-zero-m2[0],MOD))%MOD;
    
    rep(i,0,n){
        if(a[i]*b[i]==0)continue;
        m1[(double)a[i]/b[i]]++;
        m2[(double)b[i]/a[i]]++;
    }
    for(auto p:m1){
        an+=(p.second*(modpow(2,m2[p.first],MOD)-1)%MOD)*(modpow(2,n-1-zero-m2[p.first],MOD))%MOD;
    }
    an+=zero+MOD;
    an=an%MOD;
    cout<<an<<endl;
}

    









Compiler output:
a.cc: In function 'int main()':
a.cc:21:15: error: wrong number of template arguments (1, should be at least 2)
   21 |     map<double> m1,m2;
      |               ^
In file included from /usr/include/c++/14/map:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_map.h:102:11: note: provided for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  102 |     class map
      |           ^~~
a.cc:28:27: error: invalid types 'int[int]' for array subscript
   28 |         else if(a[i]==0)m1[0]++;
      |                           ^
a.cc:29:27: error: invalid types 'int[int]' for array subscript
   29 |         else if(b[i]==0)m2[0]++;
      |                           ^
a.cc:33:11: error: invalid types 'int[int]' for array subscript
   33 |     an=(m1[0]*(modpow(2,m2[0],MOD)-1)%MOD)*(modpow(2,n-1-zero-m2[0],MOD))%MOD;
      |           ^
a.cc:33:27: error: invalid types 'int[int]' for array subscript
   33 |     an=(m1[0]*(modpow(2,m2[0],MOD)-1)%MOD)*(modpow(2,n-1-zero-m2[0],MOD))%MOD;
      |                           ^
a.cc:33:65: error: invalid types 'int[int]' for array subscript
   33 |     an=(m1[0]*(modpow(2,m2[0],MOD)-1)%MOD)*(modpow(2,n-1-zero-m2[0],MOD))%MOD;
      |                                                                 ^
a.cc:37:11: error: invalid types 'int[double]' for array subscript
   37 |         m1[(double)a[i]/b[i]]++;
      |           ^
a.cc:38:11: error: invalid types 'int[double]' for array subscript
   38 |         m2[(double)b[i]/a[i]]++;
      |           ^
a.cc:40:16: error: 'begin' was not declared in this scope
   40 |     for(auto p:m1){
      |                ^~
a.cc:40:16: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166:
/usr/include/c++/14/valarray:1238:5: note:   'std::begin'
 1238 |     begin(const valarray<_Tp>& __va) noexcept
      |     ^~~~~
In file included from /usr/include/c++/14/filesystem:53,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200:
/usr/include/c++/14/bits/fs_dir.h:608:3: note:   'std::filesystem::__cxx11::begin'
  608 |   begin(recursive_directory_iterator __iter) noexcept
      |   ^~~~~
a.cc:40:16: error: 'end' was not declared in this scope
   40 |     for(auto p:m1){
      |                ^~
a.cc:40:16: note: suggested alternatives:
/usr/include/c++/14/valarray:1265:5: note:   'std::end'
 1265 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/bits/fs_dir.h:613:3: note:   'std::filesystem::__cxx11::end'
  613 |   end(recursive_directory_iterator) noexcept
      |   ^~~