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

#include <iostream>
#include <vector>
#include <map>
#include <set>

#include <numeric>
#include <string>

using namespace std;

int MOD = 1000000007;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)

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

void yakubun(int64_t& a, int64_t& b)
{
	if (a == 0 ||b == 0)return;

	if (b < 0) {
		a *= -1;
		b *= -1;
	}

	int64_t m = gcd(a, b);
	a /= m;
	b /= m;
}

int main() {

	int N;

	cin >> N;
	int ans00 = 0;

	vector<int64_t> A;
	vector<int64_t> B;

	map<pair<int,int>, pair<int,int>> AB;
	set<pair<int, int>> key;


	rep(i, N)
	{
		int64_t a, b;
		cin >> a >> b;
		A.push_back(a);
		B.push_back(b);

		if (a == 0 && b == 0)
		{
			ans00++;
			continue;
		}

		if (b == 0) {
			a = 1;
			b = 0;
		}
		yakubun(a, b);

		int aj = b;
		int bj = abs(a);
		if (a > 0)aj *= -1;
		if (AB[{aj, bj}].first != 0)
		{
			AB[{aj, bj}].second++;
		}
		else {
			AB[{a, b}].first++;
			key.insert({ a, b });
		}
		

		
	}

	
	int64_t ans = 1;

	for (auto k : key) {
		cout << k.first << "," << k.second << ":" << AB[k].first << "," << AB[k].second << endl;

		/*
		ans += pow(2, AB[k].first);
		ans %= MOD;
		
		ans += pow(2, AB[k].second);
		ans %= MOD;
		ans--;
		*/

		int64_t tmp = ( (int)pow(2, AB[k].first) + (int)pow(2, AB[k].second) - 1) % MOD;

		cout << tmp << endl;
		ans *= tmp;
		ans %= MOD;

	}

	cout << ans+ans00-1;

	cin >> N;
	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:98:38: error: 'pow' was not declared in this scope
   98 |                 int64_t tmp = ( (int)pow(2, AB[k].first) + (int)pow(2, AB[k].second) - 1) % MOD;
      |                                      ^~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:30:28: error: lvalue required as left operand of assignment
   30 |         if (a[i] == a[i-1] && b[i] = b[i-1]) now++;
      |             ~~~~~~~~~~~~~~~^~~~~~~
Language: C++

//#define TIMER_
#include <bits/stdc++.h>
using namespace std;
#define rep(i,r) for(int i = 0; i < (r); i++)
#define pb push_back
#define ALL(a) a.begin(), a.end()
#define fastio ios::sync_with_stdio(0); cin.tie(0); cout.tie(0)
using ll = long long;
using ull = unsigned long long;
const long long mod = 1000000007;
long long pw[200200] = { 1 };

int main() {
  fastio;

	map<pair<ll, ll>, pair<int, int> > chk;

	for (int i = 1; i < 200200; i++) pw[i] = (pw[i - 1] * 2) % mod;

	ll z = mod - 1;
	int n; scanf ("%d", &n); 
  while (n--){
	  ll a, b; cin >> a >> b;
		if (a == 0 && b == 0){ z++; continue; }
    else if (a == 0) {
      chk[{0, 1}].first++;
    } 
    else if (b == 0) {
      chk[{0, 1}].second++;
    }
    else {
      ll g = __gcd(abs(a), abs(b));
      a /= g; b /= g;
      if (a * b > 0) {
        chk[{abs(a),abs(b)}].first++;
      } 
      else {
        chk[{abs(b), abs(a)}].second++;
      }
    }
	}

	ll r = 1;
	for (auto& p : chk) {
		r = r * (pw[p.second.first] + pw[p.second.second] - 1) % mod;
	}

	cout << (a + r) % mod << "\n";
  
  #ifdef TIMER_
    cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n";
  #endif
}


Compiler output:
a.cc: In function 'int main()':
a.cc:48:18: error: 'a' was not declared in this scope
   48 |         cout << (a + r) % mod << "\n";
      |                  ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
#define sz(x) (int)x.size()
#define D(x) cerr << #x << " = " << (x) << '\n'
using ll = long long;

const int mod = 1e9 + 7;

ll fast(ll b, ll e) {
	ll ans = 1;
	for(; e; b = b * b % mod, e /= 2) 
		if(e&1) ans = ans * b % mod;
	return ans;
}

int add(int x, int y) {
	return (x + y) % mod;
}

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0); cout.tie(0);
	int n, ans = 1;
	cin >> n;
	map<pair<int, int>, pair<int, int> > m;
	for(int i = 0; i < n; ++ i) {
		int a, b;
		cin >> a >> b;
		if(a == 0 && b == 0) ans ++;
		else 
			int g = __gcd(a, b);
			a /= g, b /= g;
			if(a > 0) m[{a, b}].first++;
			else m[{b, -a}].second++;
		}
	}
	for(auto e:m) {
		int x, y;
		tie(x, y) = e.second;
		ans = ans * add(fast(2, x), fast(2, y) - 1) % mod;
	}
	cout << (ans - 1 + mod) % mod << '\n';
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:30: error: 'g' was not declared in this scope
   33 |                         a /= g, b /= g;
      |                              ^
a.cc: At global scope:
a.cc:38:9: error: expected unqualified-id before 'for'
   38 |         for(auto e:m) {
      |         ^~~
a.cc:43:9: error: 'cout' does not name a type
   43 |         cout << (ans - 1 + mod) % mod << '\n';
      |         ^~~~
a.cc:44:1: error: expected declaration before '}' token
   44 | }
      | ^
Language: C++

/*COMPETITIVE PROGRAMMING C++ TEMPLATE */

#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <string>
#include <cmath>
#include <iostream>
#include <stack>
#include <queue>
#include <climits>
#include <iomanip>

#define all(x) x.begin(), x.end()
#define MOD 1000000007

const long double PI = 3.141592653589793236L;

typedef long long int ll;
typedef long double ld;

using namespace std;

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

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

        n = n >> 1;
    }

    return res;
}

void solve()
{
    int N;
    cin >> N;

    vector<pair<ll, ll>> A(N);
    map<pair<ll, ll>, int> mp;
    set<pair<ll, ll>> S;
    int zero_count = 0;

    for(int i = 0; i < N; i++)
    {
        ll a, b;
        cin >> a >> b;

        ll GCD = 1;
        if(a != 0 && b != 0)
            GCD = gcd(abs(a), abs(b));

        A[i].first = a / GCD;
        A[i].second = b / GCD;

        if(A[i].second < 0)
        {
            A[i].first *= -1;
            A[i].second *= -1;
        }
        if(A[i].first == 0 && A[i].second == 0)
        {
            zero_count++;
        }
        else if(A[i].second == 0)
        {
            A[i].first = 1;
        }
        else if(A[i].first == 0)
        {
            A[i].second = 1;
        }
        S.insert(A[i]);

        mp[A[i]]++;
    }
    
    ll ans = 1;
    vector<pair<ll, ll>> B;

    for(auto x : S)
    {
        B.push_back(x);
    }
    
    int M = B.size();
    set<pair<ll, ll>> S1;
    for(int i = 0; i < M; i++)
    {
        pair<ll, ll> bad = {(-1) * B[i].second, B[i].first};

        if(B[i].first == 0 && B[i].second == 0)
        {
            continue;
        }

        if(bad.second < 0)
        {
            bad.first *= -1;
            bad.second *= -1;
        }

        if(B[i].first == 0)
        {
            bad.first = 1;
            bad.second = 0;
        }
        else if(B[i].second == 0)
        {
            bad.first = 0;
            bad.second = 1;
        }

        if(S1.find(B[i]) != S1.end() && S1.find(bad) != S1.end())
        {
            continue;
        }

        ll n = mp[B[i]];
        ll m = mp[bad];

        ll x = 0;
        x += power(2, n);
        x %= MOD;

        x += power(2, m);
        x %= MOD;

        x--;

        ans *= x;
        ans %= MOD;

        S1.insert(B[i]);
        S1.insert(bad);
        
    }
    ans -= 1;
    asn %= MOD;
    ans += MOD;
    ans %= MOD;
    ans += zero_count;
    ans %= MOD;
    cout << ans << endl;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    int T = 1;
    //cin >> T;
    
    while (T--)
    {
        solve();
    }
    
    return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:161:5: error: 'asn' was not declared in this scope; did you mean 'ans'?
  161 |     asn %= MOD;
      |     ^~~
      |     ans
Language: C++

#include <iostream>
#include <algorithm>
#include <utility>
#include <map>
#include <vector>
using namespace std;
const long long p = 1000000007;
const int MAX = 200000;
long long pow2[MAX];

void prepare(){
    pow2[0] = 1;
    for(int i = 1; i < MAX; i++){
        pow2[i] = pow2[i-1]*2;
    }
}

pair<long long,long long> kbs(long long a, long long b){  //既約分数kbs
    long long g = abs(__gcd(a,b));
    if(a*b>= 0){
        return make_pair(abs(a)/g,abs(b)/g);
    }
    else{
        return make_pair(-abs(a)/g,abs(b)/g);
    }
}
long long sign(long long n){
    if(n > 0) return 1;
    return -1;
}

int main(){
    prepare();
    long long N;
    cin >> N;
    map<pair<long long,long long>,long long> num;
    map<pair<long long,long long>,int> used;
    vector<pair<long long,long long>> ABs;
    for(int i =0; i < N; i++){
        long long a,b;
        cin >> a >> b;
        if( a!= 0 || b!= 0){
            pair<long long,long long> p;
            p = kbs(a,b);
            num[p]++;
            ABs.push_back(p);
        }
    }
    if(ABs.size() == 0) cout << 0 << endl;
    long long ans = 1;
    for(auto p:ABs){
        if(used[p])continue;
        long long a = p.first;
        long long b = p.second;
        pair<long long,long long> q;
        if(a >= 0){
            q = make_pair(-b,a);
        }
        else q = make_pair(b, -a);
        used[p] = 1;
        used[q] = 1;
        ans *= pow2[num[p]] + pow2[num[q]] - 1;
        ans %= p;
    }
    ans--;
    cout << ans%p << endl;    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:63:13: error: no match for 'operator%=' (operand types are 'long long int' and 'std::pair<long long int, long long int>')
   63 |         ans %= p;
      |         ~~~~^~~~
Language: C++

#include <bits/stdc++.h>
#define ll long long
using namespace std;
const int mod=1e9+7;
map<pair<ll,ll>,int> mp;
int n,zero;
int quick_pow(int x,int y)
{
    int ans=1;
    while(y)
	{
        if(y & 1) ans=(ll)ans*x % mod;
        y>>=1;
        x=(ll)x*x%mod;
    }
    return ans;
}
int main()
{
    scanf("%d",&n);
    for(int i=1;i<=n;i++)
	{
		ll a,b;
		scanf("%lld%lld", &a,&b);
        ll d=__gcd(a, b);
        if(d==0) {zero++;continue;}
		a/=d,b/=d;
        if(a<0) a=-a,b=-b;
        mp[{a, b}]++;
    }
    ll ans=1;
    for(auto it : mp)
	{
        if(it.second==0) continue;
        ll a=it.first.first,b=it.first.second;
        ll d=quick_pow(2, mp[{a, b}]);
        b=-b;
        if(b<0) a=-a,b=-b;
        if(mp.count({b, a}))
		{
            d=(d+quick_pow(2,mp[{b, a}])-1)%mod;
            mp[{b,a}] = 0;
        }
        ans=ans*d%mod;
    }
    ans=(ans-1+zero+mod)%mod;
    printf("%lld\n",ans);
    return 0;
}
E.cpp

Compiler output:
a.cc:50:1: error: 'E' does not name a type
   50 | E.cpp
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
const int mod=1e9+7;
typedef long long ll;
typedef pair<ll,ll> pl;
map<pl,int> mp;
int n,zero;
int quickpow(int x, int y)
{
    int ans=1;
    while(y)
	{
        if(y&1) ans=(ll)ans*x%mod;
        y>>=1;
        x=(ll)x*x%mod;
    }
    return ans;
}
ll gcd(ll a,ll b) {return b?gcd(b,a%b):a;}
int main()
{
    scanf("%d",&n);
    for(int i=1;i<=n;i++)
	{
        ll a,b;
        scanf("%lld%lld",&a,&b);
        ll d=gcd(a, b);
        if(d==0) {zero++;continue;}
        a/=d,b/=d;
        if(a<0) a=-a,b=-b;
        mp[{a,b}]++;
    }
    ll ans=1;
	for(auto it:mp)
	{
		if(it.second==0) continue;
		ll a=it.first.first,b=*it.first.second;
		ll sum=quickpow(2,mp[{a,b}]);
        b=-b;
        if(b<0) a=-a, b=-b;
        if(mp.count({b,a})) {sum=(sum+quickpow(2,mp[{b,a}])-1)%mod;mp[{b,a}]=0;}
        ans=ans*sum%mod;
    }
	ans=(ans-1+zero+mod)%mod;
    printf("%lld\n", ans);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:39: error: invalid type argument of unary '*' (have 'long long int')
   37 |                 ll a=it.first.first,b=*it.first.second;
      |                                       ^~~~~~~~~~~~~~~~
Language: C++

/* #include <bits/stdc++.h> */
#include <vector>
#include <iostream>
#include <deque>
#include <unordered_map>
using namespace std;

#define rep(i, a, b) for (int i = a; i < (b); ++i)
#define trav(a, x) for (auto &a : x)
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
typedef long long ll;
typedef pair< int, int > pii;
typedef vector< int > vi;

//
struct pair_hash {
    template <class T1, class T2>
    std::size_t operator () (const std::pair<T1,T2> &p) const {
        auto h1 = std::hash<T1>{}(p.first);
        auto h2 = std::hash<T2>{}(p.second);

        // Mainly for demonstration purposes, i.e. works but is overly simple
        // In the real world, use sth. like boost.hash_combine
        return h1 ^ h2;  
    }
};
//

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

ll euclid(ll a, ll b, ll &x, ll &y) {
	if (b) { ll d = euclid(b, a % b, y, x);
		return y -= a/b * x, d; }
	return x = 1, y = 0, a;
}

const ll mod = 1000000007;
struct Mod {
	ll x;
	Mod(ll xx) : x(xx) {}
	Mod operator+(Mod b) { return Mod((x + b.x) % mod); }
	Mod operator-(Mod b) { return Mod((x - b.x + mod) % mod); }
	Mod operator*(Mod b) { return Mod((x * b.x) % mod); }
	Mod operator/(Mod b) { return *this * invert(b); }
	Mod invert(Mod a) {
		ll x, y, g = euclid(a.x, mod, x, y);
		assert(g == 1); return Mod((x + mod) % mod);
	}
	Mod operator^(ll e) {
		if (!e) return Mod(1);
		Mod r = *this ^ (e / 2); r = r * r;
		return e&1 ? *this * r : r;
	}
};

void solve() {
    int N; cin >> N;
    unordered_map<pair<ll, ll>, pair<int, int>, pair_hash> ok;
    for (int i = 0; i < N; i++) {
        ll A, B; cin >> A >> B;
        ll G = gcd(abs(A), abs(B));
        A /= G;
        B /= G;
        int nrots = 0;
        while (A < 0 || B < 0) {
            A *= -1;
            swap(A, B);
            nrots++;
        }
        pii curr = ok[{A, B}];
        if (nrots % 2) {
            curr.first++;
        } else {
            curr.second++;
        }
        ok[{A, B}] = curr;
    }
    Mod sol(1);
    for (pair<pair<ll, ll>, pair<int, int>> p : ok) {
        int x, y;
        tie(x, y) = p.second;
        Mod a = (Mod(2) ^ x) - 1;
        Mod b = (Mod(2) ^ y) - 1;
        sol = sol * (Mod(1) + a + b);
    }
    sol = sol - Mod(1);
    cout << sol.x << "\n";
}

int main() {
    cin.sync_with_stdio(0);
    cin.tie(0);
    cin.exceptions(cin.failbit);
    solve();
}


Compiler output:
a.cc: In member function 'Mod Mod::invert(Mod)':
a.cc:52:17: error: 'assert' was not declared in this scope
   52 |                 assert(g == 1); return Mod((x + mod) % mod);
      |                 ^~~~~~
a.cc:6:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>'
    5 | #include <unordered_map>
  +++ |+#include <cassert>
    6 | using namespace std;
Language: C++

// READ & UNDERSTAND
// ll, int overflow, array bounds, memset(0)
// special cases (n=1?), n+1 (1-index)
// do smth instead of nothing & stay organized
// WRITE STUFF DOWN

#include <bits/stdc++.h>

using namespace std;

#define fi first
#define se second
#define pb push_back
#define all(x) (x).begin(), (x).end() 
#define MOD 1000000007

typedef long long ll;
typedef pair <int, int> ii;
typedef pair <ll, ll> pll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef long double ld;

ll INF=LLONG_MAX;

int const mxn=2e5+5;
map<ld,ii>mp;

ll modpow(ll a, ll b) // put b = mod-2, calc for (x!)^(mod-2) % mod only, [use x^(mod-2) when x^-1] 
{
	ll r=1;
	while(b)
	{
		if(b&1)r=(r*a)%MOD;
		a=(a*a)%MOD;
		b>>=1;
	}
	return r;
}

void multi(ll &a, ll b){
	a%=MOD; b%=MOD; a*=b; a%=MOD; return;
}

int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0);
    //freopen("input.txt","r",stdin); freopen("output.txt","w",stdout);
	ll a,b,n; cin >> n;
	int zero = 0;
	for(int i=0; i<n; i++){
		cin >> a >> b;
		if(a==0&&b==0){
			zero++;
			continue;
		}
		if(a==0){
			mp[0].fi++;
			continue;
		}
		if(b==0){
			mp[0].se++;
			continue;
		}
		ll g = __gcd(a,b);
		a/=g; b/=g;
		ld now = ld(a)/b;
		mp[now].fi++;
		now = -1/now;
		mp[now].se++;
	}
	ll ans = 1LL;
	for(auto p:mp){
		if(p.fi>0)break;
		a = p.se.fi;
		b = p.se.se;
		ll now = 1LL;
		now += modpow(2,a)-1;
		now += modpow(2,b)-1;
		multi(ans,now);
	}
	ans -= 1;
	ans += zero;
	ans = (ans+MOD)%MOD
	cout << ans << endl;
}	


Compiler output:
a.cc: In function 'int main()':
a.cc:85:9: error: expected ';' before 'cout'
   85 |         cout << ans << endl;
      |         ^~~~
Language: C++

#ifdef MY_LOCAL
#define MY_MAIN(cls) class cls {public: int main();}; int cls::
#else
#define MY_MAIN(cls) int
#endif

#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

namespace {

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

ll modpow(ll base, ll exponent, ll mod)
{
	ll retval = 1;
	while (exponent > 0)
	{
		if (exponent % 2)
			retval = (retval * base) % mod;
		exponent /= 2;
		base = (base * base) % mod;
	}
	return retval;
}


MY_MAIN(sandbox) main()
{
	cin.tie(nullptr);
	ios::sync_with_stdio(false);

	ll modval = 1000000007;

	int n;
	cin >> n;
	map<pll, int> cnt;
	for (int i = 0; i < n; i++)
	{
		ll a, b;
		cin >> a >> b;
		if (a != 0 && b != 0)
		{
			if (a < 0)
			{
				a *= -1;
				b *= -1;
			}
			ll g = gcd(abs(a), abs(b));
			cnt[{a / g, b / g}]++;
		}
		else if (a == 0 && b == 0)
			cnt[{0, 0}]++;
		else if (a == 0)
			cnt[{0, 1}]++;
		else  // b == 0
			cnt[{1, 0}]++;
	}

	ll num00 = 1;
	if (cnt[{0, 0}] == 0)
		num00 = 0;
	else
		num00 = cnt[{0, 0}];
	cnt.erase(make_pair(0,0));

	ll num = 1;
	while (!cnt.empty())
	{
		auto this_item = *cnt.begin();
		cnt.erase(cnt.begin());
		pll this_pair = this_item.first;
		pll anti_pair = { this_pair.second, -this_pair.first };
		if (anti_pair.first < 0)
			anti_pair = { -this_pair.second, this_pair.first };
		else if (anti_pair.first == 0)
			anti_pair = { 0, 1 };
		if (cnt.find(anti_pair) == cnt.end())
			cnt[anti_pair] = 0;
		auto anti_item = cnt.find(anti_pair);

		num = num * (modpow(2, this_item.second, modval) - 1 + modpow(2, anti_item->second, modval) - 1 + 1) % modval;
		cnt.erase(anti_item);
	}
	ll retval = (num + modval - 1) % modval;
	cout << (retval + num00) % modval << "\n";
		
	return 0;
}

}

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<stdio.h>
#include<stdlib.h>
long gcd(long a,long b){return b?gcd(b,a%b):a;}
const long mod=1e9+7;
struct X{long A,B;int f;}A[2<<17];
long long O=mod-1;
int cmp(const void *a,const void *b){
    struct X *aa=(X *)a;
    struct X *bb=(X *)b;
    long dA=aa->A-bb->A,dB=aa->B-bb->B;
    return dA?dA<0?-1:1:dB?dB<0?-1:1:0;
};


int main()
{
    int N;long a,b;
    int sz=0;
    scanf("%d",&N);
    ////输入并实现a，b的标准化
    for(int i=0;i<N;i++){
        scanf("%ld %ld",&a,&b);
            int f=0;
        if(!a&&!b) O++;
        else{
              long g=gcd(a,b);
              a=a/g;b=b/g;
            if(a<0){
                a=-a;
                b=-b;
            }
            if(a==0){
                a=1;
                b=0;
                f=1;
            }
            else if(b<0){
                long t;
                t=a;
                a=-b;
                b=t;
                f=1;
            }
            A[sz].A=a;
            A[sz].B=b;
            A[sz].f=f;
            sz++;
        }
    }
    //实现排序
    qsort(A,sz,sizeof(struct X),cmp);
    //实现计算；
    long ans=1;
    for(int i=0;i<sz;){
        int c[2]={1,1};
        int j=i;
        while(i<sz&&A[i].A==A[j].A&&A[i].B==A[j].B){
            c[A[i].f]=c[A[i].f]*2%mod;
            i++;
        }
        ans=ans*(c[0]+c[1]-1)%mod;
    }
    printf("%d",(ans+O)%mod);
}

Compiler output:
main.c: In function 'cmp':
main.c:8:19: error: 'X' undeclared (first use in this function)
    8 |     struct X *aa=(X *)a;
      |                   ^
main.c:8:19: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:22: error: expected expression before ')' token
    8 |     struct X *aa=(X *)a;
      |                      ^
main.c:9:22: error: expected expression before ')' token
    9 |     struct X *bb=(X *)b;
      |                      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
typedef long long ll;
const ll Mod = 1000000007;
const int mxN = 2e5 + 5;
ll gcd(ll a, ll b) {
    return b ? gcd(b, a % b) : a;
}
ll power[mxN];
    power[0] = 1;
    for (int i = 1; i < mxN; i++) {
        power[i] = power[i - 1] * 2 % Mod;
    }
    int n;
    cin >> n;

    ll special = 0;
    map<pair<ll, ll>, pair<int, int>> mp;
    for (int i = 0; i < n; i++) {
        ll a, b;
        cin >> a >> b;
        if (a == 0LL && b == 0LL) {
            special++;
            continue;
        }
        if (make_pair(a, b) < make_pair(0LL, 0LL))
            a = -a, b = -b;
        ll g = gcd(abs(a), abs(b));
        a = a / g, b = b / g;
        if (b > 0)
            mp[{ a, b }].first++;
        else
            mp[{ -b, a }].second++;
    }

    ll ans = 1;
    for (auto& p : mp) {
        ans = ans * (power[p.second.first] + power[p.second.second] - 1) % Mod;
    }
    cout << (ans - 1LL + special) % Mod << '\n';
}

Compiler output:
a.cc:11:5: error: 'power' does not name a type
   11 |     power[0] = 1;
      |     ^~~~~
a.cc:12:5: error: expected unqualified-id before 'for'
   12 |     for (int i = 1; i < mxN; i++) {
      |     ^~~
a.cc:12:21: error: 'i' does not name a type
   12 |     for (int i = 1; i < mxN; i++) {
      |                     ^
a.cc:12:30: error: 'i' does not name a type
   12 |     for (int i = 1; i < mxN; i++) {
      |                              ^
a.cc:16:5: error: 'cin' does not name a type
   16 |     cin >> n;
      |     ^~~
a.cc:20:5: error: expected unqualified-id before 'for'
   20 |     for (int i = 0; i < n; i++) {
      |     ^~~
a.cc:20:21: error: 'i' does not name a type
   20 |     for (int i = 0; i < n; i++) {
      |                     ^
a.cc:20:28: error: 'i' does not name a type
   20 |     for (int i = 0; i < n; i++) {
      |                            ^
a.cc:38:5: error: expected unqualified-id before 'for'
   38 |     for (auto& p : mp) {
      |     ^~~
a.cc:41:5: error: 'cout' does not name a type
   41 |     cout << (ans - 1LL + special) % Mod << '\n';
      |     ^~~~
a.cc:42:1: error: expected declaration before '}' token
   42 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
typedef long long ll;
// const ll Mod = 1e9 + 7;
const ll Mod = 1000000007;
const int mxN = 2e5 + 5;
ll gcd(ll a, ll b) {
    return b ? gcd(b, a % b) : a;
}
ll power[mxN];
int main() {
    power[0] = 1;
    for (int i = 1; i < mxN; i++) {
        power[i] = power[i - 1] * 2 % Mod;
    }
    int n;
    cin >> n;
    ll special = 0;
    map<pair<ll, ll>, pair<int, int>> mp;
    for (int i = 0; i < n; i++) {
        ll a, b;
        cin >> a >> b;
        if (a == 0LL && b == 0LL) {
            special++;
            continue;
        }
        if (make_pair(a, b) < make_par(0ll, 0ll))
            a = -a, b = -b;
        ll g = gcd(abs(a), abs(b));
        a = a / g, b = b / g;
        if (b > 0)
            mp[{ a, b }].first++;
        else
            mp[{ -b, a }].second++;
    }

    ll ans = 1;
    for (auto& p : mp) {
        ans = ans * (power[p.second.first] + power[p.second.second] - 1) % Mod;
    }
    cout << (ll)(ans - 1LL + special) % Mod << '\n';
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:31: error: 'make_par' was not declared in this scope
   28 |         if (make_pair(a, b) < make_par(0ll, 0ll))
      |                               ^~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define MAXN 200005
#define ll long long
map<pair<ll,ll>,pair<ll,ll>>k;
const ll mod=1000000007;
ll qpow(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()
{
    int n;
    scanf("%d",&n);
    ll ans=mod-1;
    ll tmp=1;
    for(int i=1;i<=n;i++)
    {
        ll a,b;
        scanf("%lld%lld",&a,&b);
        if(a==0&&b==0)
        {
            zero_cnt[0]++;
            ans=(ans+1)%mod;
        }
        else
        {
            if(a<0){a=-a,b=-b;}
            ll g = __gcd(abs(a),abs(b));
            a/=g;b/=g;
            if(b>=0)
                k[{a,b}].first++;
            else
                k[{-b,a}].second++;
        }
    }
    for(auto it:k)
        tmp=tmp*((qpow(2,it.second.first)+qpow(2,it.second.second)-1)%mod)%mod;
    cout<<(ans+tmp)%mod<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:13: error: 'zero_cnt' was not declared in this scope
   30 |             zero_cnt[0]++;
      |             ^~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pi = pair<int, int>;
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 { return mint(*this) += a; }
    mint operator-(const mint a) const { return mint(*this) -= a; }
    mint operator*(const mint a) const { return mint(*this) *= 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 { return mint(*this) /= a; }
};
istream &operator>>(istream &is, const mint &a) { return is >> a.x; }
ostream &operator<<(ostream &os, const mint &a) { return os << a.x; }

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

int main()
{
    int n;
    cin >> n;
    ll x, y, zero = 0;
    map<pair<ll, ll>, pi> iwashi; //回転して一致したら同じパラメータを持つのでmap
    for (int i = 0; i < n; i++)
    {
        cin >> x >> y;
        if (x == 0 && y == 0) //例外処理、(0,0)はどのイワシとも仲が悪い
        {
            zero++;
            continue;
        }
        ll g = gcd(x, y);
        x /= g;
        y /= g; //互いに素にする
        if (y < 0)
            x = -x, y = -y; //第3,4象限は180°回転
        else if (y == 0 && x < 0)
            x = -x, y = -y;
        bool rot90 = (x <= 0); //第2象限なら-90°回転
        if (rot90)
        {
            ll tmp = x;
            x = y, y = -tmp;
        }
        if (rot90)
            iwashi[{x, y}].first++;
        else
            iwashi[{x, y}].second++;
    }

    mint ans = 1;
    for (auto p : iwashi)
    {
        int s = p.second.first;
        int t = p.second.second;
        mint now = 1; //誰も選ばない
        now += mint(2).pow(s) - 1;
        now += mint(2).pow(t) - 1;
        ans *= now;
    }
    ans--;
    ans += zero;
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:101:8: error: no 'operator--(int)' declared for postfix '--' [-fpermissive]
  101 |     ans--;
      |     ~~~^~
Language: C++

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

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

int main()
{
    int n;
    ll mod = 1000000007;
    cin >> n;
    ll x, y, zero = 0;
    map<pair<ll, ll>, pi> iwashi;
    for (int i = 0; i < n; i++)
    {
        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;
        else if (y == 0 && x < 0)
            x = -x, y = -y;
        bool rot90 = (x <= 0);
        if (rot90)
        {
            ll tmp = x;
            x = y, y = -tmp;
        }
        if (rot90)
            iwashi[{x, y}].first++;
        else
            iwashi[{x, y}].second++;
    }

    ll ans = 1;
    for (auto p : iwashi)
    {
        int s = p.second.first;
        int t = p.second.second;
        ll now = 1; //誰も選ばない
        now += pow(2, s) - 1;
        now += pow(2, t) - 1;
        pow %= mod;
        ans *= now;
        ans %= mod;
    }
    ans--;
    ans += zero;
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:56:16: error: overloaded function with no contextual type information
   56 |         pow %= mod;
      |                ^~~
Language: C++

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

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

int main()
{
    int n;
    ll mod = 1000000007;
    cin >> n;
    ll x, y, zero = 0;
    map<pair<ll, ll>, pi> iwashi;
    for (int i = 0; i < n; i++)
    {
        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;
        else if (y == 0 && x < 0)
            x = -x, y = -y;
        bool rot90 = (x <= 0);
        if (rot90)
        {
            ll tmp = x;
            x = y, y = -tmp;
        }
        if (rot90)
            iwashi[{x, y}].first++;
        else
            iwashi[{x, y}].second++;
    }

    ll ans = 1;
    for (auto p; : iwashi)
    {
        int s = p.second.first;
        int t = p.second.second;
        ll now = 1; //誰も選ばない
        now += pow(2, s) - 1;
        now += pow(2, t) - 1;
        pow %= mod;
        ans *= now;
        ans %= mod;
    }
    ans--;
    ans += zero;
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:49:10: error: declaration of 'auto p' has no initializer
   49 |     for (auto p; : iwashi)
      |          ^~~~
a.cc:49:18: warning: range-based 'for' loops with initializer only available with '-std=c++20' or '-std=gnu++20' [-Wc++20-extensions]
   49 |     for (auto p; : iwashi)
      |                  ^
a.cc:49:18: error: expected primary-expression before ':' token
a.cc:61:16: error: expected ')' before ';' token
   61 |     ans += zero;
      |                ^
      |                )
a.cc:49:9: note: to match this '('
   49 |     for (auto p; : iwashi)
      |         ^
Language: C

// c++ -std=c++17 -o main main.cpp -lm
#include <bits/stdc++.h>

#define rep(i,n) for(int i=0;i<(n);++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
	
// auto mod int
// https://youtu.be/L8grWxBlIZ4?t=9858
// https://youtu.be/ERZuLAxZffQ?t=4807 : optimize
// https://youtu.be/8uowVvQ_-Mo?t=1329 : division
const int mod = 1000000007;
//const int mod = 998244353;
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 { return mint(*this) += a;}
  mint operator-(const mint a) const { return mint(*this) -= a;}
  mint operator*(const mint a) const { return mint(*this) *= 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 { return mint(*this) /= a;}
};
istream& operator>>(istream& is, const mint& a) { return is >> a.x;}
ostream& operator<<(ostream& os, const mint& a) { return os << a.x;}

int main() {
	int n;
	cin >> n;
	int zero = 0;
	map<pair<ll, ll>, P> mp;
	rep(i,n) {
		ll x, y;
		cin >> x >> y;
		if (x == 0 && y == 0) {
			zero++;
			continue;
		}
		ll g = gcd(x,y); // gcc 17 kara
		x /= g;
		y /= g;
		if (y < 0) {
			x = -x;
			y = -y;
		}
		if (y == 0 && x < 0) {
			x = -x;
			y = -y;
		}
		bool rot90 = (x <= 0);
		if (rot90) {
			double temp = x;
			x = y;
			y = -temp;
		}
		// first: number for 2nd quadrant
		// second: number for 1st quadrant 
		if (rot90) mp[{x,y}].first++;
		else mp[{x,y}].second++;
	}
	mint ans = 1;
	for (auto p : mp) {
		int s = p.second.first;
		int t = p.second.second;
		mint now = 1;
		// count separately between s and t, 
		now += mint(2).pow(s) - 1;
		now += mint(2).pow(t) - 1;
		// here is multiplication because each sample
		// is able to choose freely.
		ans *= now;
	}
	
	ans -= 1;
	
	ans += zero;
	cout << ans << endl;
	return 0;
}


Compiler output:
main.c:2:10: fatal error: bits/stdc++.h: No such file or directory
    2 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
#define ll long long
#define pb push_back
#define mk make_pair
#define mod 1000000007
#define lb lower_bound
#define ub upper_bound
#define endl "\n"
#define ff first
#define ss second
#define prec(y,x) fixed<<setprecision(y)<<x
#define inf 1e18
#define pi 3.1415926535
typedef tree<ll, null_type, less<ll>, rb_tree_tag,                    //if  using ll change ll to ll
        tree_order_statistics_node_update> pbset;
#define fob(x) find_by_order(x)
ll po(ll x)
{
	ll ans = 1;
	for (int i = 1; i <= x; i++)
	{
		ans *= 2;
		ans %= mod;
	}
	ans--; ans += mod; ans %= mod;
	return ans;
}
int main()
{
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	ll n;
	cin >> n; ll 0 = 0;
	ll a[n + 1]; ll b[n + 1];
	map<pair<ll, ll>, ll> mp; mp[mk(0, 0)] = 0;
	for (ll i = 1; i <= n; i++)
	{
		cin >> a[i] >> b[i];
	}
	for (ll i = 1; i <= n; i++)
	{
		if (a[i] == 0 && b[i] == 0)
		{

			mp[mk(0, 0)]++;
			continue;
		}
		else if (a[i] == 0)
		{
			auto it = mp.find(mk(0, 1));
			if (it == mp.end())
				mp[mk(0, 1)] = 1;
			else
				mp[mk(0, 1)]++;
			continue;
		}
		else if (b[i] == 0)
		{
			auto it = mp.find(mk(1, 0));
			if (it == mp.end())
				mp[mk(1, 0)] = 1;
			else
				mp[mk(1, 0)]++;
			continue;
		}
		ll c = __gcd(abs(a[i]), abs(b[i]));
		a[i] /= c;
		b[i] /= c;
		int y1 = 1; int y2 = 1;
		if (a[i] < abs(a[i]))
			y1 = -1;
		if (b[i] < abs(b[i]))
			y2 = -1;
		if (y1 * y2 > 0)
		{
			a[i] = abs(a[i]);
			b[i] = abs(b[i]);
			auto it = mp.find(mk(a[i], b[i]));
			if (it == mp.end())
				mp[mk(a[i], b[i])] = 1;
			else
				mp[mk(a[i], b[i])]++;
		}
		else
		{
			a[i] = abs(a[i]); a[i] *= -1;
			b[i] = abs(b[i]);
			auto it = mp.find(mk(a[i], b[i]));
			if (it == mp.end())
				mp[mk(a[i], b[i])] = 1;
			else
				mp[mk(a[i], b[i])]++;
		}
	}
	ll ans = 1;
	auto it = mp.begin();
	for (; it != mp.end(); it++)
	{
		//cout << ans << "d ";
		ll cc = it->ss;
		ll aa = it->ff.ff;
		ll bb = it->ff.ss;
		if (aa == 0 && bb == 0)
			continue; //cout << cc << endl;
		if (cc == 0)
			continue;
		else
		{
			it->ss = 0;

			//cout << aa << " " << bb << " " << cc << endl;
			aa = abs(aa);
			bb = abs(bb);
			swap(aa, bb);
			if (it->ff.ff > 0)
				aa *= -1;
			auto itr = mp.find(mk(aa, bb));
			if (itr == mp.end())
			{
				ll ans1 = po(cc); ans1++;
				//cout << ans1 << endl;
				ans1 %= mod;
				ans *= ans1;
				ans %= mod;
			}
			else
			{

				ll g = itr->ss; itr->ss = 0;
				ll ans1 = po(cc) + po(g);
				ans1++;
				ans1 %= mod;
				ans *= ans1;
				ans %= mod;
			}

		}

	}
	//cout << ans << endl << mp[mk(0, 0)] << endl;
	ans += mp[mk(0, 0)];
	ans--;
	ans += mod;
	ans %= mod;
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:22: error: expected unqualified-id before numeric constant
   40 |         cin >> n; ll 0 = 0;
      |                      ^
Language: C++

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

using ll=long long;
using P=pair<ll,ll>;
#define mod 1000000007

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

ll modpow(ll n,ll m=mod-2){
  ll r=1;
  while(m) r=r*((m%2)?n:1)%mod,n=n*n%mod,m>>=1;
  return r;
}

int main(){

  int n;
  cin >> n;

  map<P,P> mp;
  long long zero=0;
  ll sum = 1;

  for(int i=0;i<n;i++){
    ll a,b;
    cin >> a >> b;
    if(a==0 && b==0) zero++;
    else if(a==0){
      mp[{1,0}].first++;
    }else if(b==0){
      mp[{1,0}].second++;
    }else{
      ll g = gcd(a, b);
      a=a/g;
      b=b/g;
      if(mp[{b,-a})].first>0) mp[{b,-a}].second++;
      else if({-b,a}].first>0) mp[{-b,a}].second++;
      else mp[{a,b}].first++;
    }
  }

  for(auto p:mp){
    ll s = p.second.first%mod;
    ll t = p.second.second%mod;
    ll now = 1;
    now += modpow(2,s)-1;
    now += modpow(2,t)-1;
    sum *= now;
    sum = sum%mod;
  }

  cout << (sum+zero-1+mod)%mod << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:19: error: expected ']' before ')' token
   42 |       if(mp[{b,-a})].first>0) mp[{b,-a}].second++;
      |                   ^
      |                   ]
a.cc:42:19: error: could not convert 'mp.std::map<std::pair<long long int, long long int>, std::pair<long long int, long long int> >::operator[](std::pair<long long int, long long int>(b, (- a)))' from 'std::map<std::pair<long long int, long long int>, std::pair<long long int, long long int> >::mapped_type' {aka 'std::pair<long long int, long long int>'} to 'bool'
   42 |       if(mp[{b,-a})].first>0) mp[{b,-a}].second++;
      |                   ^
      |                   |
      |                   std::map<std::pair<long long int, long long int>, std::pair<long long int, long long int> >::mapped_type {aka std::pair<long long int, long long int>}
a.cc:42:20: error: expected primary-expression before ']' token
   42 |       if(mp[{b,-a})].first>0) mp[{b,-a}].second++;
      |                    ^
a.cc:42:40: error: expected primary-expression before ']' token
   42 |       if(mp[{b,-a})].first>0) mp[{b,-a}].second++;
      |                                        ^
a.cc:43:7: error: 'else' without a previous 'if'
   43 |       else if({-b,a}].first>0) mp[{-b,a}].second++;
      |       ^~~~
a.cc:43:15: error: expected primary-expression before '{' token
   43 |       else if({-b,a}].first>0) mp[{-b,a}].second++;
      |               ^
a.cc:43:15: error: expected ')' before '{' token
   43 |       else if({-b,a}].first>0) mp[{-b,a}].second++;
      |              ~^
      |               )
a.cc:43:21: error: expected primary-expression before ']' token
   43 |       else if({-b,a}].first>0) mp[{-b,a}].second++;
      |                     ^
a.cc:43:41: error: expected primary-expression before ']' token
   43 |       else if({-b,a}].first>0) mp[{-b,a}].second++;
      |                                         ^
a.cc:44:7: error: 'else' without a previous 'if'
   44 |       else mp[{a,b}].first++;
      |       ^~~~
Language: C

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

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 { return mint(*this) += a;}
  mint operator-(const mint a) const { return mint(*this) -= a;}
  mint operator*(const mint a) const { return mint(*this) *= 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 { return mint(*this) /= a;}
};
istream& operator>>(istream& is, const mint& a) { return is >> a.x;}
ostream& operator<<(ostream& os, const mint& a) { return os << a.x;}

int main()
{
    int n;
    int zero = 0;
    map<pair<ll,ll>,P> mp;
    cin>>n;
    for(int i=0;i<n;i++)
    {
        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;
        if(y == 0 && x < 0)x = -x;
        bool rot90 = (x <= 90);
        if(rot90)
        {
            ll temp = x;
            x = y;y = -temp;
        }
        if(rot90)mp[{x,y}].first++;
        else mp[{x,y}].second++;
    }
    mint ans = 1;
    for(auto p : mp)
    {
        int s = p.second.first;
        int t = p.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<<endl;

    return 0;
}

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

#include <bits/stdc++.h>
#include <vector>
#include <iostream>
#include<algorithm>
#include<string>
#include <map>
#include <queue>
#include <stack>
#include<set>

#define DIV 1000000007

using namespace std;
using ll = long long;
using ldb = long double;

long long mypow(long long k, long long n) {
	long long temp = 1;

	k = k % DIV;
	while (n) {
		if (n % 2) temp = temp * k % DIV;
		k = k * k % DIV;
		n = n / 2;
	}
	return temp % DIV;
}

ll lcd(ll p, ll q) {
	ll upper, lower, r;

	if (p >= q) upper = p, lower = q;
	else upper = q, lower = p;
	r = upper % lower;
	if (r)return lcd(lower, r);
	else return lower;
}

int main() {
	ll N; cin >> N;
	map <pair<ll,ll> , ll > mp1, mp2;

	for (int i = 0; i < N; i++) {
		ll a, b; cin >> a >> b;
		if(a==0&&b==0) mp1
		ll G = lcd(abs(a), abs(b));
		mp1[make_pair(a / G, b / G)]++;
		mp2[make_pair(b / G, a / G)]++;
	}
	ll ng = 0;
	for (auto x : mp1) {
		ll u = (mypow(2, x.second) - 1 + DIV) % DIV;
		ll v = (mypow(2, mp2[make_pair(-x.first.first,x.first.second)]) - 1 + DIV) % DIV;
		v = +(mypow(2, mp2[make_pair(x.first.first, -x.first.second)]) - 1 + DIV) % DIV;
		v %= DIV;

		ng += (((u * v) % DIV) * (mypow(2, N - x.second - mp2[make_pair(-x.first.first, x.first.second)]- mp2[make_pair(x.first.first, -x.first.second)]))) % DIV;
		ng %= DIV;

		cout << "u=" << u << " v=" << v << " ng=" << ng << endl;
		//mp1[x.first] = 0, mp2[x.first] = 0;
	}
	cout << (mypow(2, N) - ng - 1 + DIV) % DIV << endl;
}


Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: Java

import java.util.*;
import java.io.PrintWriter;
public class Main{
	static long mod=1000000007;
	static HashMap<String,String> bbb=new HashMap<>();
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		HashMap<String,Integer> aumap=new HashMap<>();
		int zero=0;
		int az=0;
		int bz=0;
		for(int i=0; i<n; i++){
			long a=sc.nextLong();
			long b=sc.nextLong();
			if(a==0 && b==0){
				zero++;
			}else if(a==0){
				az++;
			}else if(b==0){
				bz++;
			}else{
				long c=0;
				//+
				if((a>0 && b>0) || (a<0 && b<0)){
					c=1;
				}
				a=Math.abs(a);
				b=Math.abs(b);
				long g=gcd(a,b);
				add(aumap,a,b,g,c);
			}
		}
		long ans=1;
		HashMap<String,Integer> eed=new HashMap<>();
		for(String i:aumap.keySet()){
			if(eed.containsKey(i)){
				continue;
			}
			int bum=((aumap.get(bbb.get(i))==null)?0:aumap.get(bbb.get(i)));
          if(bum!=0){
			ans=(ans*((pow(2,aumap.get(i))+pow(2,bum)-1)%mod))%mod;
          }else{
            ans=ans*pow(2,aumap.get(i))%mod
              eed.put(bbb.get(i),1);
          }
			
		}
		ans=(ans*((pow(2,az)+pow(2,bz)-1)%mod))%mod;
		System.out.println((ans+zero-1+mod)%mod);
	}
	static void add(HashMap<String,Integer> aumap,long a,long b,long g,long c){
		long[] t={a/g,b/g,c};
		String au=cov(t);
		if(!bbb.containsKey(au)){
			long[] bb={b/g,a/g,(c==0)?1:0};
			String bu=cov(bb);
			bbb.put(au,bu);
		}
		if(aumap.containsKey(au)){
			aumap.put(au,aumap.get(au)+1);
		}else{
			aumap.put(au,1);
		}
	}
	static String cov(long[] t){
		StringBuilder re=new StringBuilder();
		for(int i=0; i<t.length; i++){
			re.append(t[i]);
		}
		return re.toString();
	}
	static long pow(long p,long q){
		long res=1;
		while(q>0){
			if((q & 1)==1){
				res*=p;
				res%=mod;
			}
			q>>=1;
			p*=p;
			p%=mod;
		}
		return res;
	}
	private static long gcd(long m, long n) {
		return n == 0 ? m: gcd(n, m % n);
    
	}
}


Compiler output:
Main.java:44: error: ';' expected
            ans=ans*pow(2,aumap.get(i))%mod
                                           ^
1 error
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)n;i++)
#define rep1(i,n) for(int i=1;i<=(int)n;i++)
#define sp(n) cout << fixed << setprecision(n)
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; }
typedef long long ll;
using namespace std;
const ll mod=1e+7;
int main(void){
    int n;cin>>n;
    map<pair<ll,ll>,int> mp;
    int zero=0;
    rep(i,n){
        ll a,b;cin>>a>>b;
        if(a==0&&b==0){
            zero++;
            continue;
        }
        ll g=gcd(a,b);//片方が0だともう片方の絶対値が出てくる
        a/=g;b/=g;
        /*if(b<0||(b==0&&a<0)){
            b*=-1;a*=-1;//第3象限と第4象限の座標をそれぞれ第1象限と第2象限にまとめる
        }*/
        mp[{a,b}]++;
    }
    vector<ll> s(2*n+1,1);
    rep(i,n*2){
        s[i+1]=s[i]*2;
        s[i+1]%=mod;
    }
    
    ll res=1;
    for(auto& p:mp){
        ll a=p.first.first,b=p.first.second;
        int x=p.second;
        if(x==-1)continue;//すでにtで見られている
        x+=mp[{-a,-b}];
        int t=mp[{-b,a}]+mp[{b,-a}];
        ll tmp=1;
        tmp+=s[x]-1;tmp%=mod;
        tmp+=s[t]-1;tmp%=mod;
        res*=tmp;res%=mod;
        mp[{-b,a}]=-1;mp[{-a,-b}]=-1;mp[{a,b}]=-1;mp[{b,-a}]=-1;
        //cout<<a<<" "<<b<<" "<<x<<" "<<t<<" "<<res<<endl;
    }
    res+=zero;
    res=(res+mod-1)%mod;
    cout<

Compiler output:
a.cc: In function 'int main()':
a.cc:49:10: error: expected primary-expression at end of input
   49 |     cout<
      |          ^
a.cc:49:10: error: expected '}' at end of input
a.cc:10:15: note: to match this '{'
   10 | int main(void){
      |               ^