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

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> P;
typedef pair<ll, ll> Pll;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repn(i, n) for (int i = 0; i <= (int)(n); i++)
#define srep(i, l, n) for (int i = l; i < (int)(n); i++)
#define srepn(i, l, n) for (int i = l; i <= (int)(n); i++)
#define pb push_back 
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

const int MOD = 1000000007;
const int INF = 1e9;
#define PI 3.14159265369;
int dx[4] = {1,-1,0,0};
int dy[4] = {0,0,1,-1};
int ddx[8] = {1,1,1,-1,-1,-1,0,0};
int ddy[8] = {0,1,-1,0,1,-1,1,-1};

const int mod = 1000000007;
struct mint {
  ll x; // typedef long long ll;
  mint(ll x=0):x((x%mod+mod)%mod){}
  mint operator-() const { return mint(-x);}
  mint& operator+=(const mint a) {
    if ((x += a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator-=(const mint a) {
    if ((x += mod-a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator*=(const mint a) {
    (x *= a.x) %= mod;
    return *this;
  }
  mint operator+(const mint a) const {
    mint res(*this);
    return res+=a;
  }
  mint operator-(const mint a) const {
    mint res(*this);
    return res-=a;
  }
  mint operator*(const mint a) const {
    mint res(*this);
    return res*=a;
  }
  mint pow(ll t) const {
    if (!t) return 1;
    mint a = pow(t>>1);
    a *= a;
    if (t&1) a *= *this;
    return a;
  }
 
  // for prime mod
  mint inv() const {
    return pow(mod-2);
  }
  mint& operator/=(const mint a) {
    return (*this) *= a.inv();
  }
  mint operator/(const mint a) const {
    mint res(*this);
    return res/=a;
  }
};


int main(){
	int n;
	cin >> n;
	int zero = 0;
	map<Pll, P> mp;
	for(int i = 0; i < n; i++) {
		ll x, y;
		cin >> x >> y;
		if (x == 0 && y == 0) {
			zero++;
			continue;
		}
		if (y < 0) {
			x = -x;
			y = -y;
		}
		if(y == 0 && x < 0) {
			x = -x;
		}
		g = gcd(x, y);
		x /= g;
		y /= g;
		bool rot = (x <= 0);
		if(rot) {
			swap(x, y);
			y = -y;
		}
		if(rot) {
			mp[{x, y}].second++;
		} else {
			mp[{x, y}].first++;
		}
	}

	mint ans = 1;
	for(auto& e: mp) {
		int s = e.second.first;
		int t = e.second.second;
		mint now = 1;
		now += mint(2).pow(s)-1;
		now += mint(2).pow(t)-1;
		ans *= now;
	}
	ans-=1;
	ans += zero;
	cout << ans.x << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:93:17: error: 'g' was not declared in this scope
   93 |                 g = gcd(x, y);
      |                 ^
Language: C++

#pragma GCC optimize(3, "Ofast", "inline")

#include <bits/stdc++.h>

#define start ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define ll long long
#define int ll
#define ls st<<1
#define rs st<<1|1
#define pii pair<int,int>
#define rep(z, x, y) for(int z=x;z<=y;++z)
#define com bool operator<(const node &b)
using namespace std;
const int maxn = (ll) 3e5 + 5;
const int mod = 1000000007;
const int inf = 0x3f3f3f3f;
int T = 1;
int cntb, cnta, cntab;
int fac[maxn];

void solve() {
    fac[0] = 1;
    rep(i, 1, 2e5 + 5)fac[i] = fac[i - 1] * 2 % mod;
    map<pii, int> mp;
    int n;
    cin >> n;
    rep(i, 1, n) {
        int a, b;
        cin >> a >> b;
        if (a * b == 0) {
            if (a == 0 && b == 0)
                ++cntab;
            else if (a == 0)
                ++cnta;
            else if (b == 0)
                ++cntb;
            continue;
        }
        int gcd = __gcd(a, b);
        a /= gcd, b /= gcd;
        if (a * b > 0) {
            a = abs(a), b = abs(b);
            ++mp[pii(a, b)];
        } else {
            a = abs(a), b = abs(b);
            int gcd = __gcd(a, b);
            ++mp[pii(-a, b)];
        }
    }
    int ans = (fac[cnta] + fac[cntb] - 1 + mod) % mod;
    for (auto &to:mp) {
        if (to.second == 0)
            continue;
        int a = to.first.first, b = to.first.second;
        int num = to.second;
        pii j = a > 0 ? pii(-b, a) : pii(b, -a);
        if (mp[j] == 0)
            ans = ans * fac[num] % mod;
        else
            ans = ans * (fac[num] + fac[mp[j]] - 1 + mod) % mod;
        //cout << a << ' ' << b << ' ' << ans << ' ' << mp[j] << endl;
        mp[j] = to.second = 0;
    }
    cout << (ans - 1 + cntab + mod) + mod) % mod;
}

signed main() {
    start;
    while (T--)
        solve();
    return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:64:42: error: expected ';' before ')' token
   64 |     cout << (ans - 1 + cntab + mod) + mod) % mod;
      |                                          ^
      |                                          ;
Language: C++

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

using lnt = long long;
using Real = long double;

#define ALL(obj) (obj).begin(),(obj).end()
#define RALL(obj) (obj).rbegin(),(obj).rend()
#define REP(i, n) for(lnt i=0;i<(n);++i)
#define RANGE(i, a, b) for(lnt i=(a);i<(b);++i)
#define RREP(i, n) for(lnt i=(n)-1;i>= 0;--i)

#define ln '\n'
#define pb push_back
#define eb emplace_back
#define pque priority_queue
#define umap unordered_map
#define uset unordered_set
#define dcout cout<<fixed<<setprecision(20)
#define summon_tourist cin.tie(0);ios::sync_with_stdio(false)

constexpr int dx[]={1,0,-1,0,1,1,-1,-1}, dy[]={0,-1,0,1,1,-1,1,-1};
constexpr Real eps = 1e-9; const Real pi = acosl(-1);
constexpr lnt BIG = INT_MAX/10, BBIG = LLONG_MAX/10;

template<class T> inline T GCD(T a,T b){T c;while(b!=0){c=a%b;a=b;b=c;}return a;}
template<class T> inline T LCM(T a,T b){T c=GCD(a,b);a/=c;return a*b;}
template<class T> inline T nCr(T a,T b){T i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;}
template<class T> inline T nHr(T a,T b){return nCr(a+b-1,b);}
template<class T> inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
template<class T> inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}

using pint = pair<int, int>; using plnt = pair<lnt, lnt>;
using vint = vector<int>; using vlnt = vector<lnt>;
constexpr lnt MOD = 1e9+7;

// lnt powmod(lnt a, lnt p, lnt m){
// 	lnt res = 1, tmp = a;
// 	while(p != 0){
// 		if(p % 2) res = (res*tmp) % m;
// 		tmp = (tmp*tmp) % m;
// 		p /= 2;
// 	}
// 	return res;
// }

lnt powmod(lnt a, lnt p, lnt m){
	if(p == 0) return 1;
	return powmod(a*a%m, p/2)*(p%2 ? a : 1) % m;
}

int main(){
	summon_tourist;

	lnt N; cin >> N;

	lnt c00 = 0, c01 = 0, c10 = 0;
	vector<plnt> X;
	map<plnt, lnt> mp;

	REP(i, N){
		lnt a, b; cin >> a >> b;
		if(a==0 and b==0) c00++;
		else if(a==0) c01++;
		else if(b==0) c10++;
		else X.eb(a, b);
	}

	for(plnt &p: X){
		lnt a = p.first, b = p.second;
		lnt g = __gcd(abs(a), abs(b));
		a /= g; b /= g;
		if(a < 0){
			a*=-1; b*=-1;
		}
		mp[{a, b}]++;
		if(b < 0){
			lnt ta = -b, tb = a;
			a = ta; b = tb;
		}
		p = {a, b};
	}
	sort(ALL(X));
	X.erase(unique(ALL(X)), X.end());
	lnt ans = (powmod(2, c01, MOD) + powmod(2, c10, MOD) - 1 + MOD) % MOD;
	for(plnt p: X){
		lnt a = p.first, b = p.second;
		cerr << a << ' ' << b << ln;
		lnt A = b, B = -a;
		lnt c0 = mp[p], c1 = mp[{A, B}];
		ans = ans * ((powmod(2, c0, MOD) + powmod(2, c1, MOD) - 1 + MOD) % MOD) % MOD;
	}
	
	cout << (ans-1+c00+MOD) % MOD << ln;
}

Compiler output:
a.cc: In function 'lnt powmod(lnt, lnt, lnt)':
a.cc:49:22: error: too few arguments to function 'lnt powmod(lnt, lnt, lnt)'
   49 |         return powmod(a*a%m, p/2)*(p%2 ? a : 1) % m;
      |                ~~~~~~^~~~~~~~~~~~
a.cc:47:5: note: declared here
   47 | lnt powmod(lnt a, lnt p, lnt m){
      |     ^~~~~~
Language: C++

from math import gcd

N = int(input())
mod = 1000000007
dic = []
zero = 0
dic.append[[1,0],[0,0]]

#辞書登録
for i in range(N):
    A,B = list(map(int,input().split()))

    if(A == 0 and B == 0):
        zero += 1
        continue
    elif(A == 0 and B != 0):
        dic[0][1][1] += 1
        continue
    elif(A != 0 and B == 0):
        dic[0][1][0] += 1
        continue

    if(A*B < 0):
        A = (-1) * abs(A)
    else:
        A = abs(A)
    B = abs(B)
    A = int(A/gcd(A,B))
    B = int(B/gcd(A,B))
    for i in range(len(dic)):
        if(A*B < 0):
            if(dic[i][0] == [B,abs(A)]):
                dic[i][1][1] += 1
                break
        else:
            if(dic[i][0] == [A,B]):
                dic[i][1][0] += 1
                break
    else:
        if(A*B < 0):
            dic.append([[B,abs(A)],[0,1]])
        else:
            dic.append([[A,B],[1,0]])

cnt_iso = 0
ans = 1

#ペアになってない数
for d in dic:
    if(d[1][0] == 0):
        cnt_iso += d[1][1]
    elif(d[1][1] == 0):
        cnt_iso += d[1][0]

ans *= 2**cnt_iso % mod

for d in dic:
    if(d[1][0] != 0 and d[1][0] != 0):
        ans *= (2**d[1][0] + 2**key[1][1]) % mod

print(ans)

Compiler output:
a.cc:9:2: error: invalid preprocessing directive #\U00008f9e\U000066f8\U0000767b\U00009332
    9 | #辞書登録
      |  ^~~~~~~~
a.cc:48:2: error: invalid preprocessing directive #\U000030da\U000030a2\U0000306b\U0000306a\U00003063\U00003066\U0000306a\U00003044\U00006570
   48 | #ペアになってない数
      |  ^~~~~~~~~~~~~~~~~~
a.cc:1:1: error: 'from' does not name a type
    1 | from math import gcd
      | ^~~~
Language: C++

#include <bits/stdc++.h>//Carefully Crafted by hetp111
using namespace std;
#define int long long
#define double long double
#define all(v) (v).begin(),(v).end()
#define vi vector<int>
#define vvi vector<vi>
#define pii pair<int,int>
#define vii vector<pii>
#define MOD (1000000007)
#define MOD2 (998244353)
#define MOD3 (1000000009)
#define PI acos(-1)
#define eps (1e-8)
#define INF (1e18)
#define FASTER ios_base::sync_with_stdio(0);cin.tie(0)
template<class A,class B>ostream&operator<<(ostream&out,const pair<A,B>&a){return out<<"("<<a.first<<","<<a.second<<")";}
template<class A>ostream&operator<<(ostream&out,const vector<A>&a){for(const A &it:a)out<<it<<" ";return out;}
template<class A,class B>istream&operator>>(istream&in,pair<A,B>&a){return in>>a.first>>a.second;}
template<class A>istream&operator>>(istream&in,vector<A>&a){for(A &i:a)in>>i;return in;}
ifstream cinn("input.txt");ofstream coutt("output.txt");
int poww(int a,int b,int m=MOD){if(b==0)return 1;int x=poww(a,b/2,m);x=x*x%m;if(b&1)x=x*a%m;return x;}

pii f(pii p){
    int a=p.first;
    int b=p.second;
    
    if(a==0)return {0,1};
    if(b==0)return {1,0};
    
    if(b<0){
        a=-a;
        b=-b;
    }
    return {a,b};
}

pii fi(pii p){
    int a=p.first;
    int b=p.second;
    
    return f(-b,a);
}

signed main(){
    FASTER;
    int n;cin>>n;
    vii v(n);cin>>v;
    
    int cnt=0;
    map<pii,int> mp;
    for(pii &p:v){
        if(p.first==0 && p.second==0){
            cnt++;
            continue;
        }
        int g=__gcd(abs(p.first),abs(p.second));
        p.first/=g;
        p.second/=g;
        mp[f(p)]++;
    }
    
    map<pii,bool> vis;
    int ans=1;
    for(pii p:v){
        pii x=f(p);
        pii y=fi(p);
        if(vis[x]||vis[y])continue;
        
        int le=(poww(2,mp[x])+poww(2,mp[y])-1+MOD)%MOD;
        (ans*=le)%=MOD;
        
        vis[x]=vis[y]=1;
    }
    (ans+=cnt-1+MOD)%=MOD;
    cout<<ans;
}

Compiler output:
a.cc: In function 'std::pair<long long int, long long int> fi(std::pair<long long int, long long int>)':
a.cc:42:14: error: could not convert '- b' from 'long long int' to 'std::pair<long long int, long long int>'
   42 |     return f(-b,a);
      |              ^~
      |              |
      |              long long int
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;
  for(int i=1;i<N+1;i++){
    p2[i]=p[i-1]*2%MOD; 
  }

  map<pair<ll,ll>,ll> m;
  for(int i=0;i<N;i++){
    ll a,b; cin >> a >> b;
    if(a==0 && b==0){
      m[make_pair<ll,ll>(0,0)]++;
      continue;
    }
    if(a==0){
      m[make_pair<ll,ll>(0,1)]++;
      continue;
    }
    if(b==0){
      m[make_pair<ll,ll>(1,0)]++;
      continue;
    }
    
    ll ta=abs(a),tb=abs(b);
    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(a,b)]++;
  }

  //for(auto mi:m) cout << "##" << mi.first.first << "," << mi.first.second << " " << mi.second << endl;

  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;
    }

    //cout << "**" << mi.first.first << "," << mi.first.second << " " << tmp.first << "," << tmp.second << endl;

    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)%MOD+MOD)%MOD << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:11: error: 'p' was not declared in this scope
   25 |     p2[i]=p[i-1]*2%MOD;
      |           ^
Language: C++

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

//ll mod=1000000007;
ll a,b,k,sol,a2,b2;
int n,m1,m2,n2;
double d;
set<double> S;
map<double,int> M;
ll arr[200005];

ll gcd(ll x, ll y) {
    if (x%y==0) {return y;}
    else {gcd(y,x%y);}
}

int main() {
    cin >> n;
    for (int i=0;i<n;i++) {
        cin >> a >> b;
        a2=abs(a);
        b2=abs(b);
        k=gcd(max(a2,b2),min(a2,b2));
        a/=k;
        b/=k;
        d=(double)a/double(b);
        S.insert(d);
        M[d]++;
    }

    arr[0]=1;
    for (int i=1;i<=n;i++) {
        arr[i]=((arr[i-1]*2)%1000000007);
    }

//    sort(V.begin(),V.end());
    sol=1;
    for (auto e : S) {
        if (e<0 && M[-1/e]>0) {
            m1=M[e];
            m2=M[-1/e];
            sol*=(arr[m1]+arr[m2]-1);
        }
        else if (M[-1/e]==0) {
            sol*=2;
        }
        sol%=mod;
    }
    cout << sol -1;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:48:14: error: 'mod' was not declared in this scope; did you mean 'modf'?
   48 |         sol%=mod;
      |              ^~~
      |              modf
a.cc: In function 'long long int gcd(long long int, long long int)':
a.cc:15:14: warning: control reaches end of non-void function [-Wreturn-type]
   15 |     else {gcd(y,x%y);}
      |           ~~~^~~~~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <utility>
#include <map>

using namespace std;

const int MOD = 1000000007;

long long mpow(long long x, long long n) {
	if (n == 0) return 1;
	if (n & 1) return x * mpow(x * x % MOD, n >> 1) % MOD;
	return mpow(x * x % MOD, n >> 1);
}

int main() {
	int n; cin >> n;
	map<pair<long long, long long>, pair<int, int> > mp;
	int ans = 0;
	for (int i = 0; i < n; ++i) {
		long long a, b; cin >> a >> b;
		if (!a && !b) {
			++ans;
			continue;
		}
		long long g = gcd(a, b); //gcd(a,0)=gcd(0,a)=|a|
		a /= g, b /= g;
		if ((a < 0) ^ (b < 0)) ++mp[make_pair(abs(a), abs(b))].first; 
		else ++mp[make_pair(abs(b), abs(a))].second;
	}
	long long tmp = 1;
	for (auto [_, e] : mp)
		(tmp *= (mpow(2, e.first) + mpow(2, e.second) - 1 + MOD) % MOD) %= MOD;
	ans = (ans + tmp - 1 + MOD) % MOD;
	cout << ans << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:31: error: 'gcd' was not declared in this scope
   26 |                 long long g = gcd(a, b); //gcd(a,0)=gcd(0,a)=|a|
      |                               ^~~
Language: C++

#include "bits/stdc++.h"
#define int long long
#define rep(i, n)           for (int i = 0; i < (int)(n); i++)
#define FOR(i, a, b)        for (int i = (int)(a); i < (int)(b); i++)
#define inv(i, a, b)        for (int i = (int)(a); i >= (int)(b); i--)
#define ALL(obj)            begin(obj), end(obj)
#define MAX(x)              *max_element(ALL(x))
#define MIN(x)              *min_element(ALL(x))
#define LOWER_BOUND(A, key) distance(A.begin(), lower_bound(ALL(A), key))
#define UPPER_BOUND(A, key) distance(A.begin(), upper_bound(ALL(A), key))
#define Endl                endl

using namespace std;
const int MOD = (int)(1e9 + 7);
const int INF = (int)(1e13 + 7);

int CEIL(int a, int b) { return (a >= 0 ? (a + (b - 1)) / b : (a - (b - 1)) / b); } //ceil() for int
int mod(int a, int b) { return a >= 0 ? a % b : a - (b * CEIL(a, b)); }             //always return positive num
int bpm(int x, unsigned int y) {                                                    //return x^y in order(log(y))
  if (x == 0) return 0;
  if (y == 0) return 1;
  int ans   = 1;
  int digit = (int)((log((double)y) / log((double)2) / 1 + 1));
  x %= MOD;
  for (int i = 0; i < digit; i++) {
    if (((y >> i) & 1u) == 1) ans = ans * x % MOD;
    x = x * x % MOD;
  }
  return ans;
}
template <class T>
void cumulative_sum(T &container) {
  for (int i = 0; i < container.size() - 1; i++) container[i + 1] += container[i];
}
template <class T>
struct reduction { //reduction: 約分, O(log n)
private:
  int gcd(int a, int b) { return (b ? gcd(b, a % b) : a); }
  int lcm(int a, int b) { return a * b / gcd(a, b); }

public:
  T first;
  T second;
  reduction(int a, int b) : first(a), second(b) { //符号は変わらない
    if (a == 0 or b == 0) {
      first = second = 0;
    } else {
      int GCD = gcd(abs(first), abs(second));
      first /= GCD;
      second /= GCD;
    }
  }
};

class EBullet {
public:
  static void solve(std::istream &cin, std::ostream &cout) {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int N;
    cin >> N;
    map<pair<int, int>, int> counter;
    rep(i, N) {
      int A, B;
      cin >> A >> B;
      reduction<int> rd(A, B);
      if (A * B < 0)
        counter[{-abs(rd.first), -abs(rd.second)}]++;
      else
        counter[{rd.first, rd.second}]++;
    }
    int ans = 1;
    for (auto &i : counter) {
      if (i.first.first == 0) {
        ans *= i.second + 1;
      } else {
        if (counter.count({-i.first.second, -i.first.first})) {
          ans *= (bpm(2, i.second) + bpm(2, counter[{-i.first.second, -i.first.first}]) - 1);
          counter[{-i.first.second, -i.first.first}] = 0;
          i.second = 0;
        } else {
          ans *= bpm(2, i.second);
        }
      }
      ans %= MOD;
    }
    cout << mod(ans - 1, MOD) << endl;
  }
};


Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include<bits/stdc++.h>
#define ll long long 
using namespace std;
const int mod=1e9+7;
int n,cnt;
ll modpow(ll a,ll b){
    ll res=1;
    while(b){
        if(b&1) res=res*a%mod;
        a=a*a%mod;
        b>>=1;
    }
    return res;
}
int main(){
    for(ll i=0;i<n;i++){
    ll a,b;
    cin>>a>>b;
    if(!a&&!b){cnt++;continue;}
    
    ll g=__gcd(a,b);
    a/=g;b/=g;
   
    if(b<0)a=-a,b=-b;
    
    if(a<=0)m[{b,-a}].second++;
    else m[{a,b}].first++;
  }
    ll ans=1;
    for(auto u:m){
        ans=(ans*(modpow(2,u.second.first)+modpow(2,u.second.second)-1+mod)%mod)%mod;
    }
    cout<<(ans-1+cnt+mod)%mod;
    return 0;
}  

Compiler output:
a.cc: In function 'int main()':
a.cc:26:13: error: 'm' was not declared in this scope
   26 |     if(a<=0)m[{b,-a}].second++;
      |             ^
a.cc:27:10: error: 'm' was not declared in this scope
   27 |     else m[{a,b}].first++;
      |          ^
a.cc:30:16: error: 'm' was not declared in this scope
   30 |     for(auto u:m){
      |                ^
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
#include <stdio.h>
#include <stdlib.h>
#include <vector>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <string.h>
#include <stack>
#include <assert.h>
#include <bitset>
#include <self/combinatorics>
#define Endl endl
#define mp make_pair
#define ll long long 
#define ull unsigned long long
#define pii pair<int,int>
#define pll pair<ll,ll>
#define over(A) {cout<<A<<endl;exit(0);}
#define all(A) A.begin(),A.end()
#define ceil(a,b) ((a-1)/b+1)
#define quickcin ios_base::sync_with_stdio(false);
template <typename T1,typename T2> inline void chmin(T1 &x,T2 b) {if(b<x) x=b;}
template <typename T1,typename T2> inline void chmax(T1 &x,T2 b) {if(b>x) x=b;}
template <typename T1,typename T2> inline void chmod(T1 &x,T2 b) {x%=b,x+=b;if(x>=b) x-=b;}
const int inf=1039074182;
const int mod=1e9+7;
const ll llinf=1LL*inf*inf;
using namespace std;
int n;
ll a[200005];
ll b[200005];

struct s4
{
	int a[5];
};

map <pair<ll,ll>,s4> m;

int quadrant(ll x,ll y)
{
	if(y==0 && x>0) return 1;
	if(x==0 && y>0) return 2;
	if(y==0 && x<0) return 3;
	if(x==0 && y<0) return 4;
	if(x>0 && y>0) return 1;
	if(x<0 && y>0) return 2;
	if(x<0 && y<0) return 3;
	if(x>0 && y<0) return 4;
}

void zjhua(ll &x,ll &y)
{
	if(x==0 || y==0)
	{
		x=1;
		y=0;
	}
	else
	{
		while(!(x>0 && y>0))
		{
			ll tx=y,ty=-x;
			x=tx,y=ty;
		}
		ll g=__gcd(x,y);
		x/=g;
		y/=g;
	}
}

int main()
{
//	freopen("input.txt","r",stdin);
	quickcin;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>a[i]>>b[i];
	}
	for(int i=0;i<n;i++)
	{
		if(a[i]==0 && b[i]==0) continue;
		ll x=a[i],y=b[i];
		zjhua(x,y);
		m[mp(x,y)].a[quadrant(a[i],b[i])]++;
	}
	int res=1;
	init(0,mod);
	for(auto tmp:m)
	{
		s4 o=tmp.second;
		int a=o.a[1],b=o.a[2],c=o.a[3],d=o.a[4];
		int ways=sub(add(fastpow(2,(a+c)),fastpow(2,(b+d))),1);
		res=mult(res,ways);
	}
	res=sub(res,1);
	cout<<res<<endl;
	return 0;
}

Compiler output:
a.cc:15:10: fatal error: self/combinatorics: No such file or directory
   15 | #include <self/combinatorics>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include<iostream>
#include<cmath>
#include<numeric>
#include<functional>
#include<string>
#include<algorithm>
#include<vector>
#include<map>
#include<iomanip>
#include<queue>
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<n;i++)
#define ll long long
#define INF 2147483647
using namespace std;
using Graph=vector<vector<int>>;

ll gcd(ll a,ll b){
  a=abs(a); b=abs(b);
  if(a==0 || b==0){
    return abs(a+b);
  }
  if(a<b){
    ll tmp=a; a=b; b=tmp;
  }
  ll r=a%b;
  while(r!=0){
    a=b;
    b=r;
    r=a%b;
  }
  return b;
}

ll RepSq(ll a,ll n,ll mod){
  if(n==0){
    return 1;
  }else if(n%2!=0){
    return (a*RepSq(a,n-1,mod))%mod;
  }else{
    ll x=RepSq(a,n/2,mod);
    return (x*x)%mod;
  }
}

int main(){
  ll n;
  cin>>n;
  ll mod=1000000007
  ll a[n],b[n],g[n];
  map<pair<ll,ll>,ll> mp;
  rep(i,n){
    cin>>a[i]>>b[i];
    g[i]=gcd(a[i],b[i]);
    a[i]/=g[i]; b[i]/=g[i];
    if(a[i]<0 || (a[i]==0 && b[i]>0)){
      a[i]*=-1; b[i]*=-1;
    }
    mp[make_pair(a[i],b[i])]++;
  }
  ll ans=0;
  for(auto p:mp){
    ll x,y,z,w;
    x=p.first.first; y=p.first.second;
    z=p.second;
    if(y<0){
      w=mp[make_pair(-y,x)];
    }else{
      w=mp[make_pair(y,-x)];
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:12: error: expected ',' or ';' before 'long'
   16 | #define ll long long
      |            ^~~~
a.cc:53:3: note: in expansion of macro 'll'
   53 |   ll a[n],b[n],g[n];
      |   ^~
a.cc:56:10: error: 'a' was not declared in this scope
   56 |     cin>>a[i]>>b[i];
      |          ^
a.cc:56:16: error: 'b' was not declared in this scope
   56 |     cin>>a[i]>>b[i];
      |                ^
a.cc:57:5: error: 'g' was not declared in this scope
   57 |     g[i]=gcd(a[i],b[i]);
      |     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
const int N = 200000 + 10;
const int p = 1000000000 + 7;

long long gcd(long long a, long long b) {return !b ? a : gcd(b, a % b); }

void Change(long long &x, long long &y) {
    if (x < 0)  { x = -x; y = -y; }
    if (x == 0 && y < 0)    {y = -y; }
}

long long qpow(long long a, long long k = p - 2) {
    long long res = 1;
    while (k) {
        if (k & 1)  res = res * a % p;
        a = a * a % p;
        k >>= 1;
    }
    return res;
}

int n;
map <pair<long long, long long>, int> mp;

int main() {
    scanf("%d", &n);
    long long ans = 0, tans = 1;
    for (int i = 1; i <= n; i++) {
        long long x, y; scanf("%lld %lld", &x, &y);
        long long d = gcd(abs(x), abs(y));
        x /= d; y /= d;
        Change(x, y);
        pair<long long, long long> a = {x, y};
        swap(x, y); y = -y;

        Change(x, y);
        pair<long long, long long> b = {x, y};
        
        tans = tans * qpow(qpow(2, mp[a]) + qpow(2, mp[b]) - 1)) % p;
        tans = tans * qpow(2, mp[a]) % p;
        ans = (ans + tans) % p;
        tans = tans * qpow(qpow(2, mp[a])) % p;
        mp[a]++;
        tans = tans * (qpow(2, mp[a]) + qpow(2, mp[b]) - 1) % p;
    }
    printf("%lld\n", ans);
#ifndef ONLINE_JUDGE
    system("pause");
#endif
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:64: error: expected ';' before ')' token
   40 |         tans = tans * qpow(qpow(2, mp[a]) + qpow(2, mp[b]) - 1)) % p;
      |                                                                ^
      |                                                                ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7/*998244353*/;
const ll INF = 1LL << 60;
ll mod_pow(ll, ll, ll); ll mod_fact(ll, ll); ll mod_inv(ll, ll); ll gcd(ll, ll); ll lcm(ll, ll);
//
pair<ll, ll> reverse(pair<ll, ll> p){
    ll a = -1 * p.second, b = p.first;
    if(b < 0) {a *= -1; b *= -1;}
    return make_pair(a, b);
}
int main(){
    int n;
    cin >> n;
    map<pair<ll, ll>, int> mp;
    ll a_0 = 0, b_0 = 0, a_b_0 = 0;;
    for(int i = 0 ; i < n; i++){
        ll a, b;
        cin >> a >> b;
        if(a == 0 && b == 0) {a_b_0++; continue;}
        if(a == 0) {a_0++; continue;}
        if(b == 0) {b_0++; continue;}
        ll c = gcd(a, b);
        a /= c;
        b /= c;
        if(b < 0){a *= -1; b *= -1;}
        mp[make_pair(a, b)]++;
    }
    vector<ll> po(n + 1);
    po[0] = 1;
    for(int i = 1; i <= n; i++) po[i] = po[i - 1] * 2 % MOD;
    vector<ll> combination_for_each_pair;
    for(auto itr : mp){
        auto p = itr.first;
        int x = itr.second, y;
        auto itr2 = mp.find(reverse(p));
        if(itr2 != mp.end()){
            y = itr2->second;
            mp.erase(itr2);
            combination_for_each_pair.push_back((po[x] + po[y] - 1) % MOD);
        }else{
            combination_for_each_pair.push_back(po[x]);
        }
        mp.erase(itr.first);
    }
    if(a_0 == 0 && b_0 == 0);
    else if(a_0 == 0) combination_for_each_pair.push_back(po[b_0]);
    else if(b_0 == 0) combination_for_each_pair.push_back(po[a_0]);
    else combination_for_each_pair.push_back(po[a_0] + po[b_0] - 1);
    ll sum = 1;
    for(int i = 0; i < (int)combination_for_each_pair.size(); i++){
        sum = (sum * combination_for_each_pair[i]) % MOD;
    }
    sum = (sum + MOD + a_b_0 - 1) % MOD;
    cout << sum << "\n";
    /*for(int a : combination_for_each_pair){
        cout << a << " ";
    }
    cout <<  reverse(make_pair(2, -1)).first << " " << reverse(make_pair(2, -1)).second;*/
}

Compiler output:
/usr/bin/ld: /tmp/ccXFXB2z.o: in function `main':
a.cc:(.text+0x151): undefined reference to `gcd(long long, long long)'
collect2: error: ld returned 1 exit status
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7/*998244353*/;
const ll INF = 1LL << 60;
ll mod_pow(ll, ll, ll); ll mod_fact(ll, ll); ll mod_inv(ll, ll); ll gcd(ll, ll); ll lcm(ll, ll);
//
pair<ll, ll> reverse(pair<ll, ll> p){
    ll a = -1 * p.second, b = p.first;
    if(b < 0) {a *= -1; b *= -1;}
    return make_pair(a, b);
}
int main(){
    int n;
    cin >> n;
    map<pair<ll, ll>, int> mp;
    ll a_0 = 0, b_0 = 0, a_b_0 = 0;;
    for(int i = 0 ; i < n; i++){
        ll a, b;
        cin >> a >> b;
        if(a == 0 && b == 0) {a_b_0++; continue;}
        if(a == 0) {a_0++; continue;}
        if(b == 0) {b_0++; continue;}
        ll c = gcd(a, b);
        a /= c;
        b /= c;
        if(b < 0){a *= -1; b *= -1;}
        mp[make_pair(a, b)]++;
    }
    vector<ll> po(n + 1);
    po[0] = 1;
    for(int i = 1; i <= n; i++) po[i] = po[i - 1] * 2 % MOD;
    vector<ll> combination_for_each_pair;
    for(auto itr : mp){
        auto p = itr.first;
        int x = itr.second, y;
        auto itr2 = mp.find(reverse(p));
        if(itr2 != mp.end()){
            y = itr2->second;
            mp.erase(itr2);
            combination_for_each_pair.push_back((po[x] + po[y] - 1) % MOD);
        }else{
            combination_for_each_pair.push_back(po[x]);
        }
        mp.erase(itr.first);
    }
    if(a_0 == 0 && b_0 == 0);
    else if(a_0 == 0) combination_for_each_pair.push_back(po[b_0]);
    else if(b_0 == 0) combination_for_each_pair.push_back(po[a_0]);
    else combination_for_each_pair.push_back(po[a_0] + po[b_0] - 1);
    ll sum = 1;
    for(int i = 0; i < combination_for_each_pair.size(); i++){
        sum = (sum * combination_for_each_pair[i]) % MOD;
    }
    sum = (sum + MOD + a_b_0 - 1) % MOD;
    cout << sum << "\n";
    /*for(int a : combination_for_each_pair){
        cout << a << " ";
    }
    cout <<  reverse(make_pair(2, -1)).first << " " << reverse(make_pair(2, -1)).second;*/
}

Compiler output:
/usr/bin/ld: /tmp/ccXDbCGh.o: in function `main':
a.cc:(.text+0x151): undefined reference to `gcd(long long, long long)'
collect2: error: ld returned 1 exit status
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
#define pb push_back
#define ll long long
#define maxn 300005
#define fr(i,j,k) for(int i=j;i<k;i++)
#define f(n) fr(i,0,n)
#define f1(n) fr(i,1,n+1)
#define ms(i) memset(i,0,sizeof(i));
#define ms1(i) memset(i,-1,sizeof(i));
#define F first
#define S second
#define all(x) x.begin(), x.end()
const int mod = 1e9+7;
ll pm(int n,int p){
    ll ret = 1;
    ll now = n;
    while(p){
        if(p & 1){
            ret *= now;
            ret %= mod;
        }
        now *= now;
        now %= mod;
        p >>= 1;
    }
    return ret;
}
int main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	int n;
	cin >> n;
	map<pair<ll,ll>,pair<int,int>>mp;
	int c0 = 0;
	f (n) {
		ll x, y;
		cin >> x >> y;
		if (b < 0) {
			a = -a;
			b = -b;
		}
		if (x == 0 && y == 0) {
			c0++;
		}
		else {
			ll g = __gcd(x, y);
			x /= g;
			y /= g;
			if (x <= 0) {
				mp[{y, -x}].S++;
			}
			else {
				mp[{x, y}].F++;
			}
		}
	}
	ll ans = 1;
	for (auto &i : mp) {
		ll add = (pm(2, i.S.F) + pm(2, i.S.S) - 1 + mod) % mod;
		ans *= add;
		ans %= mod;
	}
	ans += mod - 1 + c0;
	ans %= mod;
	cout << ans << '\n';
}


Compiler output:
a.cc: In function 'int main()':
a.cc:40:21: error: 'b' was not declared in this scope
   40 |                 if (b < 0) {
      |                     ^
a.cc:41:25: error: 'a' was not declared in this scope
   41 |                         a = -a;
      |                         ^
Language: C++


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

ll powll(ll x,ll t)
{
    if(!t) return 1;
    ll a = powll(x,t>>1);
    a*=a;
    if(t&1) a*= x;
    return a;
}

int main(){
    int n;
    int zero = 0;
    map<pair<ll,ll>,P> mp;
    cin >> n;
    rep(i,n){
        ll x,y;
        cin >> x >> y;
        if(x == 0 && y == 0) {
            zero++;
            continue;
        }
        ll g= gcd(x,y);
        x /= g;
        y /= g;
        if(y < 0) x = -x, y = -y;
        bool rot90 = (x<=0);
        if(rot90){
            ll temp = x;
            x = y;y = -temp;
        }
        if(rot90) mp[{x,y}].first++;
        else mp[{x,y}].second++;
    }
    ll ans = 1;
    for(auto p:mp){
        int s = p.second.first;
        int t = p.second.second;
        ll now = 1;
        now += powll((ll)2,s) -1;
        now += powll((ll)2,t) -1;
        //now %= (ll)1000000007;
        ans *= now;
        //ans %= (ll)1000000007;
        //if(ans == 0) ans = (ll)1000000007;
    }
    //ans += ((ll)zero + (ll)1000000007);
    //ans %= (ll)1000000007;
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:9: error: 'i' was not declared in this scope
   25 |     rep(i,n){
      |         ^
a.cc:7:22: note: in definition of macro 'rep'
    7 | #define rep(i,n) for(i=0;i<(n);++i)
      |                      ^
Language: C++

#include<bits/stdc++.h>
#define fi first
#define se second
#define rep(i, n) for(int (i) = 0; (i) < (n); (i)++)
#define rrep(i, n) for (int (i) = 1; (i) <= (n); (i++))
#define rng(a) a.begin(),a.end()
#define rrng(a) a.rbegin(),a.rend()
#define pb push_back
#define eb emplace_back
#define yn {puts("Yes");}else {puts("No");}
#define printd(x) printf("%.20f\n", x);
template<class T> bool chmin(T& a, const T& b) {if (a > b) {a = b; return 1;} return 0;}
template<class T> bool chmax(T& a, const T& b) {if (a < b) {a = b; return 1;} return 0;}
using namespace std;
using ll = long long;

const int mod = 1000000007;

struct mint {
  ll x; // typedef long long ll;
  mint(ll x=0):x((x%mod+mod)%mod){}
  mint operator-() const { return mint(-x);}
  mint& operator+=(const mint a) {
    if ((x += a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator-=(const mint a) {
    if ((x += mod-a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator*=(const mint a) {
    (x *= a.x) %= mod;
    return *this;
  }
  mint operator+(const mint a) const {
    mint res(*this);
    return res+=a;
  }
  mint operator-(const mint a) const {
    mint res(*this);
    return res-=a;
  }
  mint operator*(const mint a) const {
    mint res(*this);
    return res*=a;
  }
  mint pow(ll t) const { 
    if (!t) return 1;
    mint a = pow(t>>1);
    a *= a;
    if (t&1) a *= *this;
    return a;
  }

  // for prime mod
  mint inv() const {
    return pow(mod-2);
  }
  mint& operator/=(const mint a) {
    return (*this) *= a.inv();
  }
  mint operator/(const mint a) const {
    mint res(*this);
    return res/=a;
  }
};


pair<ll, ll> rev(pair<ll, ll> a) {
	if (a.fi > 0) return make_pair(-a.se, a.fi);
	return make_pair(a.se, -a.fi);
}


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

	int zero_zero = 0, zero_no = 0, no_zero = 0;
	map<pair<ll, ll>, int> cnt;
	rep (i, n) {
		if (a[i] == 0 && b[i] == 0) zero_zero++;
		else if (a[i] == 0) zero_no++;
		else if (b[i] == 0) no_zero++;
		else {
			ll g = gcd(a[i], b[i]);
			a[i] /= g;
			b[i] /= g;
			if (b[i] < 0) a[i] *= -1, b[i] *= -1;
			cnt[{a[i], b[i]}]++;
		}
	}


	mint ans = mint(2).pow(no_zero) + mint(2).pow(zero_no) - 1;
	set<pair<ll, ll>> used;
	for (auto x: cnt) {
		if (used.count(x.fi)) continue;
		int p = x.se;
		int pp = cnt[rev(x.fi)];
		if (pp) ans *= mint(2).pow(p) + mint(2).pow(pp) - 1;
		else ans *= mint(2).pow(p);
		used.insert(rev(x.fi));
	}

	ans = (ans + zero_zero) % MOD;

	cout << ans.x - 1 << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:108:35: error: 'MOD' was not declared in this scope
  108 |         ans = (ans + zero_zero) % MOD;
      |                                   ^~~
Language: C++

#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <math.h>
#include <queue>
#include <set>
#include <map>
#include <stack>
#include <iomanip>
#include <numeric>
 
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
ll N;
map<P,P> AA;
ll ans=1;
ll gcd(ll a, ll b) {
  while(1) {
    if(a < b) swap(a, b);
    if(!b) break;
    a %= b;
  }
  return a;
}
ll M = 1000000007;
ll mpow(ll x, ll n){ //x^n(mod M) ←普通にpow(x,n)では溢れてしまうため，随時mod計算
    ll anss = 1;
    while(n != 0){
        if(n&1) anss = anss*x % M;
        x = x*x % M;
        n = n >> 1;
    }
    return anss;
}


int main(){
    cin >> N;
    ll zeros=0;
    for(int i=0;i<N;i++){
        ll A,B;
        cin >> A >> B;
        if(A==0&&B==0){
            zeros++;
            continue;
        }
        ll n = gcd(abs(A),abs(B));
        A = A/n;
        B = B/n;
            if(B<0){
                B = -B;
                A = -A;
            }else if(B==0){
                A = 1;
            }
            if(A==0){
                B = 1;
            }
            if(A>0){
                AA[P(A,B)].first += 1;
            }else{
                AA[P(B,-A)].second += 1;
            }
    }
    for(auto p:AA){
        ans = (ans * (mpow(2,AA[p.first].first) + mpow(2,AA[p.first].second) - 1)%M)%M;
    }
    ans = (ans + zeros -1)%M;
    cout << ans << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:70:25: error: expected '}' at end of input
   70 |     cout << ans << endl;
      |                         ^
a.cc:38:11: note: to match this '{'
   38 | int main(){
      |           ^
Language: C++

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

const int MOD = 1000000007;

vector<int> Power2;

void initPower2(int n){
    ll rtn=1;
    for(int i=0; i<=n; i++){
        Power2.push_back(rtn);//0乗は1
        rtn *= 2;
        rtn %= MOD;
    }
}

ll gcd(ll c, ll d){//c*d=0をもとから除外
    if(c<d)
        swap(c,d);
    while(c%d!=0){
        c %= d;
        swap(c,d);
    }
    return d;
}

//C_i = A_i/B_iが同じものは同一視
//
//C_i = 0/0 -> xyでカウント
//C_i = 1/0 -> xでカウント
//C_i = 0/1 -> yでカウント
//C_i > 0 ->seme
//C_i < 0 ->uke

int main(){
    
    ll n; cin >>n;
    initPower2(n);
    
    ll c,d;
    
    int xy0=0;
    
    map<pair<ll,ll>, pair<int, int>> yuri;
    
    for(int i=0; i<n; i++){
        cin >> c >> d;
        if(!c && !d){//(0,0)
            xy0++;
        }
        else if(!c){//(0,b)
            yuri[{0,1}].first++;
        }else if(!d){//(a,0)
            yuri[{0,1}].second++;
        }else if((c/abs(c))==(d/abs(d))){//傾き正
            
            ll g = gcd( abs(c), abs(d) );
            yuri[{abs(c)/g, abs(d)/g}].first++;
        }else{//傾き負
            
            ll g = gcd( abs(c), abs(d) );
            yuri[{abs(d)/g, abs(c)/g}].second++;
        }
    }
    
    int ans = 1;
    
    for( auto p : yuri){
        int yuriri = Power2((int)p.second.first)-1;
        yuriri += Power2((int)p.second.second);
        yuriri %= MOD;
        ans *= yuriri;
        ans %= MOD;
    }
    
    ans = (ans+MOD-xy0)%MOD;
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:70:28: error: no match for call to '(std::vector<int>) (int)'
   70 |         int yuriri = Power2((int)p.second.first)-1;
      |                      ~~~~~~^~~~~~~~~~~~~~~~~~~~~
a.cc:71:25: error: no match for call to '(std::vector<int>) (int)'
   71 |         yuriri += Power2((int)p.second.second);
      |                   ~~~~~~^~~~~~~~~~~~~~~~~~~~~~
Language: C++

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

const int MOD = 1000000007;

vector<ll> Power2;

void initPower2(int n){
    ll rtn=1;
    for(int i=0; i<=n; i++){
        Power2.push_back(rtn);//0乗は1
        rtn *= 2;
        rtn %= MOD;
    }
}

ll gcd(ll c, ll d){//c*d=0をもとから除外
    if(c<d)
        swap(c,d);
    while(c%d!=0){
        c %= d;
        swap(c,d);
    }
    return d;
}

//C_i = A_i/B_iが同じものは同一視
//
//C_i = 0/0 -> xyでカウント
//C_i = 1/0 -> xでカウント
//C_i = 0/1 -> yでカウント
//C_i > 0 ->seme
//C_i < 0 ->uke

int main(){
    
    ll n; cin >>n;
    initPower2(n);
    
    ll c,d;
    
    int xy0=0;
    
    map<pair<ll,ll>, pair<int, int>> yuri;
    
    for(int i=0; i<n; i++){
        cin >> c >> d;
        if(!c && !d){//(0,0)
            xy0++;
        }
        else if(!c){//(0,b)
            yuri[{0,1}].first++;
        }else if(!d){//(a,0)
            yuri[{0,1}].second++;
        }else if((c/abs(c))==(d/abs(d))){//傾き正
            
            ll g = gcd( abs(c), abs(d) );
            yuri[{abs(c)/g, abs(d)/g}].first++;
        }else{//傾き負
            
            ll g = gcd( abs(c), abs(d) );
            yuri[{abs(d)/g, abs(c)/g}].second++;
        }
    }
    
    int ans = 1;
    
    for( auto p : yuri){
        int yuriri = Power2((int)p.second.first)-1;
        yuriri += Power2((int)p.second.second);
        yuriri %= MOD;
        ans *= yuriri;
        ans %= MOD;
    }
    
    ans = (ans+MOD-xy0)%MOD;
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:70:28: error: no match for call to '(std::vector<long long int>) (int)'
   70 |         int yuriri = Power2((int)p.second.first)-1;
      |                      ~~~~~~^~~~~~~~~~~~~~~~~~~~~
a.cc:71:25: error: no match for call to '(std::vector<long long int>) (int)'
   71 |         yuriri += Power2((int)p.second.second);
      |                   ~~~~~~^~~~~~~~~~~~~~~~~~~~~~
Language: C++

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

const int MOD = 1000000007;

vector<ll> Power2;

void initPower2(int n){
    ll rtn=1;
    for(int i=0; i<=n; i++){
        Power2.push_back(rtn);//0乗は1
        rtn *= 2;
        rtn %= MOD;
    }
}

ll gcd(ll c, ll d){//c*d=0をもとから除外
    if(c<d)
        swap(c,d);
    while(c%d!=0){
        c %= d;
        swap(c,d);
    }
    return d;
}

//C_i = A_i/B_iが同じものは同一視
//
//C_i = 0/0 -> xyでカウント
//C_i = 1/0 -> xでカウント
//C_i = 0/1 -> yでカウント
//C_i > 0 ->seme
//C_i < 0 ->uke

int main(){
    
    ll n; cin >>n;
    initPower2(n);
    
    ll c,d;
    
    int xy0=0;
    ll x,y;
    
    map<pair<ll,ll>, pair<int, int>> yuri;
    
    for(int i=0; i<n; i++){
        cin >> c >> d;
        if(!c && !d){//(0,0)
            xy0++;
        }
        else if(!c){//(0,b)
            yuri[{0,1}].first++;
        }else if(!d){//(a,0)
            yuri[{0,1}].second++;
        }else if((c/abs(c))==(d/abs(d))){//傾き正
            
            ll g = gcd( abs(c), abs(d) );
            yuri[{abs(c)/g, abs(d)/g}].first++;
        }else{//傾き負
            
            ll g = gcd( abs(c), abs(d) );
            yuri[{abs(d)/g, abs(c)/g}].second++;
        }
    }
    
    int ans = 1;
    
    for( auto p : yuri){
        int yuriri = Power2(p.second.first)-1;
        yuriri += Power2(p.second.second);
        yuriri %= MOD;
        ans *= yuriri;
        ans %= MOD;
    }
    
    ans = (ans+MOD-xy0)%MOD;
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:71:28: error: no match for call to '(std::vector<long long int>) (int&)'
   71 |         int yuriri = Power2(p.second.first)-1;
      |                      ~~~~~~^~~~~~~~~~~~~~~~
a.cc:72:25: error: no match for call to '(std::vector<long long int>) (int&)'
   72 |         yuriri += Power2(p.second.second);
      |                   ~~~~~~^~~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#ifdef DEBUG
#define FPEN freopen("in.txt", "r", stdin);
#define FPEN2 freopen("out.txt", "w", stdout);
#else
#define FPEN
#define FPEN2
#endif
const int maxn = 200009;
typedef long long i64;
typedef pair<i64, i64> pi64;
typedef pair<int, int> pi;
const i64 MOD = 1e9 + 7;
class {
 public:
  i64 A[maxn], B[maxn];
  map<pair<i64, i64>, int> mp;
  i64 pw2[maxn];
  void solve() {
    int n;
    cin >> n;
    for (int i = 1; i <= n; ++i) cin >> A[i] >> B[i];
    pw2[0] = 1;
    for (int i = 1; i < maxn; ++i) pw2[i] = pw2[i - 1] * 2 % MOD;
    int A0 = 0, B0 = 0;
    i64 add = 0 for (int i = 1; i <= n; ++i) {
      if (A[i] == 0 && B[i] == 0) {
        add++;
        continue;
      }
      if (A[i] == 0)
        A0++;
      else if (B[i] == 0)
        B0++;
      else {
        int f = -1;
        if (A[i] > 0 && B[i] > 0)
          f = 1;
        else if (A[i] < 0 && B[i] < 0)
          f = 1;
        A[i] = abs(A[i]);
        B[i] = abs(B[i]);
        i64 gcd = __gcd(A[i], B[i]);
        A[i] /= gcd, B[i] /= gcd;
        mp[{A[i] * f, B[i]}]++;
      }
    }
    i64 ans = 1;
    for (auto i : mp) {
      if (i.second == 0) continue;
      pi64 j;
      if (i.first.first < 0)
        j = {i.first.second, -i.first.first};
      else
        j = {-i.first.second, i.first.first};
      // cout << i.first.first << " " << i.first.second << " " << j.first << " " << j.second << endl;
      if (mp.count(j)) {
        (ans *= (pw2[i.second] + pw2[mp[j]] + MOD - 1) % MOD) %= MOD;
        mp[j] = 0;
      } else {
        (ans *= pw2[i.second]) %= MOD;
      }
    }
    if (A0 == 0 && B0) {
      (ans *= pw2[B0]) %= MOD;
    } else if (A0 && !B0) {
      (ans *= pw2[A0]) %= MOD;
    } else if (A0 && B0) {
      (ans *= (pw2[A0] + pw2[B0] + MOD - 1) % MOD) %= MOD;
    }
    ans += add - 1;
    ans = (ans % MOD + MOD) % MOD;
    cout << ans << '\n';
  }
} NSPACE;
int main() {
  FPEN;
  FPEN2;
  ios_base::sync_with_stdio(false);
  cout.tie(0);
  cin.tie(0);
  NSPACE.solve();
}

Compiler output:
a.cc: In member function 'void<unnamed class>::solve()':
a.cc:27:17: error: expected ',' or ';' before 'for'
   27 |     i64 add = 0 for (int i = 1; i <= n; ++i) {
      |                 ^~~
a.cc:27:33: error: 'i' was not declared in this scope; did you mean 'pi'?
   27 |     i64 add = 0 for (int i = 1; i <= n; ++i) {
      |                                 ^
      |                                 pi
Language: C++

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

using ll = long long;
using ull = unsigned long long;
using st = string;
using ch = char;
using db = double;
using bl = bool;
using vll = vector<long long>;
using vdb = vector<db>;
using vst = vector<st>;
using vch = vector<char>;
using vbl = vector<bl>;
using vvll = vector<vll>;
using pll = pair<ll, ll>;
using vpll = vector<pll>;
using vvpll = vector<vpll>;
#define rep(i, m, n) for (ll i = (ll)(m); i < (ll)(n); i++)
#define vrep(i, vec) for(auto& i : vec)
#define vin(vec) for(auto& i : vec) cin >> i
#define all(v) v.begin(), v.end()
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;}
const ll mod = 1000000007;
const ll inf = 1LL << 60;
const db pi = acos(-1.0L);

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

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

int main(){
	ll n;
	cin >> n;
	ll all0 = 0;
	map<pll, ll> slope;
	rep(i, 0, n){
		ll a, b;
		cin >> a >> b;
		if(a == 0 && b == 0){
			all0++;
		}
		else if(a == 0) slope[make_pair(0, 1)]++;
		else if(b == 0) slope[make_pair(1, 0)]++;
		else if{
			ll aa = ((a > 0) - (a < 0)) * ((b > 0) - (b < 0)) * abs(a) / gcd(abs(a), abs(b));
			ll bb = abs(b) / gcd(abs(a), abs(b));
			slope[make_pair(aa, bb)]++;
		}
	}

	ll ans = 1;
	vrep(i, slope){
		ll a = i.first.first, b = i.first.second, kind1 = i.second, kind2 = 0;
		if(a == 0 && slope.count(make_pair(1, 0))){
			kind2 = slope[make_pair(1, 0)];
			slope.erase(make_pair(1, 0));
		}
		else if(b == 0 && slope.count(make_pair(0, 1))){
			kind2 = slope[make_pair(0, 1)];
			slope.erase(make_pair(0, 1));
		}
		else if (slope.count(make_pair(((a < 0) - (a > 0)) * b, abs(a)))){
			kind2 = slope[make_pair(((a < 0) - (a > 0)) * b, abs(a))];
			slope.erase(make_pair(((a < 0) - (a > 0)) * b, abs(a)));
		}
		ans = ans * (modpow(2, kind1) + modpow(2, kind2) - 1) % mod;
	}
	ans = ans + all0 - 1;
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:57:24: error: expected '(' before '{' token
   57 |                 else if{
      |                        ^
      |                        (
Language: C++

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

int main(){
  int n;
  cin>>n;
  map<int,int>x;
  for(int i=0;i<n;i++){
    double z,y;
    cin>>z>>y;
    x[i]=z/y;
  }
  int c=0;
  for(int j=0;j<n;j++){
    c+=x.count(x[j]*(-1));
  }
  int ans=(round(pow(2,n))-c*(round(pow(2,n-1))-1)-1)%(round(pow(10,9))+7);
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:54: error: invalid operands of types 'double' and 'double' to binary 'operator%'
   17 |   int ans=(round(pow(2,n))-c*(round(pow(2,n-1))-1)-1)%(round(pow(10,9))+7);
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
      |                                                   |                    |
      |                                                   double               double