Language: C++

#include <bits/stdc++.h>

using namespace std;

#define LL long long
#define reg register
#define Raed Read
#define rep(a,b,c) for(reg int a=(b),a##_end_=(c); a<=a##_end_; ++a)
#define drep(a,b,c) for(reg int a=(b),a##_end_=(c); a>=a##_end_; --a)

inline int Read() {
	int res = 0, f = 1;
	char c;
	while (c = getchar(), c < 48 || c > 57)if (c == '-')f = 0;
	do res = (res << 3) + (res << 1) + (c ^ 48);
	while (c = getchar(), c >= 48 && c <= 57);
	return f ? res : -res;
}

const int N=2e5+5,mod=998244353;

inline void Add(LL &x,int y) {
	x+=y;
	if(x<0)x+=mod;
	if(x>=mod)x-=mod;
}

struct point {
	int x,y;
} S[N];

inline bool cmp(point _,ponint __){
	return _.y<__.y;
}

struct cmpy {
	bool operator()(point _,point __)const {
		return _.y<__.y;
	}
};

int X[N];

struct BIT {
	int c[N];
	inline void clear(void) {
		memset(c,0,sizeof c);
	}
	inline void Add(int x) {
		for(; x<N; x+=x&-x)c[x]++;
	}
	inline int Sum(int x) {
		int res=0;
		for(; x; x^=x&-x)res+=c[x];
		return res;
	}
} tr;

int F2[N];

int main() {
	int n =Read();
	F2[0]=1;
	rep(i,1,n)F2[i]=(1ll*F2[i-1]<<1)%mod;
	rep(i,1,n) S[i].x=X[i]=Read(),S[i].y=Read();
	sort(X+1,X+n+1);
	rep(i,1,n)S[i].x=lower_bound(X+1,X+n+1,S[i].x)-X;
	LL Ans=1ll*n*(F2[n]-1)%mod;
	rep(i,1,n) {
		Add(Ans,-(F2[i]-2));
		Add(Ans,-(F2[n-i+1]-2));
	}
	sort(S+1,S+n+1,cmpy());
	rep(i,1,n) {
		Add(Ans,(F2[tr.Sum(S[i].x)]-1));
		Add(Ans,(F2[i-1-tr.Sum(S[i].x)]-1));
		tr.Add(S[i].x);
	}
	tr.clear();
	drep(i,n,1) {
		Add(Ans,(F2[tr.Sum(S[i].x)]-1));
		Add(Ans,(F2[n-i-tr.Sum(S[i].x)]-1));
		tr.Add(S[i].x);
	}
	printf("%lld\n",Ans);
	return 0;
}

Compiler output:
a.cc:32:25: error: 'ponint' has not been declared
   32 | inline bool cmp(point _,ponint __){
      |                         ^~~~~~
a.cc: In function 'bool cmp(point, int)':
a.cc:33:23: error: request for member 'y' in '__', which is of non-class type 'int'
   33 |         return _.y<__.y;
      |                       ^
a.cc: In function 'int main()':
a.cc:64:13: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   64 |         rep(i,1,n)F2[i]=(1ll*F2[i-1]<<1)%mod;
      |             ^
a.cc:8:32: note: in definition of macro 'rep'
    8 | #define rep(a,b,c) for(reg int a=(b),a##_end_=(c); a<=a##_end_; ++a)
      |                                ^
a.cc:64:13: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   64 |         rep(i,1,n)F2[i]=(1ll*F2[i-1]<<1)%mod;
      |             ^
a.cc:8:38: note: in definition of macro 'rep'
    8 | #define rep(a,b,c) for(reg int a=(b),a##_end_=(c); a<=a##_end_; ++a)
      |                                      ^
a.cc:65:13: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   65 |         rep(i,1,n) S[i].x=X[i]=Read(),S[i].y=Read();
      |             ^
a.cc:8:32: note: in definition of macro 'rep'
    8 | #define rep(a,b,c) for(reg int a=(b),a##_end_=(c); a<=a##_end_; ++a)
      |                                ^
a.cc:65:13: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   65 |         rep(i,1,n) S[i].x=X[i]=Read(),S[i].y=Read();
      |             ^
a.cc:8:38: note: in definition of macro 'rep'
    8 | #define rep(a,b,c) for(reg int a=(b),a##_end_=(c); a<=a##_end_; ++a)
      |                                      ^
a.cc:67:13: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   67 |         rep(i,1,n)S[i].x=lower_bound(X+1,X+n+1,S[i].x)-X;
      |             ^
a.cc:8:32: note: in definition of macro 'rep'
    8 | #define rep(a,b,c) for(reg int a=(b),a##_end_=(c); a<=a##_end_; ++a)
      |                                ^
a.cc:67:13: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   67 |         rep(i,1,n)S[i].x=lower_bound(X+1,X+n+1,S[i].x)-X;
      |             ^
a.cc:8:38: note: in definition of macro 'rep'
    8 | #define rep(a,b,c) for(reg int a=(b),a##_end_=(c); a<=a##_end_; ++a)
      |                                      ^
a.cc:69:13: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   69 |         rep(i,1,n) {
      |             ^
a.cc:8:32: note: in definition of macro 'rep'
    8 | #define rep(a,b,c) for(reg int a=(b),a##_end_=(c); a<=a##_end_; ++a)
      |                                ^
a.cc:69:13: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   69 |         rep(i,1,n) {
      |             ^
a.cc:8:38: note: in definition of macro 'rep'
    8 | #define rep(a,b,c) for(reg int a=(b),a##_end_=(c); a<=a##_end_; ++a)
      |                                      ^
a.cc:74:13: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   74 |         rep(i,1,n) {
      |             ^
a.cc:8:32: note: in definition of macro 'rep'
    8 | #define rep(a,b,c) for(reg int a=(b),a##_end_=(c); a<=a##_end_; ++a)
      |                                ^
a.cc:74:13: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   74 |         rep(i,1,n) {
      |             ^
a.cc:8:38: note: in definition of macro 'rep'
    8 | #define rep(a,b,c) for(reg int a=(b),a##_end_=(c); a<=a##_end_; ++a)
      |                                      ^
a.cc:80:14: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   80 |         drep(i,n,1) {
      |              ^
a.cc:9:33: note: in definition of macro 'drep'
    9 | #define drep(a,b,c) for(reg int a=(b),a##_end_=(c); a>=a##_end_; --a)
      |                                 ^
a.cc:80:14: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   80 |         drep(i,n,1) {
      |              ^
a.cc:9:39: note: in definition of macro 'drep'
    9 | #define drep(a,b,c) for(reg int a=(b),a##_end_=(c); a>=a##_end_; --a)
      |                                       ^