criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <bits/stdc++.h>
#define ref(i,n) for(long long i=0;i<n;i++)
using namespace std;
#define mo 1000000007


set<long double> v;
map<long double,long long> mp;

int main()
{
    int n;
    cin>>n;
    int a0=0,aa=0;
    bool ex=0;

    ref(i,n){
        long double x,y;
        cin>>x>>y;
        if(!x&&!y){aa++;continue;}
        if(y==0) {a0++;continue;}
        long double z=x/y;
        if(v.find(z)!=v.end()) mp[z]++;
        else {mp[z]=1;v.insert(z);}
    }
    long long ans=1;


    auto j=v.begin();

    ref(i,v.size()){

        long double t=*j;

        if(t==0){
            if(a0){
                int y1=1,y2=1;
                ref(k,mp[0]) y1=y1*2%mo;
                ref(k,a0) y2=y2*2%mo;
                long long yy=(y1+y2-1)%mo;

                ans=ans*yy%mo;
                mp[0]=0;
                ex=1;
            }
            j++;
            continue;
        }
        if(v.find(-(1/t))!=v.end()){

            int y1=1,y2=1;

            ref(k,mp[t]) y1=y1*2%mo;
            ref(k,mp[-(1/t)]) y2=y2*2%mo;

            long long yy=(y1+y2-1)%mo;

            ans=ans*yy%mo;
            mp[t]=0;mp[-(1/t)]=0;

        }
    j++;
    }


    auto i=mp.begin();

    ref(k,mp.size()){
        long long xx=1;
        ref(k,i->second) xx=xx*2%mo;
        ans=ans*xx%mo;
        i++;
    }


    if(a0&&!ex){
        ref(i,a0){
        long long xx=1;
        ref(k,a0) xx=xx*2%mo;
        ans=ans*xx%mo;
        i++;
    }
    }

    ans+=aa;
    an%=mo;
    if(ans==0) ans+=mo;
    cout<<ans-1;
    return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:86:5: error: 'an' was not declared in this scope; did you mean 'ans'?
   86 |     an%=mo;
      |     ^~
      |     ans
Language: C++

#include <iostream>
#include<map>
#include<cstdlib>
typedef long long ll;
using namespace std;
ll n, cnt00 = 0,cnta0=0,cntb0=0;
double a, b;
const ll p = 1000000007;
void ins(map<double,pair<ll,ll>>& m, double a,double b) {
	double k1 = floor(a/b*1e18);
	double k2 = floor(-b/a*1e18);
	if (m.count(k1) == 0) {
		if (m.count(k2) == 0) {
			if (abs(a / b) > 1) {
				m[k1].first = 1;
				m[k1].second = 0;
			}
			else {
				m[k2].first = 0;
				m[k2].second = 1;
			}
		}
		else m[k2].second++;
	}
	else m[k1].first++;
}
ll pow2(ll k) {
	ll c = 2;
	ll f = 1;
	for (ll bit = 1; bit <= k; bit <<= 1) {
		if (k & bit)f = f * c % p;
		c = c * c % p;
	}
	return f;
}
int main() {
	//cout << (1264561.0 / 497651967616.0-1264561.0 v* 12345678.0 / (497651967616.0 * 12345678.0)<1e-40?"Yes":"No") << "\n";
	cin >> n;
	map<double, pair<ll, ll>> line_map;
	for (int i = 0; i < n; i++) {
		cin >> a >> b;
		if (b == 0) {
			if (a == 0)cnt00++;
			else cntb0++;
		}
		else if (a == 0) {
			cnta0++;
		}
		else ins(line_map, a, b);
	}
	ll ans = 1;
	for (auto i = line_map.begin(); i != line_map.end(); ++i) {
		ll& cnt1 = i->second.first;
		ll& cnt2 = i->second.second;
		ans = (ans * (pow2(cnt1)+pow2(cnt2) - 1)+ p) % p;
	}
	ans = (ans * (pow2(cnta0) + pow2(cntb0) - 1)-1 +cnt00+ p) % p;
	cout << ans;
}

Compiler output:
a.cc: In function 'void ins(std::map<double, std::pair<long long int, long long int> >&, double, double)':
a.cc:10:21: error: 'floor' was not declared in this scope
   10 |         double k1 = floor(a/b*1e18);
      |                     ^~~~~
Language: C++

#include <iostream>
#include<map>
#include<cstdlib>
typedef long long ll;
using namespace std;
ll n, cnt00 = 0,cnta0=0,cntb0=0;
double a, b;
const ll p = 1000000007;
void ins(map<double,pair<ll,ll>>& m, double a,double b) {
	double k1 = round(a/b*1e18);
	double k2 = round(-b/a*1e18);
	if (m.count(k1) == 0) {
		if (m.count(k2) == 0) {
			if (abs(a / b) > 1) {
				m[k1].first = 1;
				m[k1].second = 0;
			}
			else {
				m[k2].first = 0;
				m[k2].second = 1;
			}
		}
		else m[k2].second++;
	}
	else m[k1].first++;
}
ll pow2(ll k) {
	ll c = 2;
	ll f = 1;
	for (ll bit = 1; bit <= k; bit <<= 1) {
		if (k & bit)f = f * c % p;
		c = c * c % p;
	}
	return f;
}
int main() {
	//cout << (1264561.0 / 497651967616.0-1264561.0 v* 12345678.0 / (497651967616.0 * 12345678.0)<1e-40?"Yes":"No") << "\n";
	cin >> n;
	map<double, pair<ll, ll>> line_map;
	for (int i = 0; i < n; i++) {
		cin >> a >> b;
		if (b == 0) {
			if (a == 0)cnt00++;
			else cntb0++;
		}
		else if (a == 0) {
			cnta0++;
		}
		else ins(line_map, a, b);
	}
	ll ans = 1;
	for (auto i = line_map.begin(); i != line_map.end(); ++i) {
		ll& cnt1 = i->second.first;
		ll& cnt2 = i->second.second;
		ans = (ans * (pow2(cnt1)+pow2(cnt2) - 1)+ p) % p;
	}
	ans = (ans * (pow2(cnta0) + pow2(cntb0) - 1)-1 +cnt00+ p) % p;
	cout << ans;
}

Compiler output:
a.cc: In function 'void ins(std::map<double, std::pair<long long int, long long int> >&, double, double)':
a.cc:10:21: error: 'round' was not declared in this scope
   10 |         double k1 = round(a/b*1e18);
      |                     ^~~~~
Language: C++

#include <boost/multiprecision/cpp_dec_float.hpp>
#include <boost/multiprecision/cpp_int.hpp>
#include <bits/stdc++.h>
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
using namespace std;
using Real = mp::number<mp::cpp_dec_float<1024>>;
#define lli long long int
#define uli unsigned long long int
#define INF 9999999999
#define rep(i,m,n) for(lli i = m;i < n;i++)
#define rrep(i,m,n) for(lli i=m-1;i>=n;i--)
#define pb(n) push_back(n)
#define UE(N) N.erase(unique(N.begin(),N.end()),N.end());
#define Sort(n) sort(n.begin(), n.end())
#define Rev(n) reverse(n.begin(),n.end())
#define Out(S) cout << S << endl
#define NeOut(S) cout << S
#define HpOut(S) cout << setprecision(25) << S << endl
#define Vec(K,L,N,S) vector<L> K(N,S)
#define DV(K,L,N,M,S) vector<vector<L>> K(N,vector<L>(M,S))
#define TV(K,L,N,M,R,S) vector<vector<vector<L>>> K(N,vector<vector<L>>(M,vector<L>(R,S)))
#define pint pair<lli,lli>
#define paf(L,R) pair<L,R>
#define mod 1000000007
#define MAX 10000000
#define ALL(a)  a.begin(),a.end()
#define chmax(a, b) a = (((a)<(b)) ? (b) : (a))
#define chmin(a, b) a = (((a)>(b)) ? (b) : (a))
lli repow(lli n,lli k,lli m){
  if(k==0)return 1;
  else if(k%2==1)return repow(n,k-1,m)*n%m;
  else{
    lli temp=repow(n,k/2,m);
    return temp*temp%m;
  }
}
int main(){
  ios::sync_with_stdio(false);
  cin.tie(0);
  lli A,B,C,D,E,F,N,M,K,L,X,Y,Z,H,W,sum=0,num=0,flag=0;string S,T;
  cin >> N;
  map<Real,int>mp1;
  map<Real,int>mp2;
  rep(i,0,N){
    cin >> A >> B;
    if(A==B&&A==0)flag++;
    else if(B==0)mp1[INF]++;
    else if(A==0)mp2[INF]++;
    else if((long double)A/B>=0)mp1[(Real)A/B]++;
    else mp2[-(Real)B/A]++;
  }
  num=1;
  set<Real>st;
  for(auto v:mp1)st.insert(v.first);
  for(auto v:mp2)st.insert(v.first);
  for(auto v:st){
    if(mp1.find(v)!=mp1.end()&&mp2.find(v)!=mp2.end()){
      num*=(repow(2,mp1[v],mod)+repow(2,mp2[v],mod)-1)%mod;
    }
    else if(mp1.find(v)!=mp1.end()){
      num*=repow(2,mp1[v],mod);
    }
    else{
      num*=repow(2,mp2[v],mod);
    }
    num%=mod;
  }
  Out((num+mod+flag-1)%mod);
}


Compiler output:
a.cc:1:10: fatal error: boost/multiprecision/cpp_dec_float.hpp: No such file or directory
    1 | #include <boost/multiprecision/cpp_dec_float.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

//abc168_e.cpp
//Sun May 17 20:36:54 2020

#include <iostream>
#include <string>
#include <queue>
#include <map>
#include <unordered_map>
#include <vector>
#include <algorithm>
#include <math.h>
#include <set>
#define INTINF 2147483647
#define LLINF 9223372036854775807
#define MOD 1000000007

using namespace std;
using ll=long long;
typedef pair<ll,ll> P;

//最大公倍数、最大公約数（ユークリッド互除法）
ll gcd (ll a, ll b){ //最大公約数
	if (b == 0){
		return a;
	}
	return gcd(b, a%b);
}

ll mod_pow(ll x, ll n){
	ll res = 1;
	while (n>0){
		if (n&1){
			res = res * x % MOD;
		}
		x = x*x%MOD;
		n >>= 1;
	}
	return res;
}


int main(){
	ll n;
	cin >> n;

	vector<P> num;
	map<P, ll> mp;
	for (int i=0;i<n;i++){
		ll a,b;
		cin >> a >> b;
		ll kouyaku = gcd(a,b);
		if (kouyaku!=0){
			a = a/abs(kouyaku);
			b = b/abs(kouyaku);
		}
		auto itr = mp.find(P(a,b));
		if (itr != mp.end()){
			mp[P(a,b)]++;
		}else {
			mp[P(a,b)] = 1;
		}
	}

	ll ans = 1;
	ll am = 0;
	ll abzero = 0;
	ll agazero = 0;
	ll bgazero = 0;
	for (auto itr = mp.begin();itr!=mp.end();itr++){
		ll aite = 0;
		P tmp = itr->first;
		if (mp[tmp] == 0){
			continue;
		}
		ll count = mp[tmp];
		ll aa = tmp.first;
		ll bb = tmp.second;
		if (aa==0 && bb==0){
			abzero = mp[tmp];
			continue;
		}else if (aa==0){
			agazero += count;
			continue;
		}else if (bb==0){
			bgazero += count;
			continue;
		}
		int flag = 1;
//		cout << aa << " " << bb  << " " << count << endl;
		auto itrtmp = mp.find(P(aa*(-1),bb*(-1)));
		if (itrtmp != mp.end()){
			count += mp[P(aa*(-1),bb*(-1))];
			mp[P(aa*(-1),bb*(-1))] = 0;
		}

		itrtmp = mp.find(P(bb,aa*(-1)));
		if (itrtmp != mp.end()){
			aite += mp[P(bb,aa*(-1))];
			mp[P(bb,aa*(-1))] = 0;
			flag = 0;
		}

		itrtmp = mp.find(P(bb*(-1),aa));
		if (itr != mp.end()){
			aite += mp[P(bb*(-1),aa)];
			mp[P(bb*(-1),aa)] = 0;
			flag = 0;
		}

		if (flag){
			am += count;
		}else {
			ll tmptmp = (mod_pow(2,count)+mod_pow(2,aite)+MOD-1)%MOD;
			ans = ans * tmptmp%MOD;
		}
	}

	if (agazero && bgazero){
		ll tmptmp = (mod_pow(2,agazero)+mod_pow(2,bgazero)+MOD-1)%MOD
		ans = ans * tmptmp%MOD;
	}else {
		am += agazero+bgazero;
	}

	ans = ans * mod_pow(2,am)%MOD;

	if (abzero){
		ans = ans * (abzero+1)%MOD;
	}

	ans = (ans+MOD-1)%MOD;

	cout << ans << endl;
//	printf("%.4f\n",ans);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:120:17: error: expected ',' or ';' before 'ans'
  120 |                 ans = ans * tmptmp%MOD;
      |                 ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define MOD1 1000000007
#define MOD2 1000000009
using ll=long long;

ll gcd(ll a,ll b){
  while(a%b!=0){
    ll tmp=a%b;
    a=b;
    b=tmp;
  }
  return b;
}

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

int main(){
  int N;
  cin>>N;
  vector<ll> A(N),B(N);
  for(int i=0;i<N;i++){
    cin>>A.at(i)>>B.at(i);
  }
  map<pair<ll,ll>,ll> m;
  for(int i=0;i<N;i++){
    if(A.at(i)==0&&B.at(i)==0){
      m[make_pair(0,0)]++;
    }else if(A.at(i)==0){
      m[make_pair(0,1)]++;
    }else if(B.at(i)==0){
      m[make_pair(1,0)]++;
    }else{
      ll x=gcd(abs<ll>(A.at(i)),abs<ll>(B.at(i)));
      if((A.at(i)>0&&B.at(i)>0)||(A.at(i)<0&&B.at(i)<0)){
        m[make_pair(abs<ll>(A.at(i))/x,abs<ll>(B.at(i))/x)]++;
      }else{
        m[make_pair(abs<ll>(A.at(i))/x,-abs<ll>(B.at(i))/x)]++;
      }
    }
  }

  ll ans=1;
  set<pair<ll,ll>> s;
  for(auto p:m){
    ll a=p.first.first;
    ll b=p.first.second;
    if(s.count(p.first)==1){
      continue;
    }
    ll x=-1;
    if(b<0){
      x=1;
    }
    if(a==0){
      if(m[make_pair(1,0)]==0){
        ans*=modpow(2,p.second,MOD);
      }else{
        ans*=modpow(2,p.second,MOD)+modpow(2,m[make_pair(1,0)],MOD)+MOD-1)%MOD;
      }
      ans%=MOD;
      s.insert(make_pair(0,1));
      s.insert(make_pair(0,1));
      continue;
    }
    if(b==0){
      if(m[make_pair(0,1)]==0){
        ans*=modpow(2,p.second,MOD);
      }else{
        ans*=modpow(2,p.second,MOD)+modpow(2,m[make_pair(0,1)],MOD)+MOD-1)%MOD;
      }
      s.insert(make_pair(0,1));
      s.insert(make_pair(0,1));
      ans%=MOD;
      continue;
    }

    if(m[make_pair(abs(b),x*a)]==0){
      ans*=modpow(2,p.second,MOD);
    }else{
      ans*=(modpow(2,p.second,MOD)+modpow(2,m[make_pair(abs(b),x*a)],MOD)+MOD-1)%MOD;
    }
    ans%=MOD;
    s.insert(make_pair(a,b));
    s.insert(make_pair(abs(b),x*a));
  }
  cout<<(ans+m[make_pair(0,0)]+MOD-1)%MOD<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:70:74: error: expected ';' before ')' token
   70 |         ans*=modpow(2,p.second,MOD)+modpow(2,m[make_pair(1,0)],MOD)+MOD-1)%MOD;
      |                                                                          ^
      |                                                                          ;
a.cc:81:74: error: expected ';' before ')' token
   81 |         ans*=modpow(2,p.second,MOD)+modpow(2,m[make_pair(0,1)],MOD)+MOD-1)%MOD;
      |                                                                          ^
      |                                                                          ;
Language: C++

#include <iostream>
#include <vector>
#include <bitset>
#include <utility>
#include <string>
#include <queue>
#include <stack>
#include <algorithm>
#include <cmath>
#include <map>
#include <set>
 
using namespace std;
typedef long long ll;

const ll MOD=1000000007;

int main(){
  int N;
  cin >> N;

  vector<ll> p2(N+1,0);
  p2[0]=1;
  ll cur=1;
  for(int i=1;i<N+1;i++){
    cur*=2; cur%=MOD;
    p2[i]=cur; 
  }

  map<pair<ll,ll>,ll> m;
  for(int i=0;i<N;i++){
    ll a,b; cin >> a >> b;
    ll ta=a,tb=b;
    if(ta==0 && tb==0){
      m[make_pair<ll,ll>(0,0)]++;
      continue;
    }
    if(ta==0){
      m[make_pair<ll,ll>(0,1)]++;
      continue;
    }
    if(tb==0){
      m[make_pair<ll,ll>(1,0)]++;
      continue;
    }
    while(ta!=0){
      tb%=ta; swap(ta,tb);
    }
    a/=tb; b/=tb;
    if(a<0){
      a*=-1; b*=-1;
    }
    //cout << a << b << endl;
    m[make_pair<ll,ll>(a,b)]++;
  }

  ll ans=1;
  for(auto &mi:m){
    if(mi.first.first==0 && mi.first.second==0) continue;
    pair<ll,ll> tmp;
    if(mi.first.second>=0){
      tmp.first=mi.first.second; tmp.second=-mi.first.first;
    }else{
      tmp.first=-mi.first.second; tmp.second=mi.first.first;
    }
    ll ansi=0;
    ansi+=p2[m[tmp]];
    ansi+=p2[mi.second];
    ans*=ansi-1;
    ans%=MOD;
    m[tmp]=0;
    mi.second=0;
  }

  

  cout << (ans-1+p2[m[make_pair<ll,ll>(0,0)]]-1+2*MOD)%MOD << endl;


  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:54:24: error: cannot bind rvalue reference of type 'long long int&&' to lvalue of type 'll' {aka 'long long int'}
   54 |     m[make_pair<ll,ll>(a,b)]++;
      |                        ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
                 from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_pair.h:1132:21: note:   initializing argument 1 of 'constexpr std::pair<typename std::__strip_reference_wrapper<typename std::decay<_Tp>::type>::__type, typename std::__strip_reference_wrapper<typename std::decay<_Tp2>::type>::__type> std::make_pair(_T1&&, _T2&&) [with _T1 = long long int; _T2 = long long int; typename __strip_reference_wrapper<typename decay<_Tp>::type>::__type = long long int; typename decay<_Tp>::type = long long int; typename __strip_reference_wrapper<typename decay<_Tp2>::type>::__type = long long int; typename decay<_Tp2>::type = long long int]'
 1132 |     make_pair(_T1&& __x, _T2&& __y)
      |               ~~~~~~^~~
Language: C++

#include <bits/stdc++.h>
#define ll long long
using namespace std;
#define Mod 1000000007

ll gcd(ll a, ll b) {
    while(1) {
        if(a < b) swap(a, b);
        if(!b) break;
        a %= b;
    }
    return a;
}

ll mpow(ll x, ll n){ //x^n(mod M) ←普通にpow(x,n)では溢れてしまうため，随時mod計算
    ll ans = 1;
    while(n != 0){
        if(n&1) ans = ans*x % Mod;
        x = x*x % Mod;
        n = n >> 1;
    }
    return ans;
}

int main() {
    ll n;
    cin>>n;
    typedef pair<ll,ll> p;
    vector<p> seki,gyaku;
    set<p> se;
    ll a,b,f=0;
    for (int i = 0; i < n; ++i) {
        cin>>a>>b;
      	if(a==0 && b==0{
          f=1;
          continue;
        }
        if(a*b!=0) {
            ll g=gcd(abs(a),abs(b));
            a /= g;
            b /= g;
        }
        else{
            if(a==0)b=1;
            else a=1;
        }
        if(a*b<0){
            a=-1*abs(a);
            b=abs(b);
        }
        seki.push_back({a,b});
        se.insert({a,b});
        if(a*b<0){
            a=abs(a);
            b=-1*abs(b);
        }
        gyaku.push_back({-1*b,a});
    }
    sort(seki.begin(),seki.end());
    sort(gyaku.begin(),gyaku.end());
    vector<ll> kazu;
    auto it = se.begin();
    for (ll j = 0; j < (ll)se.size(); ++j) {
        ll count=1;
        count+=mpow(2,upper_bound(seki.begin(),seki.end(),*it)-lower_bound(seki.begin(),seki.end(),*it))-1;
        count+=mpow(2,upper_bound(gyaku.begin(),gyaku.end(),*it)-lower_bound(gyaku.begin(),gyaku.end(),*it))-1;
        it++;
        kazu.push_back(count);
    }
    sort(kazu.begin(),kazu.end());
    int flag=1;
    ll nowkazu=kazu[0];
    ll ans=kazu[0];
    for (ll k = 1; k < (ll)kazu.size(); ++k) {
        if(flag && kazu[k]==nowkazu && kazu[k]!=2){
            flag=0;
            continue;
        }
        flag=1;
        nowkazu=kazu[k];
        ans=ans*kazu[k]%Mod;
    }
    if(f==1)ans++;
    cout<<ans-1<<endl;
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:34:24: error: expected ';' before '{' token
   34 |         if(a==0 && b==0{
      |                        ^
      |                        ;
a.cc:38:9: error: expected primary-expression before 'if'
   38 |         if(a*b!=0) {
      |         ^~
a.cc:37:10: error: expected ')' before 'if'
   37 |         }
      |          ^
      |          )
   38 |         if(a*b!=0) {
      |         ~~
a.cc:34:11: note: to match this '('
   34 |         if(a==0 && b==0{
      |           ^
Language: C++

/Users/yyamaguchi/Desktop/projects/atcoder/cmake-build-debug/168_E
10
3 2
3 2
-1 1
2 -1
-3 -9
-8 12
7 7
8 1
8 2
8 4
479

Process finished with exit code 0


Compiler output:
a.cc:1:1: error: expected unqualified-id before '/' token
    1 | /Users/yyamaguchi/Desktop/projects/atcoder/cmake-build-debug/168_E
      | ^
Language: C++

#include <bits/stdc++.h>

#define repd(i, a, b) for (ll i = (a); i < (b); i++)
#define repb(i, n) for (ll i = (n)-1; i >= 0; i--)
#define rep(i, n) repd(i, 0, n)

using namespace std;

using ll = long long;
using ul = unsigned long long;
using ld = long double;
ll mod = 1000000007;

ll rep_square(ll a, ll b) {
    // return a^b
    ll ans = 1;
    ll base = a;
    while (b != 0) {
        if (b & 1) {
            ans *= base;
            ans %= mod;
        }
        base = (base * base) % mod;
        b >>= 1;
    }
    return ans;
}

ll gcd(ll a, ll b) {
    if (b == 0) {
        return a;
    }
    return gcd(b, a % b);
}

ll lcm(ll a, ll b) { return a * b / gcd(a, b); }

int main() {
source:
    ll n;
    cin >> n;
    ll a[n], b[n];
    ll zero_zero = 0;
    map<pair<ll, ll>, ll> map0, map1;

    rep(i, n) {
        cin >> a[i] >> b[i];

        if (a[i] == 0 && b[i] == 0) {
            zero_zero++;
            continue;
        } else if (a[i] == 0) {
            b[i] = 1;
            map1[make_pair(1, 0)]++;
            continue;
        } else if (b[i] == 0) {
            a[i] = 1;
            map0[make_pair(1, 0)]++;
            continue;
        }

        if (a[i] > 0 && b[i] > 0) {
            ll g = gcd(a[i], b[i]);
            a[i] /= g;
            b[i] /= g;
            map0[make_pair(a[i], b[i])]++;
        } else if (a[i] < 0 && b[i] < 0) {
            a[i] = -a[i];
            b[i] = -b[i];
            ll g = gcd(a[i], b[i]);
            a[i] /= g;
            b[i] /= g;
            map0[make_pair(a[i], b[i])]++;
        } else if (a[i] > 0 && b[i] < 0) {
            b[i] = -b[i];
            swap(a[i], b[i]);
            ll g = gcd(a[i], b[i]);
            a[i] /= g;
            b[i] /= g;
            map1[make_pair(a[i], b[i])]++;
        } else if (a[i] < 0 && b[i] > 0) {
            a[i] = -a[i];
            swap(a[i], b[i]);
            ll g = gcd(a[i], b[i]);
            a[i] /= g;
            b[i] /= g;
            map1[make_pair(a[i], b[i])]++;
        }
    }

    ll num = n - zero_zero;

    map<pair<ll, ll>, pair<ll, ll>> map_all;
    for (auto iter = map0.begin(); iter != map0.end(); iter++) {
        map_all[iter->first].first += iter->second;
    }
    for (auto iter = map1.begin(); iter != map1.end(); iter++) {
        map_all[iter->first].second += iter->second;
    }

    ll ans = 1;
    for (auto iter = map_all.begin(); iter != map_all.end(); iter++) {
        auto x = iter->first;
        auto y = iter->second;

        ll num0 = y.first, num1 = y.second;
        if (rep_square(2, num0) < 0) {
            throw runtime_error("e");
        }

        ll temp = (rep_square(2, num0) + rep_square(2, num1) - 1 +) % mod;

        ans = (ans * temp) % mod;
    }

    ans--;
    ans += zero_zero;

    cout << ans << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:111:67: error: expected primary-expression before ')' token
  111 |         ll temp = (rep_square(2, num0) + rep_square(2, num1) - 1 +) % mod;
      |                                                                   ^
Language: C++

#include <bits/stdc++.h>
#define ref(i,n) for(int i=0;i<n;i++)
using namespace std;
#define mo 1000000007

typedef pair<int,int> P;
set<long double> v;
map<long double,long long> mp;

int main()
{
    int n;
    cin>>n;
    int a0=0;

    ref(i,n){
        long double x,y;
        cin>>x>>y;
        if(y==0) {a0++;continue;}
        long double z=x/y;
        if(v.find(z)!=v.end()) mp[z]++;
        else {mp[z]=1;v.insert(z);}
    }
    long long ans=1;


    auto j=v.begin();

    ref(i,v.size()){

        long double t=*j;

        if(t==0){
            if(a0){
                int y1=1,y2=1;
                ref(k,mp[0]) y1=y1*2%mo;
                ref(k,a0) y2=y2*2%mo;
                long long yy=(y1+y2-1)%mo;
                
                ans=ans*yy%mo;
                mp[0]=0;
            }
            j++
            continue;
        }
        if(v.find(-(1/t))!=v.end()){

        int y1=1,y2=1;
        ref(k,mp[t]) y1=y1*2%mo;
        ref(k,mp[-(1/t)]) y2=y2*2%mo;

        long long yy=(y1+y2-1)%mo;

            ans=ans*yy%mo;
            mp[t]=0;mp[-(1/t)]=0;

        }
    j++;
    }


    auto i=mp.begin();

    ref(k,mp.size()){
        long long xx=1;
        ref(k,i->second) xx=xx*2%mo;
        ans=ans*xx%mo;
        i++;
    }
    if(ans==0) ans+=mo;
    cout<<ans-1;
    return 0;


}


Compiler output:
a.cc: In function 'int main()':
a.cc:43:16: error: expected ';' before 'continue'
   43 |             j++
      |                ^
      |                ;
   44 |             continue;
      |             ~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
/*
gcdとって簡略化するかな
0の場合の考慮がぬけてんのか！
*/

long long modinv(long long a, long long m) {
    long long b = m, u = 1, v = 0;
    while (b) {
        long long t = a / b;
        a -= t * b; swap(a, b);
        u -= t * v; swap(u, v);
    }
    u %= m;
    if (u < 0) u += m;
    return u;
}

int main(){
  ll N,MOD=1e9+7, ans=1; cin>>N;
  map<pair<ll,ll>,ll> M;
  vector<ll> Z(N+1,2), INV(N+1,0);
  Z[0]=1;
  for(ll i=1; i<=N; i++) (Z[i]*=Z[i-1])%=MOD;
  for(ll i=1; i<=N; i++) (INV[i]=modinv(Z[i],MOD))%=MOD;
  for(ll i=0; i<N; i++){
    ll a,b,zero=0; cin>>a>>b;
    if(a==0 && b==0){
      i--;
      zero++;
      continue;
    }
    if(a!=0 && b!=0){
      ll c=__gcd(a,b);
      if(c<0) c*=-1;
      a/=c;
      b/=c;
      M[make_pair(a,b)]++;
    }
    else if(a==0){
      b=1e18+1;
      M[make_pair(0,b)]++;
    }
    else if(b==0){
      a=1e18+1;
      M[make_pair(a,0)]++;
    }
    ll tmp=0;
    if(a!=0 && b!=0){
      tmp+=M[make_pair(-b,a)];
      tmp+=M[make_pair(b,-a)];
    }
    else if(a==0) tmp+=M[make_pair(b,0)];
    else if(b==0) tmp+=M[make_pair(0,a)];
    if(tmp>0){
      ll work=ans;
      (work*=INV[tmp])%=MOD;
      (ans+=work)%=MOD;
    }
    else (ans*=2)%=MOD;
  }
  ans--;
  ans+=zero;
  if(ans<0) ans+=MOD;
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:65:8: error: 'zero' was not declared in this scope; did you mean 'bzero'?
   65 |   ans+=zero;
      |        ^~~~
      |        bzero
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
using P = pair<ll,ll>;
using T = tuple<ll,ll,ll>;

long long Gcd(long m, long n)
{
	long temp;
	while (m % n != 0)
	{
		temp = n;
		n = m % n;
		m = temp;
	}
	return n;
}

ll  pow_amari(ll N, ll n, ll M){
    ll output = 1;
    rep(i,n){
        output = output*N % M;
    }
    return output;
}

ll main(){
    ll largeN = 1000000007;
    ll N; cin>>N;

    vector<ll> A(N);
    vector<ll> B(N);

    ll N_groupA = 0;
    ll N_groupB = 0;
    ll N_groupC = 0;
    map<string,ll> AoverB;
    map<string,ll> BoverA;
    vector<string> key1;
    vector<string> key2;
    map<string,string> key_map;
    map<string,ll> key_check;
    rep(i,N){
        cin>>A.at(i)>>B.at(i);
        if(A.at(i)==0 and B.at(i)==0){
            N_groupA++;
        }else if(A.at(i)==0){
            N_groupB++;
        }else if(B.at(i)==0){
            N_groupC++;
        }else{
            ll gcd_temp = Gcd(abs(A.at(i)),abs(B.at(i)));
            string temp1,temp2;
            if(A.at(i)>0 && B.at(i)>0 ||A.at(i)<0 && B.at(i)<0 ){
                temp1 = to_string(abs(A.at(i)/gcd_temp))+"/"+to_string(abs(B.at(i)/gcd_temp));
                temp2 = "-"+ to_string(abs(B.at(i)/gcd_temp))+"/"+to_string(abs(A.at(i)/gcd_temp));
            }else{
                temp1 = "-"+ to_string(abs(A.at(i)/gcd_temp))+"/"+to_string(abs(B.at(i)/gcd_temp));
                temp2 = to_string(abs(B.at(i)/gcd_temp))+"/"+to_string(abs(A.at(i)/gcd_temp));

            }
            key_map[temp1] = temp2;
            key_check[temp1] = 0;

            if(AoverB.count(temp1)){
                AoverB[temp1]++;
            }else{
                AoverB[temp1]=1;
                key1.push_back(temp1);
            }
            if(BoverA.count(temp2)){
                BoverA[temp2]++;
            }else{
                BoverA[temp2]=1;
                key2.push_back(temp2);
            }
        }
    }
    ll N_mugai = 0;

    vector<string> checked;

    vector<P> num_pair;


    for(auto key: key1){
        if(BoverA.count(key)){
            if(key_check[key]==1){
                continue;
            }
            key_check[key_map[key]] = 1;
            num_pair.push_back(make_pair(AoverB[key],BoverA[key]));
        }else{
            N_mugai++;
        }
    }


    ll tot_num = 1;
    rep(i,N_mugai){
        tot_num = tot_num*2 % largeN;
    }

    ll index=0;
    for(auto temp_pair: num_pair){
        index++;
        ll N1, N2;
        tie(N1,N2) = temp_pair;
        tot_num = tot_num*((pow_amari(2,N1,largeN)+pow_amari(2,N2,largeN)-1)%largeN)%largeN;
    }
    tot_num = tot_num*((pow_amari(2,N_groupB,largeN)+pow_amari(2,N_groupC,largeN)-1)%largeN)%largeN;

    cout<<tot_num-1+N_groupA<<endl;


}



Compiler output:
a.cc:28:1: error: '::main' must return 'int'
   28 | ll main(){
      | ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define INF 1e9
#define PI 3.14159265359
#define MOD 1000000007
#define ALL(v) v.begin(),v.end()
#define ALLR(v) v.rbegin(),v.rend()
typedef long long ll;
const int dx[4] = {1,0,-1,0};
const int dy[4] = {0,1,0,-1};
//isPrime
//modpow modinv
//getDigit
template<class T> inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template<class T> inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
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;
}

long long modinv(long long a,long long mod){
  return modpow(a,mod-2,mod);
}

long long int modfact(long long int n,long long int mod){
  if(n){
    return n*modfact(n-1,mod)%mod;
    }else{
      return 1;
    }
}
int main() {
  cout << fixed << setprecision(10);
  ll n;
  cin >> n;
  vector<ll> a(n),b(n);
  map<pair<ll,ll>,pair<ll,ll>> mp;
  int cur = 0;
  rep(i,n){
    cin >> a.at(i) >> b.at(i);
    if(a.at(i)==0&&b.at(i)==0){
      cur++;
      continue;
    }else if(b.at(i)==0){
      mp[make_pair(0,1)].first++;
      continue;
    }else if(a.at(i)==0){
      map[make_pair(1,0)].second++;
      continue;
    }
    ll g = gcd(a.at(i),b.at(i));
    a.at(i)/=g; b.at(i)/=g;
    if(a.at(i)<0){
      a.at(i)=-a.at(i);
      b.at(i)=-b.at(i);
    }
    if(b.at(i)<0){
      b.at(i)=-b.at(i);
      swap(a.at(i),b.at(i));
      mp[make_pair(a.at(i),b.at(i))].second++;
    }else{
      mp[make_pair(a.at(i),b.at(i))].first++;
    }
  }
  ll ans = 1;
  for(auto p:mp){
    ll fir = p.second.first;
    ll sec = p.second.second;
    ll tmp = modpow(2,fir,MOD)+modpow(2,sec,MOD)-1;
    ans = (ans*tmp)%MOD;
  }
  cout << ans-1+cur << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:66:20: error: expected ']' before '(' token
   66 |       map[make_pair(1,0)].second++;
      |                    ^
      |                    ]
a.cc:66:26: error: expected initializer before '.' token
   66 |       map[make_pair(1,0)].second++;
      |                          ^
a.cc:66:26: error: expected ';' before '.' token
Language: C++

#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using vl = vector<ll>;
using vvl = vector<vl>;
using pll = pair<ll, ll>;

const ll oo = 0x3f3f3f3f3f3f3f3fLL;
const double eps = 1e-9;

#define sz(c) ll((c).size())
#define all(c) begin(c), end(c)
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define eb emplace_back
#define xx first
#define yy second
#define FOR(i, a, b) for (ll i = (a); i < (b); i++)
#define FORD(i, a, b) for (ll i = ll(b) - 1; i >= (a); i--)
#define TR(X)                                                  \
    ({                                                         \
        if (0) cerr << "TR: " << (#X) << " = " << (X) << endl; \
    })
#define LL(name) \
    ll name;     \
    cin >> name;
#define VL(name, num) \
    vl name(num);     \
    FOR(INPUT_VL_I, 0, num) { cin >> name[INPUT_VL_I]; }

constexpr ll MOD = 1000000007ll;

pll getNormal(pll p) {
    if (p.yy == 0) p.xx = 1;
    if (p.xx == 0) p.yy = 1;
    if (p.yy < 0) {
        return {-p.xx, -p.yy};
    } else {
        return p;
    }
}

int main() {
    cin.sync_with_stdio(0);
    LL(N);

    map<pll, ll> cnt;

    ll zeroes = 0;
    FOR(i, 0, N) {
        LL(A) LL(B);
        if (A == 0 && B == 0) {
            zeroes++;
            continue;
        }

        ll g = gcd(A,B);

        ll na = A / g;
        ll nb = B / g;

        cnt[getNormal(mp(na, nb))]++;
    }

    vl powers(N + 1);
    powers[0] = 1;
    FOR(i, 1, N + 1) powers[i] = (powers[i - 1] * 2) % MOD;

    ll ans = 1;
    for (auto it : cnt) {
        if (it.yy == 0) continue;

        TR(it.xx.xx);
        TR(it.xx.yy);
        TR(it.yy);

        ll factora = (powers[it.yy] - 1 + MOD) % MOD;
        pll other = getNormal(mp(-it.xx.yy, it.xx.xx));

        TR(other.xx);
        TR(other.yy);
        TR(cnt[other]);

        ll factorb = (powers[cnt[other]] - 1 + MOD) % MOD;
        cnt[other] = 0;

        TR(factora);
        TR(factorb);

        ans = (ans * ((factora + 1ll + factorb) % MOD)) % MOD;
        TR(ans);
    }

    cout << (ansr+ zeroes - 1 + MOD) % MOD << endl;
}  // cin.tie(0) bei schnellem Wechseln


Compiler output:
a.cc: In function 'int main()':
a.cc:96:14: error: 'ansr' was not declared in this scope; did you mean 'ans'?
   96 |     cout << (ansr+ zeroes - 1 + MOD) % MOD << endl;
      |              ^~~~
      |              ans
Language: C++

#include <bits/stdc++.h>
#include "../lib/math/modpow.hpp"

using namespace std;

#define SZ(x) (int)(x.size())
#define REP(i, n) for(int i=0;i<(n);++i)
#define FOR(i, a, b) for(int i=(a);i<(b);++i)
#define RREP(i, n) for(int i=(int)(n);i>=0;--i)
#define RFOR(i, a, b) for(int i=(int)(a);i>=(int)(b);--i)
#define ALL(a) (a).begin(),(a).end()
#define DUMP(x) cerr<<#x<<" = "<<(x)<<endl
#define DEBUG(x) cerr<<#x<<" = "<<(x)<<" (L"<<__LINE__<<")"<< endl;

using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using P = pair<int, int>;

const double eps = 1e-8;
const ll MOD = 1000000007;
const int INF = INT_MAX / 2;
const ll LINF = LLONG_MAX / 2;

template <typename T1, typename T2>
bool chmax(T1 &a, const T2 &b) {
  if(a < b) {a = b; return true;}
  return false;
}

template <typename T1, typename T2>
bool chmin(T1 &a, const T2 &b) {
  if(a > b) {a = b; return true;}
  return false;
}

template<typename T1, typename T2>
ostream& operator<<(ostream &os, const pair<T1, T2> p) {
  os << p.first << ":" << p.second;
  return os;
}

template<class T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  REP(i, SZ(v)) {
    if(i) os << " ";
    os << v[i];
  }
  return os;
}

using ld = long double;

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(10);

  int n; cin >> n;
  map<pair<ll, ll>, ll> mp;
  ll zero = 0;
  ll lzero = 0, rzero = 0;
  REP(i, n) {
    ll a, b; cin >> a >> b;
    if(a == 0 || b == 0) {
      if(a == 0 && b == 0) zero++;
      else if(a == 0) lzero++;
      else if(b == 0) rzero++;
      continue;
    }
    if(a < 0) {
      a = -a;
      b = -b;
    }

    ll g = __gcd(abs(a), abs(b));
    a /= g;
    b /= g;
    mp[{a, b}]++;
  }

  ll ans = mod_pow<ll>(2, lzero, MOD);
  ans += mod_pow<ll>(2, rzero, MOD);
  ans %= MOD;
  ans += MOD - 1;
  ans %= MOD;


  map<pair<ll, ll>, bool> sel;
  for(auto &e: mp) {
    pair<ll, ll> b = {e.first.second, -e.first.first};
    if(b.first < 0) {
      b.first = -b.first;
      b.second = -b.second;
    }
    if(sel[e.first] || sel[b]) continue;
    sel[e.first] = true;
    sel[b] = true;
    ll now = 0;


    now += mod_pow<ll>(2, e.second, MOD);
    now %= MOD;
    now += mod_pow<ll>(2, mp[b], MOD);
    now %= MOD;
    now += MOD - 1;
    now %= MOD;
    ans *= now;
    ans %= MOD;
  }

  cout << (ans + MOD - 1) % MOD << endl;
}
























Compiler output:
a.cc:2:10: fatal error: ../lib/math/modpow.hpp: No such file or directory
    2 | #include "../lib/math/modpow.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define INF 1e9
#define PI 3.14159265359
#define MOD 1000000007
#define ALL(v) v.begin(),v.end()
#define ALLR(v) v.rbegin(),v.rend()
typedef long long ll;
const int dx[4] = {1,0,-1,0};
const int dy[4] = {0,1,0,-1};
//isPrime
//modpow modinv
//getDigit
template<class T> inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template<class T> inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
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;
}

long long modinv(long long a,long long mod){
  return modpow(a,mod-2,mod);
}

long long int modfact(long long int n,long long int mod){
  if(n){
    return n*modfact(n-1,mod)%mod;
    }else{
      return 1;
    }
}
int main() {
  cout << fixed << setprecision(10);
  ll n;
  cin >> n;
  vector<ll> a(n),b(n);
  map<pair<ll,ll>,pair<ll,ll>> mp;
  rep(i,n){
    cin >> a.at(i) >> b.at(i);
    if(a.at(i)==0&&b.at(i)==0){
      continue;
    }else if(b.at(i)==0){
      map[make_pair(a.at(i),b.at(i))].first++;
      continue;
    }else if(a.at(i)==0){
      map[make_pair(a.at(i),b.at(i))].second++;
      continue;
    }
    ll g = gcd(a.at(i),b.at(i));
    a.at(i)/=g; b.at(i)/=g;
    if(a.at(i)<0){
      a.at(i)=-a.at(i);
      b.at(i)=-b.at(i);
    }
    if(b.at(i)<0){
      b.at(i)=-b.at(i);
      swap(a.at(i),b.at(i));
      mp[make_pair(a.at(i),b.at(i))].second++;
    }else{
      mp[make_pair(a.at(i),b.at(i))].first++;
    }
  }
  ll ans = 1;
  for(auto p:mp){
    ll fir = p.second.first;
    ll sec = p.second.second;
    ll tmp = modpow(2,fir,MOD)+modpow(2,sec,MOD)-1;
    ans = (ans*tmp)%MOD;
  }
  cout << ans-1 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:61:20: error: expected ']' before '(' token
   61 |       map[make_pair(a.at(i),b.at(i))].first++;
      |                    ^
      |                    ]
a.cc:61:38: error: expected initializer before '.' token
   61 |       map[make_pair(a.at(i),b.at(i))].first++;
      |                                      ^
a.cc:61:38: error: expected ';' before '.' token
a.cc:64:20: error: expected ']' before '(' token
   64 |       map[make_pair(a.at(i),b.at(i))].second++;
      |                    ^
      |                    ]
a.cc:64:38: error: expected initializer before '.' token
   64 |       map[make_pair(a.at(i),b.at(i))].second++;
      |                                      ^
a.cc:64:38: error: expected ';' before '.' token
Language: C++

#include<bits/stdc++.h> 
#include <iostream>
#include <algorithm>
#include <cstring>
#include <cstdio>
#include <vector>
#include <cmath>
#include <set>
#include <map>
#include <queue>
#include <iomanip>
#include <assert.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pi;
typedef vector<int> vi;
const int M = 1e9 + 7;
pi norm(int a, int b) {
	int g = __gcd(a, b);
	a /= g, b /= g;
	if(a == 0) b = 1;
	if(b == 0) a = 1;
	if(a < 0) a = -a, b = -b;
	return {a, b};
}
pi inv(pi p) {
	return norm(-p.second, p.first);
}
int pw[200010];
map<pi, int> cnt, vis;
int main(void)
{
	pw[0] = 1;
	for(int i = 1; i < 2e5 + 7; i++)
		pw[i] = pw[i - 1] * 2 % M;
	int n, ans = 0;
	cin >> n;
	for(int i = 0; i < n; i++) {
		int a, b;
		cin >> a >> b;
		if(a == 0 && b == 0) ans++;
		else {
			pi p = norm(a, b);
			cnt[p]++;
		}
	}
	ll tt = 1;
	for(auto pp:cnt{
		ll pp=cnt[i];
		pi p = pp.first, q = inv(p);
		if(vis[p]) continue;
		tt = tt * (pw[cnt[p]] + pw[cnt[q]] - 1) % M;
		vis[p] = vis[q] = 1;
	}
	ans += tt;
	ans += M - 1;
	ans %= M;
	cout << ans << endl;
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:48:24: error: expected ')' before '{' token
   48 |         for(auto pp:cnt{
      |            ~           ^
      |                        )
a.cc:49:20: error: redeclaration of 'll pp'
   49 |                 ll pp=cnt[i];
      |                    ^~
a.cc:48:18: note: 'std::pair<const std::pair<int, int>, int> pp' previously declared here
   48 |         for(auto pp:cnt{
      |                  ^~
a.cc:49:27: error: 'i' was not declared in this scope
   49 |                 ll pp=cnt[i];
      |                           ^
a.cc:50:27: error: request for member 'first' in 'pp', which is of non-class type 'll' {aka 'long long int'}
   50 |                 pi p = pp.first, q = inv(p);
      |                           ^~~~~
a.cc:52:48: error: 'q' was not declared in this scope
   52 |                 tt = tt * (pw[cnt[p]] + pw[cnt[q]] - 1) % M;
      |                                                ^
Language: C

#include <algorithm>
#include <iostream>
#include <string>
#include <random>
#include <cassert>
#include <cstring>
#include <chrono>
#include <set>
#include <map>

using namespace std;

typedef long long ll;

const ll mod = 1000 * 1000 * 1000 + 7;

ll GCD(ll a, ll b) {
  if (a < 0) a *= -1;
  if (b < 0) b *= -1;
  if (a == 0) return b;
  return GCD(b % a, a);
}

void Normalize(ll& x, ll& y) {
  ll g = GCD(x, y);
  x /= g;
  y /= g;
  if (make_pair(x, y) < make_pair(-x, -y)) {
    x = -x;
    y = -y;
  }
}

ll Get(const vector<pair<int, int>>& v) {
  int min1 = mod;
  int min2 = mod;
  ll pow1 = 1;
  ll pow2 = 1;
  for (auto p : v) {
    if (p.first == 0) {
      min1 = min(min1, p.second);
      pow1 = pow1 * 2 % mod;
    } else {
      min2 = min(min2, p.second);
      pow2 = pow2 * 2 % mod;
    }
  }
  ll result = (pow1 + pow2 - 1 + mod) % mod;
  if (min1 > min2) result = 1;
  return result;
}

int main()
{
  int n;
  cin >> n;
  vector<ll> x, y;
  ll add = 0;
  for (int i = 0; i < n; ++i) {
    ll a, b;
    cin >> a >> b;
    if (a == 0 && b == 0) {
      add++;
      continue;
    }
    x.push_back(a);
    y.push_back(b);
  }

  n = x.size();

  map<pair<ll, ll>, vector<pair<int, int>>> m;

  for (int i = 0; i < n; ++i) {
    ll cx = x[i];
    ll cy = y[i];

    Normalize(cx, cy);
    m[{cx, cy}].push_back({0, i});

    cx = y[i];
    cy = -x[i];
    
    Normalize(cx, cy);
    m[{cx, cy}].push_back({1, i});
  }

  ll result = 1;
  for (auto it : m) {
    auto v = it.second;
    result = result * Get(v) % mod;
  }

  result = max<ll>(0, result - 1);
  cout << result + add << endl;

  return 0;
}


Compiler output:
main.c:1:10: fatal error: algorithm: No such file or directory
    1 | #include <algorithm>
      |          ^~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
#define int long long
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
constexpr int MOD = 1000000007;
constexpr int INF = numeric_limits<int>::max() / 2;
typedef pair<int,int> P;
using Graph = vector<vector<int>>;

int modpow(int x, int n, int mod) {
    int res = 1;
    while (n > 0) {
        if (n & 1) {  // nが奇数のとき
            res *= x;
            res %= mod;
        }
        x *= x;
        x %= mod;
        n >>= 1;
    }
    return res;
}
 
 
signed main(){
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
 
	int N;
	cin >> N;
	P p[N];
	map<P, int> mp1;
	rep(i,N){
		cin >> p[i].first >> p[i].second;
		int Q = p[i].first;
		int W = p[i].second;
		int E = gcd(Q, W);
		Q /= E;
		W /= E;
		if( (Q > 0 && W > 0) ) mp1[P(Q, W)]++;
		else if((Q < 0 && W < 0)) mp1[P(-Q, -W)]++;
		else if(Q == 0 && W != 0) mp1[P(0, MOD)]++;
		else if(Q != 0 && W == 0) mp1[P(MOD, 0)]++;
		else if(Q == 0 && W == 0) continue; // mp1[P(0, 0)]++;
		else{
			if(Q > 0) Q *= -1;
			if(W < 0) W *= -1;
			mp1[P(Q, W)]++;
		}
	}
	int ok = 1;
	for(auto e : mp1){
		int x = e.first.first;
		int y = e.first.second;
		int z = e.second;
		else if(x == 0 || y == 0){
			int u = mp1[P(0, MOD)];
			// ok *= n;
			int m = mp1[P(MOD, 0)];
			// ok *= modpow(2, m, MOD);
			ok *= (modpow(2, m, MOD) + modpow(2, u, MOD)-1 );
			mp1[P(0, MOD)] = 0;
			mp1[P(MOD, 0)] = 0;
		}
		else{
			ans -= z;
			// ok *= modpow(2, z, MOD);
			int n = mp1[P(-x, y)];
			ans -= n;
			++ans;
			ok *= (modpow(2, n, MOD) + modpow(2, z, MOD)-1);
			mp1[P(-x, y)] = 0;
			mp1[P(x, y)] = 0;
		}
		ok %= MOD;
	}
	int ans1 = modpow(2, ans, MOD);
	--ans1;
	cout << ok-1 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:56:17: error: 'else' without a previous 'if'
   56 |                 else if(x == 0 || y == 0){
      |                 ^~~~
a.cc:66:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
   66 |                         ans -= z;
      |                         ^~~
      |                         abs
a.cc:77:30: error: 'ans' was not declared in this scope; did you mean 'ans1'?
   77 |         int ans1 = modpow(2, ans, MOD);
      |                              ^~~
      |                              ans1
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i,n) for(ll i = 0; i<(ll)(n); i++)
#define REPS(i,n) for (ll i = 1; i<=(ll)(n); i++)
#define REPD(i,n) for(ll i=(ll)(n)-1;i>=0;i--)
#define FOR(i,a,b) for(ll i=(a);i<=(b);i++)
#define FORD(i,a,b) for(ll i=(a);i>=(b);i--)
#define pb push_back
#define MOD 1000000007
#define MOD2 998244353
#define PI 3.141592653
#define INF 100000000000000


ll powe(ll a, ll b){//aのb乗のmod
    ll ret = 1;
    while(0 < b){
        if((b%2) == 0){
            a = (a*a)%MOD;
            b >>= 1;
        }
        else{
            ret = (ret*a)%MOD;
            b--;
        }
    }
    return ret;
}

int main(){
    ll n; double a, b, y, z; cin >> n;
    ll bothz = 0; ll az = 0; ll bz = 0;
    vector<double> as;
    vector<double> bs;
    REP(i,n){
        cin >> a >> b;
        if (a==0&&b==0){
            bothz++;
        }
        else if (a==0){
            az++;
        }
        else if (b==0){
            bz++;
        }
        else{
            y = a/b;
            z = b/a;
            as.pb(y);
            bs.pb(z);
            //cout << y << " " << z << endl;
        }
    }
    sort(as.begin(),as.end());
    sort(bs.begin(),bs.end());
    //REP(i,as.size()) cout << as[i] << " " << bs[i] << endl;
    ll ans = 1;
    ll i = 0;
    vector<ll> reached(as.size(),0);
    while (i<as.size()){
        if (reached[i]==0){
            double x = -as[i];
            ll ind1 = lower_bound(bs.begin(),bs.end(),x)-bs.begin();
            ll ind2 = upper_bound(bs.begin(),bs.end(),x)-bs.begin();
            if (ind1==ind2){
                ans = (ans*2)%MOD;
                //cout << i << " " << 2 << endl;
                i++;
            }
            else{
                ll ind3 = lower_bound(as.begin(),as.end(),-x)-as.begin();
                ll ind4 = upper_bound(as.begin(),as.end(),-x)-as.begin();
                ans = (ans*((powe(2,ind2-ind1)+powe(2,ind4-ind3)-1))%MOD))%MOD;
                //cout << i << " " << ind1 << " " << ind2 << " " << ind3 << " " << ind4 << endl;
                ll ind5 = lower_bound(as.begin(),as.end(),1/x)-as.begin();
                ll ind6 = upper_bound(as.begin(),as.end(),1/x)-as.begin();
                for(ll j=ind5;j<ind6;j++) reached[j]=1;
                i = ind4;
            }
        }
        else{
            i++;
        }
    }
    ans=(ans*((powe(2,az)+powe(2,bz)-1)%MOD))%MOD;
    ans=(ans-1)%MOD;
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:74:74: error: expected ';' before ')' token
   74 |                 ans = (ans*((powe(2,ind2-ind1)+powe(2,ind4-ind3)-1))%MOD))%MOD;
      |                                                                          ^
      |                                                                          ;
Language: C++

#include <bits/stdc++.h>
using namespace std;

const int N = 200005;

const int MOD = 1000000007;

using Sardine = pair<long long, long long>;

int n;
Sardine sar[N];

long long gcd(long long x, long long y) {
  while (y) {
    long long t = x;
    x = y;
    y = t % y;
  }
  return x;
}

long long Abs(long long x) {
  return x < 0 ? -x : x;
}

void simplify(Sardine &s) {
  long long g = gcd(Abs(s.first), Abs(s.second));
  s.first /= g, s.second /= g;
  if (s.second < 0 || (s.second == 0 && s.first < 0)) {
    s.first *= -1;
    s.second *= -1;
  }
}

map<Sardine, int> cnt;

int power(int x, int y) {
  int ret = 1;
  for (; y; y >>= 1) {
    if (y & 1) ret = 1LL * ret * x % MOD;
    x = 1LL * x * x % MOD;
  }
  return ret;
}

int solve() {
  scanf("%d", &n);
  int ans = 1;

  int zero = 0;
  for (int i = 0; i < n; ++i) {
    scanf("%lld %lld", &sar[i].first, &sar[i].second);
    if (sar[i].first == 0 && sar[i].second == 0) {
      ++zero;
    } else {
      simplify(sar[i]);
      cnt[sar[i]] += 1;
    }
  }

  set<Sardine> s;
  for (int i = 0; i < n; ++i) {
    if (s.find(sar[i])) continue;
    s.insert(sar[i]);
    if (sar[i] == make_pair(0LL, 0LL));
    else {
      Sardine bad = Sardine(sar[i].second, -sar[i].first);
      Sardine bad2 = Sardine(-sar[i].second, sar[i].first);
      if (cnt[bad2] == 0) {
        ans = 1LL * ans * (power(2, cnt[sar[i]]) + power(2, cnt[bad]) - 1) % MOD;
        // cerr << sar[i].first << " " << sar[i].second << " " << ans << endl;
      }
    }
  }

  ans -= 1;
  ans += zero;

  ans %= MOD;
  if (ans < 0) ans += MOD;
  printf("%d\n", ans);
  return 0;
}

int main() {
  int t = 1;
  // scanf("%d", &t);
  for (int tc = 0; tc < t; ++tc) {
    // printf("Case #%d: ", tc+1);
    solve();
  }
  return 0;
}


Compiler output:
a.cc: In function 'int solve()':
a.cc:63:15: error: could not convert 's.std::set<std::pair<long long int, long long int> >::find(sar[i])' from 'std::set<std::pair<long long int, long long int> >::iterator' {aka 'std::_Rb_tree<std::pair<long long int, long long int>, std::pair<long long int, long long int>, std::_Identity<std::pair<long long int, long long int> >, std::less<std::pair<long long int, long long int> >, std::allocator<std::pair<long long int, long long int> > >::const_iterator'} to 'bool'
   63 |     if (s.find(sar[i])) continue;
      |         ~~~~~~^~~~~~~~
      |               |
      |               std::set<std::pair<long long int, long long int> >::iterator {aka std::_Rb_tree<std::pair<long long int, long long int>, std::pair<long long int, long long int>, std::_Identity<std::pair<long long int, long long int> >, std::less<std::pair<long long int, long long int> >, std::allocator<std::pair<long long int, long long int> > >::const_iterator}