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

#include<cstdio>
#include<iostream>

using namespace std;

inline long long read() 
{
    long long x = 0, f = 1; char ch = getchar();
    while (ch < '0' || ch > '9') {if (ch == '-') f = -1; ch = getchar();}
    while (ch >= '0' && ch <= '9') {x = (x << 1) + (x << 3) + (ch ^ 48); ch = getchar();}
    return x * f;
}

inline void write(long long x)
{
    if(x<0){
    	putchar('-');
		x=-x;
	}
    if(x>9) 
		write(x/10);
    putchar(x%10+'0');
}


const int MAXN=1e5*2+5;
bool target[MAXN][MAXN];
long long sum1[MAXN],sum2[MAXN],ans=-0x3f3f3f3f;
//priority <pair<> >

int main()
{
	long long h=read(),w=read(),m=read();
	for (int i=1;i<=m;i++)
	{
		long long x=read(),y=read();
		target[x][y]=true;
		sum1[x]++;
		sum2[y]++;
		//tot[x][y]++;
	} 
//	for (int i=1;i<=h;i++)
//	{
//		for (int j=1;j<=w;j++)
//			printf("%d ",target[i][j]);
//		printf("\n");
//	}
	for (int j=1;j<=h;j++)
	{
		for (int k=1;k<=w;k++)
		{
			ans=max(ans,sum1[j]+sum2[k]);
		}
	}
	printf("%lld",ans);
}

Compiler output:
/tmp/cceVieQN.o: in function `main':
a.cc:(.text+0x6f): relocation truncated to fit: R_X86_64_PC32 against symbol `sum1' defined in .bss section in /tmp/cceVieQN.o
a.cc:(.text+0x8a): relocation truncated to fit: R_X86_64_PC32 against symbol `sum1' defined in .bss section in /tmp/cceVieQN.o
a.cc:(.text+0xa1): relocation truncated to fit: R_X86_64_PC32 against symbol `sum2' defined in .bss section in /tmp/cceVieQN.o
a.cc:(.text+0xbc): relocation truncated to fit: R_X86_64_PC32 against symbol `sum2' defined in .bss section in /tmp/cceVieQN.o
a.cc:(.text+0xf9): relocation truncated to fit: R_X86_64_PC32 against symbol `sum1' defined in .bss section in /tmp/cceVieQN.o
a.cc:(.text+0x111): relocation truncated to fit: R_X86_64_PC32 against symbol `sum2' defined in .bss section in /tmp/cceVieQN.o
collect2: error: ld returned 1 exit status
Language: C++

#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

int main(){
  ll H,W,M;
  ll i,k;
  ll h[333333],w[333333];
  cin >> H >> W >> M;
  ll yoko[333333] = {0};
  ll tate[333333] = {0};
  for(i=0;i<=M-1;i++){
    cin >> h[i] >> w[i];
    yoko[h[i]-1]++;
    tate[w[i]-1]++;
    }
  ll map[333333][333333] = {0};
  for(i=0;i<=M-1;i++)
    map[h[i]][w[i]] = 1;
  ll myoko = 0;
  ll mtate = 0;
  for(i=0;i<=H-1;i++)
    if(myoko < yoko[i]) myoko = yoko[i];
  for(i=0;i<=W-1;i++) 
    if(mtate < tate[i]) mtate = tate[i];
  cout << myoko + mtate　- 1 << endl;
}

Compiler output:
a.cc:28:19: error: extended character 　 is not valid in an identifier
   28 |   cout << myoko + mtate　- 1 << endl;
      |                   ^
a.cc: In function 'int main()':
a.cc:28:19: error: 'mtate\U00003000' was not declared in this scope; did you mean 'mtate'?
   28 |   cout << myoko + mtate　- 1 << endl;
      |                   ^~~~~~~
      |                   mtate
Language: Java

import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int h = scan.nextInt();
		int n = scan.nextInt();
		int m = scan.nextInt();
		boolean[][] tar = new boolean[h+1][n+1];
		for(boolean[] b : tar) Arrays.fill(b, false);
		for(int i = 0 ; i < m ; i++) {
			tar[scan.nextInt()][scan.nextInt()] = true;
		}
		scan.close();
		System.out.println(getValues(tar, h, n, m));
	}
	private static int getValues(boolean[][] tar, int h, int n, int m) {
		int[] rowCount = new int[h+1];
		int[] colCount = new int[n+1];
		for(int i = 1 ; i <= h ; i++) {
			for(int j = 1 ; j <= n ; j++) {
				if(tar[i][j]) {
					rowCount[i]++;
					colCount[j]++;
				}
			}
		}
		int rowMax = rowCount[1];
		int rowIndex = 1;
		int colMax = colCount[1];
		int colIndex = 1;
		for(int i = 2 ; i <= h ; i++) {
			if(rowCount[i] > rowMax) {
				rowMax = rowCount[i];
				rowIndex = i;
			}
		}
		for(int i = 2 ; i <= n ; i++) {
			if(colCount[i] > colMax) {
				colMax = colCount[i];
				colIndex = i;
			}
		}
		return tar[rowIndex][colIndex] ? rowCount[rowIndex]+colCount[colIndex]-1 : rowCount[rowIndex]+colCount[colIndex];
	}
}

Compiler output:
Main.java:9: error: cannot find symbol
		for(boolean[] b : tar) Arrays.fill(b, false);
		                       ^
  symbol:   variable Arrays
  location: class Main
1 error
Language: C

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

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);	cout.tie(NULL);
	ll h, w, m;	cin >> h >> w >> m;
	vector<ll> row(h);
	vector<ll> col(w);
	vector<vector<int> > a( h , vector<int> (w, 0));
	for (ll i = 0; i < m; i += 1) {
		ll x, y;	cin >> x >> y;
		row[x-1]++;
		col[y-1]++;
		a[x-1][y-1] = 1;
	}
	ll ans = 0;
	for (ll i = 0; i < h; i += 1) {
		for (ll j = 0; j < w; j += 1) {
			ll tmp = row[i]+col[j];
			if (a[i][j] == 1) 
				tmp -= 1;
			ans = max(ans, tmp);
		}
	}
	cout << ans << '\n';
	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<iostream>
using namespace std;
int main() {
    int a,b,c;
    cin>>a>>b>>c;
    int m[a][b]={0};
    for(int i=0;i<a;i++)    for(int j=0;j<b;j++)    m[i][j]=0;
    while(c--){
        int i,j;    cin>>i>>j;
        m[i-1][j-1]=1;
    }
    int mx=INT_MIN;
    for(int i=0;i<a;i++){
        for(int j=0;j<b;j++){
            int c=0;
            for(int l=0;l<a;l++)
            {    c+=m[l][j];}
            for(int l=0;l<b;l++) {   c+=m[i][l];}
            if(m[i][j]==1) c--;
            mx=max(c,mx);
        }
    }
    cout<<mx;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:12: error: 'INT_MIN' was not declared in this scope
   12 |     int mx=INT_MIN;
      |            ^~~~~~~
a.cc:2:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    1 | #include<iostream>
  +++ |+#include <climits>
    2 | using namespace std;
Language: C++

#include <vector> 
#include <iostream>
using namespace std;

const int MAXN = 3 * 1e5 + 5;
const int INF = 0x3f3f3f3f;

int n, m, num;
int hang[MAXN], lie[MAXN];

bool vis[MAXN][MAXN];

vector <int> heng, shu;

int Max (int x, int y) {return x > y ? x : y;}

int main () {
	cin >> n >> m >> num;
	for (int i = 1; i <= num; i++) {
		int x, y; cin >> x >> y;
		hang[x]++; lie[y]++; vis[x][y] = 1;
	}
	int _max1 = -INF, _max2 = -INF;
	for (int i = 1; i <= n; i++) {
		_max1 = Max (_max1, hang[i]);
	}
	for (int i = 1; i <= n; i++) {
		if (hang[i] == _max1) heng.push_back(i);
	}
	for (int i = 1; i <= m; i++) {
		if (lie[i] > _max2) _max2 = lie[i];
	}
	for (int i = 1; i <= m; i++) {
		if (_max2 == lie[i]) shu.push_back(i);
	}
	for (int i = 0; i < heng.size(); i++) {
		for (int j = 0; j < shu.size (); j++) {
			int index1 = heng[i], index2 = shu[j];
			int val = hang[index1] + lie[index2];
			if (vis[index1][index2] == 0) {
//				cout << "LJSNB" << endl;
				cout << index1 << " " << index2 << endl;
				cout << _max1 + _max2;
				return 0;
			}
		}
	}
//	cout << "LJSNB" << endl;
	cout << _max1 + _max2 - 1; 
	return 0;
}

Compiler output:
/tmp/ccq3rrgq.o: in function `main':
a.cc:(.text+0x1aa): relocation truncated to fit: R_X86_64_PC32 against symbol `heng' defined in .bss section in /tmp/ccq3rrgq.o
a.cc:(.text+0x249): relocation truncated to fit: R_X86_64_PC32 against symbol `shu' defined in .bss section in /tmp/ccq3rrgq.o
a.cc:(.text+0x28e): relocation truncated to fit: R_X86_64_PC32 against symbol `heng' defined in .bss section in /tmp/ccq3rrgq.o
a.cc:(.text+0x2aa): relocation truncated to fit: R_X86_64_PC32 against symbol `shu' defined in .bss section in /tmp/ccq3rrgq.o
a.cc:(.text+0x38f): relocation truncated to fit: R_X86_64_PC32 against symbol `shu' defined in .bss section in /tmp/ccq3rrgq.o
a.cc:(.text+0x3b6): relocation truncated to fit: R_X86_64_PC32 against symbol `heng' defined in .bss section in /tmp/ccq3rrgq.o
/tmp/ccq3rrgq.o: in function `__static_initialization_and_destruction_0()':
a.cc:(.text+0x3fe): relocation truncated to fit: R_X86_64_PC32 against symbol `heng' defined in .bss section in /tmp/ccq3rrgq.o
a.cc:(.text+0x417): relocation truncated to fit: R_X86_64_PC32 against symbol `heng' defined in .bss section in /tmp/ccq3rrgq.o
a.cc:(.text+0x430): relocation truncated to fit: R_X86_64_PC32 against symbol `shu' defined in .bss section in /tmp/ccq3rrgq.o
a.cc:(.text+0x449): relocation truncated to fit: R_X86_64_PC32 against symbol `shu' defined in .bss section in /tmp/ccq3rrgq.o
collect2: error: ld returned 1 exit status
Language: C++

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

void solve()
{
	int n, m, k;
	cin >> n >> m >> k;
	int r[n] = {0}, c[m] = {0};
	int ra[n] = {0}, ca[m] = {0};
	for(int i = 0; i < k; i++)
	{
		int x, y;
		cin >> x >> y;
		ra[x-1]=1;
		ca[y-1]=1;
		r[x-1]++;
		c[y-1]++;
	}
	int mas11 = 0, mas12 = 0;
	for(int i = 0; i < n; i++)
	{
		mas11 = max(mas11,r[i]);
	}
	for(int i = 0; i < m; i++)
	{
		mas12 = max(mas12,c[i]);
	}
	vector <int> v2, v1;
	for(int i = 0; i < n; i++)
	{
		if(mas11 == r[i])
		{
			v1.push_back(i);
		}
	}
	for(int i = 0; i < m; i++)
	{
		if(mas12 == c[i])
		{
			v2.push_back(i);
		}
	}
	int sum = 0;
  	
	for(int j = 0; j < v1.size(); j++)
	for(int i = 0; i < v2.size(); i++)
	{
		sum = max(sum,r[v1[j]]+c[v2[i]]-(ra[v1[j]]&ca[v2[i]]);
		if(!(ra[v1[j]]&ca[v2[i]])) goto aa;
	}
	aa:;
	cout << sum;
}

int main() 
{
	cin.sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
    int t = 1;
//    cin >> t;
    while(t--)
    {
    	solve();
	}
} 


Compiler output:
a.cc: In function 'void solve()':
a.cc:49:70: error: expected ')' before ';' token
   49 |                 sum = max(sum,r[v1[j]]+c[v2[i]]-(ra[v1[j]]&ca[v2[i]]);
      |                          ~                                           ^
      |                                                                      )
Language: C++

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

int main(){
    ll h,w,m; cin >> h >> w >> m;
    vector<vector<ll>> date(h+1,vector<ll>(w+1,0));
    map<ll,ll> H;
    map<ll,ll> W;
    set<ll> Hs;
    set<ll> Ws;
    for (ll i=0;i<m;i++){
        ll h,w; cin >> h >> w;
        date[h][w]=1;
        H[h]+=1;
        W[w]+=1;
        Hs.insert(h);
        Ws.insert(w);
    }
    ll maxh=0;
    ll maxw=0;
    vector<ll> ch;
    vector<ll> cw;
    for (auto i : Hs){
        if(maxh<H[i]){
            maxh=H[i];
            ch.clear();
            ch.push_back(i);
        }
        if (maxh==H[i]){
            ch.push_back(i);
        }
    }
    for (auto i : Ws){
        if(maxw<W[i]){
            maxw=W[i];
            cw.clear();
            cw.push_back(i);
        }
        if (maxw==W[i]){
            cw.push_back(i);
        }
    for (auto i : ch){
        for (auto j : cw){
            if (date[i][j]==0){
                cout << maxh+maxw << "\n";
                return 0;
            }
        }
    }
    cout << maxh+maxw-1 << "\n";
}





Compiler output:
a.cc: In function 'int main()':
a.cc:53:2: error: expected '}' at end of input
   53 | }
      |  ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
#define INF 2e9
#define MOD 1000000007
#define MOD9 998244353
#define intMAX 51000;
#define PI 3.14159265359
using namespace std;
typedef long long llong;
typedef long double ldouble;

using Graph = vector<vector<int>>;

int main(){
  int H, W, M;
  cin >> H >> W >> M;
  vector<vector<int>> exist(H, vector<int> (W, 0));
  vector<int> Hnum(H, 0);
  vector<int> Wnum(W, 0);
  // for(int l=0; l<M; ++l) {
  //   int h, w;
  //   cin >> h >> w;
  //   --h; --w;
  //   exist[h][w] = 1;
  //   ++Hnum[h]; ++Wnum[w];
  // }
  // vector<int> Hindex(H, 0);
  iota(Hindex.begin(), Hindex.end(), 0);
  sort(Hindex.begin(), Hindex.end(), [&](int x, int y){return Hnum[x] > Hnum[y];});
  vector<int> Windex(W, 0);
  iota(Windex.begin(), Windex.end(), 0);
  sort(Windex.begin(), Windex.end(), [&](int x, int y){return Wnum[x] > Wnum[y];});
  bool Hbool = true;
  bool Wbool = true;
  int Hmax = 0;
  int Wmax = 0;
  for(auto& hin:Hindex){
    if(Hbool){
      Hmax = Hnum[hin];
      Hbool = false;
    }
    if(Hnum[hin] != Hmax) break;
    else{
      for(auto& win:Windex){
        if(Wbool){
          Wmax = Wnum[win];
          Wbool = false;
        }
        if(Wnum[win] != Wmax) break;
        else{
          if(exist[hin][win] == 0){
            cout << Hmax + Wmax << endl;
            return 0;
          }
        }
      }
    }
  }
  cout << Hmax + Wmax - 1 << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:8: error: 'Hindex' was not declared in this scope; did you mean 'rindex'?
   27 |   iota(Hindex.begin(), Hindex.end(), 0);
      |        ^~~~~~
      |        rindex
Language: C++

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

int main(){
  int H, W, M;
  cin >> H >> W >> M;
  
  vector<pair<int,int>> b(M);
  for(int i=0;i<M;i++){
    cin >> b.at(i).first >> b.at(i).second;
  }
  
  int max=0
  for(int i=0;i<H;i++){
    for(int j=0;j<W;j++){
      int sum=0;
      for(int k=0;k<M;k++){
        if(((b.at(k).first) == i) || ((b.at(k).second) == j))
          sum++;
      }
      if(sum > max)
        max = sum;
    }
  }
  
  cout << max << endl;
}
      

Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: expected ',' or ';' before 'for'
   14 |   for(int i=0;i<H;i++){
      |   ^~~
a.cc:14:15: error: 'i' was not declared in this scope
   14 |   for(int i=0;i<H;i++){
      |               ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define int long long
#define mod 1000000007LL
#define all(x) x.begin() , x.end()
#define ld long double
void solve();
vector<vector<ll> >adjx, adjy;
int32_t main() {
	ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
	int t = 1; //cin >> t;
	while (t--)
		solve();
	return 0;
}
void solve()
{
	ll h, w, tp; cin >> h >> w >> tp;
	adjx.resize(h);
	map<ll , ll >m;
	for (int i = 0; i < tp; i++)
	{
		ll u, v; cin >> u >> v;
		u--, v--;
		adjx[u].push_back(v);
		m[v]++;
	}
	multiset<pair<ll , ll > >s;
	for (auto x : m)
	{
		s.insert({x.second , x.first});
	}
	ll res = 0;
	for (int i = 0; i < h; i++)
	{
		for (auto y : adjx[i])
		{
			s.erase(s.find({m[y] , y}));
			m[y]--;
			s.insert({m[y] , y});
		}
		if (!adjx[i].empty())res = max({res , s.rbegin()->first + adjx[i].size()});
		for (auto y : adjx[i])
		{
			s.erase(s.find({m[y] , y}));
			m[y]++;
			s.insert({m[y] , y});
		}
	}
	cout << res;
	cout << "\n";
	return ;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:43:47: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   43 |                 if (!adjx[i].empty())res = max({res , s.rbegin()->first + adjx[i].size()});
      |                                            ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   template argument deduction/substitution failed:
a.cc:43:47: note:   deduced conflicting types for parameter '_Tp' ('long long int' and 'long long unsigned int')
   43 |                 if (!adjx[i].empty())res = max({res , s.rbegin()->first + adjx[i].size()});
      |                                            ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   candidate expects 2 arguments, 1 provided
Language: C++

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

int main(){
    int h,w,m;cin>>h>>w>>m;
    int x[h][w];
    for(int i=0;i<h;i++){
        for(int j=0;j<w;j++)x[i][j]=0;
    }
    int a[m][2];
    for(int i=0;i<m;i++){
        for(int j=0;j<2;j++){
            cin>>a[i][j];
        }
        x[a[i][0]-1][a[i][1]-1]=1;
    }

    int L[h][w],R[h][w],U[h][w],D[h][w];

    for(int i=0;i<h;i++){
        if(x[i][0]==1)L[i][0]=1;
        else L[i][0]=0;
        if(x[i][w-1]==1)R[i][w-1]=1;
        else R[i][w-1]=0;
    }
    for(int i=0;i<w;i++){
        if(x[0][i]==1)U[0][i]=1;
        else U[0][i]=0;
        if(x[h-1][i]==1)D[h-1][i]=1;
        else D[h-1][i]=0;
    }
    for(int i=0;i<h;i++){
        for(int j=1;j<w;j++){
            if(x[i][j]==1)L[i][j]=L[i][j-1]+1;
            else L[i][j]=L[i][j-1];
        }
    }
    for(int i=1;i<h;i++){
        for(int j=0;j<w;j++){
            if(x[i][j]==1) U[i][j]=U[i-1][j]+1;
            else U[i][j]=U[i][j-1];
        }
    }
    for(int i=h-1;i>=0;i--){
        for(int j=w-2;j>=0;j--){
            if(x[i][j]==1) R[i][j]=R[i][j+1]+1;
            else R[i][j]=R[i][j+1];
        }
    }
    for(int i=h-2;i>=0;i--){
        for(int j=w-1;j>=0;j--){
            if(x[i][j]==1) D[i][j]=D[i+1][j]+1;
            else D[i][j]=D[i+1][j];
        }
    }
    int Max=0;
    for(int i=0;i<h;i++){
        for(int j=0;j<w;j++){
            if(x[i][j]==1)Max=max(Max,L[i][j]+R[i][j]+U[i][j]+D[i][j]-3);
           // else Max=max(Max,L[i][j]+R[i][j]+U[i][j]+D[i][j]);
        }
        
          //cout <<L[i][j]+R[i][j]+U[i][j]+D[i][j]<<endl;
    }
   cout <<Max<<endl;

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

#include <bits/stdc++.h>

using namespace std;

int main()
{
    int h,w,m;
    cin>>h>>w>>m;
    int grid[h][w] ={0};
     int row[h] = {0};
     int col[w] = {0};
    int x,y;
  int max1 =0,max2 =0;
  int falg = 1;
    for(int i=0;i<m;i++)
    {
      cin>>x>>y;
      grid[x-1][y-1] = 1;
      row[x-1]++;
      if(row[x-1]>max1)
         max1 = row[x-1];
       col[y-1]++;
      if(col[y-1]>max2)
         max2 = col[y-1];
    }
  int ans = max1+max2;
    for(int i=0;i<h;i++)
    {
        if(row[i] == max1)
        {
            for(int j=0;j<w;j++)
            {
                if(col[j] == max2 && grid[i][j] != 1)
                {
                   flag = 0;
                   break;
                }
            }
        }
      if(flag == 0)
         break;
    }
  cout<<ans-flag<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:20: error: 'flag' was not declared in this scope; did you mean 'falg'?
   35 |                    flag = 0;
      |                    ^~~~
      |                    falg
a.cc:40:10: error: 'flag' was not declared in this scope; did you mean 'falg'?
   40 |       if(flag == 0)
      |          ^~~~
      |          falg
a.cc:43:13: error: 'flag' was not declared in this scope; did you mean 'falg'?
   43 |   cout<<ans-flag<<endl;
      |             ^~~~
      |             falg
Language: C++

#include <bits/stdc++.h>
using namespace std;
#include <iostream>
#include <string.h>
long int main() 
{ 
     long int h,w,m;cin>>h>>w>>m;
     long int x[m+1]={0},y[m+1]={0};
         long int tempx,tempy;
     for(long int i=1;i<=m;i++)
         cin>>x[i]>>y[i];
     
     long int nx[m+1]={0},ny[m+1]={0};
     
     for(long int i=1;i<m+1;i++){
         nx[x[i]]+=1;
         ny[y[i]]+=1;
    }
    long int maxx=0,maxy=0,xx,yy;
     for(xx=1;xx<m+1;xx++)
        if(nx[xx]>maxx)maxx=nx[xx];

    for(yy=1;yy<m+1;yy++)
        if(ny[yy]>maxy)maxy=ny[yy];

    if(yy==xx)
    cout<<maxx+maxy-1;
    else  
    cout<<maxx+maxy;
        
   
        
}         

Compiler output:
a.cc:5:6: error: '::main' must return 'int'
    5 | long int main()
      |      ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
const int lim = 300001;
bool Check[lim][lim];
unordered_map<int,int> H,W;
int main(){
    cin.tie(0);
    ios_base::sync_with_stdio(false);
    int h,w,m;
    cin >> h >> w;
    cin >> m;
    for(int i=0;i<m;i++){
        int x,y;
        cin >> x >> y;
        Check[x][y]=true;
        if(H.count(x)==0){
            H[x]=1;
        }
        else{
            H[x]++;
        }
        if(W.count(y)==0){
            W[y]=1;
        }
        else{
            W[y]++;
        }
    }
    int nax=0;
    for(auto& x:H){
        int i=x.first;
        for(auto& y:W){
            int j=y.first;
            int val = x.second+y.second;
            //cout << i << " " << j << " " << val <<endl;
            if(Check[i][j]){
                val-=1;
            }
            nax = max(nax,val);
        }
    }
    cout << nax;
    return 0;
}


Compiler output:
/tmp/ccj62ymB.o: in function `main':
a.cc:(.text+0xc4): relocation truncated to fit: R_X86_64_PC32 against symbol `H' defined in .bss section in /tmp/ccj62ymB.o
a.cc:(.text+0xe4): relocation truncated to fit: R_X86_64_PC32 against symbol `H' defined in .bss section in /tmp/ccj62ymB.o
a.cc:(.text+0x102): relocation truncated to fit: R_X86_64_PC32 against symbol `H' defined in .bss section in /tmp/ccj62ymB.o
a.cc:(.text+0x11f): relocation truncated to fit: R_X86_64_PC32 against symbol `W' defined in .bss section in /tmp/ccj62ymB.o
a.cc:(.text+0x13f): relocation truncated to fit: R_X86_64_PC32 against symbol `W' defined in .bss section in /tmp/ccj62ymB.o
a.cc:(.text+0x15d): relocation truncated to fit: R_X86_64_PC32 against symbol `W' defined in .bss section in /tmp/ccj62ymB.o
a.cc:(.text+0x18a): relocation truncated to fit: R_X86_64_PC32 against symbol `H' defined in .bss section in /tmp/ccj62ymB.o
a.cc:(.text+0x1d3): relocation truncated to fit: R_X86_64_PC32 against symbol `W' defined in .bss section in /tmp/ccj62ymB.o
/tmp/ccj62ymB.o: in function `__static_initialization_and_destruction_0()':
a.cc:(.text+0x2e0): relocation truncated to fit: R_X86_64_PC32 against symbol `H' defined in .bss section in /tmp/ccj62ymB.o
a.cc:(.text+0x2f9): relocation truncated to fit: R_X86_64_PC32 against symbol `H' defined in .bss section in /tmp/ccj62ymB.o
a.cc:(.text+0x312): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization ("unroll-loops")
#include <iostream>
#include <fstream>
#include <algorithm>
#include <vector>
#include <set>
#include <stack>
#include <map>
#include <iomanip>
#include <cmath>
#include <queue>
#include <bitset>
#include <numeric>
#include <array>
#include <cstring>
#include <random>
#include <chrono>
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define make_unique(x) sort(all((x))); (x).resize(unique(all((x))) - (x).begin())
typedef long long ll;
typedef long double ld;
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int main() {

  ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

  int h = 0, w = 0, m = 0;

  cin >> h >> w >> m;

  vector<pair<int, int > > xt(h), yt(w);

  set<pair<int,int> > have;

  for(int i = 0; i < m; i++) {
    int x, y;
    cin >> x >> y;
    xt[--x].fi++;
    yt[--y].fi++;
    have.insert(mp(x, y));
  }

  int ans = 0;

  for(int i = 0; i < h; i++) xt[i].se = i;

  for(int i = 0; i < w; i++) yt[i].se = i;

  sort(raint(xt)); sort(raint(yt));

  for(int i = 0; i < min(h, 10int); i++)
    for(int j = 0; j < w; j++) {
      int cur = xt[i].fi + yt[j].fi - (have.count(mp(xt[i].se, yt[j].se)));
      ans = max(ans, cur);
    }

  for(int j = 0; j < min(w, 10int); j++)
    for(int i = 0; i < h; i++) {
      int cur = xt[i].fi + yt[j].fi - (have.count(mp(xt[i].se, yt[j].se)));
      ans = max(ans, cur);
    }


  cout << ans;

  return 0;
}
/*

*/


Compiler output:
a.cc: In function 'int main()':
a.cc:57:8: error: 'raint' was not declared in this scope; did you mean 'rint'?
   57 |   sort(raint(xt)); sort(raint(yt));
      |        ^~~~~
      |        rint
a.cc:59:29: error: unable to find numeric literal operator 'operator""int'
   59 |   for(int i = 0; i < min(h, 10int); i++)
      |                             ^~~~~
a.cc:65:29: error: unable to find numeric literal operator 'operator""int'
   65 |   for(int j = 0; j < min(w, 10int); j++)
      |                             ^~~~~
Language: C++

    #include <iostram>
    #include <algorithm>
    #include <set>
    #define rep(i,n) for (int i = 0; i< (n); i++)
    using ll = long long;
    using namespace std;
     
    int main(void){
    	int H, W, M;
    	cin >> H >> W >> M;
    	int r[H], c[W], b[H][W];
    	rep(i,H) r[i] = 0;
    	rep(i,W) c[i] = 0;
    	rep(i,H)rep(j,W) b[i][j] = 0;
     
    	set<int> h, w;
    	rep(i,M) {
    		int hh, ww;
    		cin >> hh >> ww;
    		hh--;
    		ww--;
    		h.insert(hh); 
    		w.insert(ww);
    		r[hh]++;
    		c[ww]++;
    		b[hh][ww] = 1;
    	}
    	int ans = 0;
    	for (int i : h) {
    		for (int j : w) {
    			int tmp = r[i] + c[j] - b[i][j];
    			ans = max(ans,tmp);
    		}
    	}
    	
    		cout << ans << endl;
    return 0;
    }

Compiler output:
a.cc:1:14: fatal error: iostram: No such file or directory
    1 |     #include <iostram>
      |              ^~~~~~~~~
compilation terminated.
Language: C++

    #include <iostream>
    #incluse <algorithm>
    #incluse <set>
    #define rep(i,n) for (int i = 0; i< (n); i++)
    using ll = long long;
    using namespace std;
     
    int main(void){
    	int H, W, M;
    	cin >> H >> W >> M;
    	int r[H], c[W], b[H][W];
    	rep(i,H) r[i] = 0;
    	rep(i,W) c[i] = 0;
    	rep(i,H)rep(j,W) b[i][j] = 0;
     
    	set<int> h, w;
    	rep(i,M) {
    		int hh, ww;
    		cin >> hh >> ww;
    		hh--;
    		ww--;
    		h.insert(hh); 
    		w.insert(ww);
    		r[hh]++;
    		c[ww]++;
    		b[hh][ww] = 1;
    	}
    	int ans = 0;
    	for (int i : h) {
    		for (int j : w) {
    			int tmp = r[i] + c[j] - b[i][j];
    			ans = max(ans,tmp);
    		}
    	}
    	
    		cout << ans << endl;
    return 0;
    }

Compiler output:
a.cc:2:6: error: invalid preprocessing directive #incluse; did you mean #include?
    2 |     #incluse <algorithm>
      |      ^~~~~~~
      |      include
a.cc:3:6: error: invalid preprocessing directive #incluse; did you mean #include?
    3 |     #incluse <set>
      |      ^~~~~~~
      |      include
a.cc: In function 'int main()':
a.cc:16:9: error: 'set' was not declared in this scope
   16 |         set<int> h, w;
      |         ^~~
a.cc:2:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>'
    1 |     #include <iostream>
  +++ |+#include <set>
    2 |     #incluse <algorithm>
a.cc:16:13: error: expected primary-expression before 'int'
   16 |         set<int> h, w;
      |             ^~~
a.cc:22:17: error: 'h' was not declared in this scope
   22 |                 h.insert(hh);
      |                 ^
a.cc:23:17: error: 'w' was not declared in this scope
   23 |                 w.insert(ww);
      |                 ^
a.cc:29:22: error: 'h' was not declared in this scope
   29 |         for (int i : h) {
      |                      ^
a.cc:30:30: error: 'w' was not declared in this scope
   30 |                 for (int j : w) {
      |                              ^
Language: C++

/*
	ID: Loxilante
	Time: 2020/
	Prog: 
	Lang: cpp
*/
#ifdef ONLINE_JUDGE
#pragma GCC optimize("O3")
#endif
#include <bits/extc++.h>
#define rep(i, l, r) for(int i = l; i < r; i++)
#define hrp(i, l, r) for(int i = l; i <= r; i++)
#define rev(i, r, l) for(int i = r; i >= l; i--)
#define ms(n, t) memset(n, t, sizeof(n))
#define pb push_back
#define int ll
#ifndef JOEON
#define D(...) 97
#endif
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
template<typename tn = int> inline tn next(void) { tn k; cin>>k; return k; }
const int U = 3e5+50;
int a[U], b[U];
vector<int> maxx;
set<pii> bombs;
signed main(void)
{
	clock_t Begin = clock();

	#ifdef JOEON
//		freopen("C:\\Users\\Joeon\\Desktop\\IN.txt", "r", stdin);
//		freopen("C:\\Users\\Joeon\\Desktop\\OUT.txt", "w", stdout);
	#endif
	
	ios::sync_with_stdio(false);
	cin.tie(0);
	
	int n, m, k, maxa = 0, maxb = 0, maxc = 0;
	cin>>n>>m>>k;
	
	clock_t InputFinished = clock();
	
	while(k--)
	{
		int x, y;
		cin>>x>>y;
		bombs.insert(pii(x, y));
		a[x]++;
		b[y]++;
		if (a[x] > maxa) maxa = a[x];
		if (b[y] > maxb) maxb = b[y];
	}

	maxc = maxa+maxb;

	if (bombs.lower_bound(pii(x, y)) != bombs.end()) maxc--;

	cout<<maxc<<endl;

	clock_t End = clock();
	
	D((double)(End-Begin)/CLOCKS_PER_SEC);
	D((double)(End-InputFinished)/CLOCKS_PER_SEC);
	
	return 0;
}
/*

 */

Compiler output:
a.cc: In function 'int main()':
a.cc:58:35: error: 'x' was not declared in this scope
   58 |         if (bombs.lower_bound(pii(x, y)) != bombs.end()) maxc--;
      |                                   ^
a.cc:58:38: error: 'y' was not declared in this scope
   58 |         if (bombs.lower_bound(pii(x, y)) != bombs.end()) maxc--;
      |                                      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int n;
int m;
int k;
int a,b;
int vis[300005][300005];
struct s1{
	int val;
	int bh;
}p[300005];
struct s2{
	int val;
	int bh;
}l[300005];
bool cmp(s1 x,s1 y)
{
	return x.val>y.val;
}
bool kmp(s2 x,s2 y)
{
	return x.val>y.val;
}
int main()
{
	scanf("%d %d %d",&n,&m,&k);
	for(int i=1;i<=k;i++)
	{
		scanf("%d %d",&a,&b);
		p[a].val++;
		l[b].val++;
		vis[a][b]=1;
	}
	for(int i=1;i<=n;i++)
	{
		p[i].bh=i;
	}
	for(int i=1;i<=m;i++)
	{
		l[i].bh=i;
	}
	sort(p+1,p+1+n,cmp);
	sort(l+1,l+1+n,kmp);
	if(vis[p[1].bh][l[1].bh])
	{
		printf("%d",p[1].val+l[1].val-1);
		return 0;
	}
	printf("%d",p[1].val+l[1].val);
}

Compiler output:
/tmp/ccCi6Iwt.o: in function `main':
a.cc:(.text+0xb4): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/ccCi6Iwt.o
a.cc:(.text+0xcb): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/ccCi6Iwt.o
a.cc:(.text+0xe6): relocation truncated to fit: R_X86_64_PC32 against symbol `l' defined in .bss section in /tmp/ccCi6Iwt.o
a.cc:(.text+0xfd): relocation truncated to fit: R_X86_64_PC32 against symbol `l' defined in .bss section in /tmp/ccCi6Iwt.o
a.cc:(.text+0x161): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/ccCi6Iwt.o
a.cc:(.text+0x193): relocation truncated to fit: R_X86_64_PC32 against symbol `l' defined in .bss section in /tmp/ccCi6Iwt.o
a.cc:(.text+0x1c3): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/ccCi6Iwt.o
a.cc:(.text+0x1ce): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/ccCi6Iwt.o
a.cc:(.text+0x1fb): relocation truncated to fit: R_X86_64_PC32 against symbol `l' defined in .bss section in /tmp/ccCi6Iwt.o
a.cc:(.text+0x206): relocation truncated to fit: R_X86_64_PC32 against symbol `l' defined in .bss section in /tmp/ccCi6Iwt.o
a.cc:(.text+0x21e): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: Java


// Submitted By Subhash Yadav
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;



import java.util.*;

public class Main {
	static class Pair{
		int a,b;
		Pair(int a,int b){
			this.a=a;
			this.b=b;
		}
		@Override
		public boolean equals(Object object)
		{
		    boolean isEqual= false;

		    if (object != null && object instanceof E)
		    {
		        isEqual = (this.a == ((Pair) object).a);
		    }

		    return isEqual;
		}
	}

	public static void main(String[] args) {
		FastScanner sc = new FastScanner();
		PrintWriter out = new PrintWriter(System.out);
		int h=sc.nextInt(),w=sc.nextInt(),m=sc.nextInt();
		ArrayList<Integer>[] set=new ArrayList[h+1];
		for(int i=0;i<=h;i++) set[i]=new ArrayList<>();
		int row[]=new int[h+1];
		int col[]=new int[w+1];
		for(int i=0;i<m;i++) {
			int x=sc.nextInt(),y=sc.nextInt();
			
			set[x].add(y);
			
			row[x]++;
			col[y]++;
			
		}
		
	
		
		long ans=Long.MIN_VALUE;
		for(int i=1;i<=h;i++) {
			for(int j=1;j<=w;j++) {
				long total=row[i]+col[j];
				
				
				
				if(set[i].contains(j)) {
					
					total--;
				}
				ans=Math.max(total, ans);
			}
		}
		System.out.println(ans);
		
		
		
		
		out.close();

	}

	static class FastScanner {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer("");

		String next() {
			while (!st.hasMoreTokens())
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		int[] readArray(int n) {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

		long nextLong() {
			return Long.parseLong(next());
		}
	}
}

Compiler output:
Main.java:28: error: cannot find symbol
		    if (object != null && object instanceof E)
		                                            ^
  symbol:   class E
  location: class Pair
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
Language: C++

#include<iostream>
using namespace std;
int main()
{
int a,b,c;
cin>>a>>b>>c;
if((a==2&&b==3&&c==3)||(a==3&&b==3&&c==4))
{
cout<<3;
return 0;
}
else cout<<6;
return 0
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: expected ';' before '}' token
   13 | return 0
      |         ^
      |         ;
   14 | }
      | ~
Language: C++

#include <iostram>
#incluse <algorithm>
#incluse <set>
#define rep(i,n) for (int i = 0; i< (n); i++)
using ll = long long;
using namespace std;

int main(void){
	int H, W, M;
	cin >> H >> W >> M;
	int r[H], c[W], b[H][W];
	rep(i,H) r[i] = 0;
	rep(i,W) c[i] = 0;
	rep(i,H)rep(j,W) b[i][j] = 0;

	set<int> h, w;
	rep(i,M) {
		int hh, ww;
		cin >> hh >> ww;
		hh--;
		ww--;
		h.insert(hh); 
		w.insert(ww);
		r[hh]++;
		c[ww]++;
		b[hh][ww] = 1;
	}
	int ans = 0;
	for (int i : h) {
		for (int j : w) {
			int tmp = r[i] + c[j] - b[i][j];
			ans = max(ans,tmp);
		}
	}
	
		cout << ans << endl;
return 0;
}


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

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

int main() {
    int h,w,m;
    cin >> h >> w >> m;
    vector<vector<int> >table(h,vector<int>(w,0));
    vector<int>column(h,0);
    vector<int>raw(w,0);
    for(int i=0;i<m;i++){
        int a,b;
        cin >> a >> b;
        table.at(a-1).at(b-1)=1;
        column.at(a-1)++;
        raw.at(b-1)++;
    }
    vector<int>columncopy(h,0);
    vector<int>rawcopy(w,0);
    for(int i=0;i<h;i++){
        columncopy.at(i)=column.at(i);
    }
    for(int i=0;i<w;i++){
        rawcopy.at(i)=raw.at(i);
    }
    sort(rawcopy.begin(),rawcopy.end());
    sort(columncopy.begin(),columncopy.end());
    int c,r;
    c = columncopy.at(h-1);
    r = rawcopy.at(w-1);
    cout <<　c+r-1 << endl;
}

Compiler output:
a.cc:30:12: error: extended character 　 is not valid in an identifier
   30 |     cout <<　c+r-1 << endl;
      |            ^
a.cc: In function 'int main()':
a.cc:30:12: error: '\U00003000c' was not declared in this scope
   30 |     cout <<　c+r-1 << endl;
      |            ^~~
Language: C++

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

static comp(const pair<int,int>& a, const pair<int,int>& b){
    if(a.first==b.first) return a.second<b.second;
    return a.first<b.first;
}
vector<pair<int,int>> v;

static comp2(const pair<int,int>& a, const pair<int,int>& b){
    if(a.second==b.second) return a.first<b.first;
    return a.second<b.second;
}
int main(){
    
    ios::sync_with_stdio(false);
    cin.tie(0);

    int h, w, m;
    cin >> h >> w >> m;

    int x, y;
    map<pair<int,int>,int> ma;
    for(int i=0; i<m; i++){
        cin >> x >> y;
        v.push_back({x,y});
        ma[{x,y}]++;
    }

    sort(v.begin(),v.end(),comp);

    vector<int> row(h+1), col(w+1);

    for(int i=1; i<=h; i++){
        int count = 0;
        for(int j=1; j<=w; j++){
            if(ma.find({i,j})!=ma.end()) count++;
        }
        row[i]=count;
    }

    sort(v.begin(),v.end(),comp2);

    for(int j=1; j<=w; j++){
        int count = 0;
        for(int i=1; i<=h; i++){
            if(ma.find({i,j})!=ma.end()) count++;
        }
        col[j]=count;
    }

    long long int ans = 0;
    for(int i=1; i<=h; i++){
        for(int j=1; j<=w; j++){
            long long int temp = row[i]+col[j];
            if(ma.find({i,j})!=ma.end()) temp--;
            ans = max(ans,temp);
        }
    }

    cout<<ans<<'\n';

    return 0;
}


Compiler output:
a.cc:5:8: error: ISO C++ forbids declaration of 'comp' with no type [-fpermissive]
    5 | static comp(const pair<int,int>& a, const pair<int,int>& b){
      |        ^~~~
a.cc:11:8: error: ISO C++ forbids declaration of 'comp2' with no type [-fpermissive]
   11 | static comp2(const pair<int,int>& a, const pair<int,int>& b){
      |        ^~~~~
Language: C++

// #pragma GCC optimize("Ofast")
// #pragma GCC target("avx,avx2,fma")
#include<bits/stdc++.h>
using namespace std;
#define fastIO ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
typedef long long int lli;
typedef long long int ll;
typedef long double ld;
typedef pair<ll, ll> pll;
typedef vector<pll> vop;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<int> vi;
typedef pair<int, int> pii;
#define REP(i,a,b) for( long long i=a;i<b;i++)
#define REPR(i,a,b) for(long long i=a;i>=b;i--)
#define adb(a) for(auto ii:a) cout << ii << " "; cout << endl
#define adp(a) for(auto ii:a) cout << ii.F << " " << ii.S << endl;
#define PB push_back
#define MP make_pair
#define F first
#define S second
#define all(x) (x).begin(),(x).end()
#define endl "\n"
#define mem(a,b) memset(a,b,sizeof(a))
#define mod 1000000007
#define PI 3.14159265358979323846
const ll MAXN = 100007;
const ll p = 1000000007;
#define N 200003
#define INF INTMAX_MAX

int main()
{


    fastIO;
    int test = 1;
    //cin >> test;
    while (test--)
    {
        ll n, m, q;
        cin >> n >> m >> q;
        vop a(q);
        REP(i, 0, q) cin >> a[i].F >> a[i].S;
        unordered_map<ll, ll>r, c;
        unordered_map<pll, ll, hash_pair>b;
        REP(i, 0, q)
        {
            //s.insert({a[i].F, a[i].S});
            r[a[i].F]++;
            c[a[i].S]++;
            b[a[i]]++;
        }
        ll ans = 0;
        for (auto it : r)
        {
            for (auto itt : c)
            {
                ll x = it.S + itt.S - b[ {it.F, itt.F}];
                ans = max(ans, x);
            }
        }
        cout << ans;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:47:32: error: 'hash_pair' was not declared in this scope
   47 |         unordered_map<pll, ll, hash_pair>b;
      |                                ^~~~~~~~~
a.cc:47:41: error: template argument 3 is invalid
   47 |         unordered_map<pll, ll, hash_pair>b;
      |                                         ^
a.cc:53:14: error: no match for 'operator[]' (operand types are 'int' and '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, long long int> >, std::pair<long long int, long long int> >::value_type' {aka 'std::pair<long long int, long long int>'})
   53 |             b[a[i]]++;
      |              ^
a.cc:60:40: error: invalid types 'int[<brace-enclosed initializer list>]' for array subscript
   60 |                 ll x = it.S + itt.S - b[ {it.F, itt.F}];
      |                                        ^
Language: C++

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

int main() {
  int  H, W, M;
  cin >> H >> W >> M;
  vector<int> h(M);
  vector<int> w(M);
  
  for (int i = 0; i < M; i++){
    cin >> h.at(i) >> w.at(i);
  }
  
  int h_now, h_max, count, count_max_h;
  count_max_h = 0;
  
  for (int i = 0; i < M; i++){
    h_now = h.at(i);
    count = 0;
    for (int i = 0; i < M; i++){
      if (h_now == h.at(i)){
        count++;
      }
    }
    
    if (count > count_max){
      count_max_h = count;
    }
  }
  
  int w_now, w_max, count_max_w;
  count_max_w = 0;
  
  for (int i = 0; i < M; i++){
    w_now = w.at(i);
    count = 0;
    for (int i = 0; i < M; i++){
      if (w_now == w.at(i)){
        count++;
      }
    }
    
    if (count > count_max_w){
      count_max_w = count;
    }
  }
  
  cout << count_max_h + count_max_w << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:17: error: 'count_max' was not declared in this scope; did you mean 'count_max_h'?
   26 |     if (count > count_max){
      |                 ^~~~~~~~~
      |                 count_max_h
Language: C++

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

int main() {
  int  H, W, M;
  cin >> H >> W >> M;
  vector<int> h(M);
  vector<int> w(M);
  
  for (int i = 0; i < M; i++){
    cin >> h.at(i) >> w.at(i)
  }
  
  int h_now, h_max, count, count_max_h;
  count_max_h = 0;
  
  for (int i = 0; i < M; i++){
    h_now = h.at(i);
    count = 0;
    for (int i = 0; i < M; i++){
      if (h_now == h.at(i)){
        count++;
      }
    }
    
    if (count > count_max){
      count_max_h = count;
    }
  }
  
  int w_now, w_max, count_max_w;
  count_max_w = 0;
  
  for (int i = 0; i < M; i++){
    w_now = w.at(i);
    count = 0;
    for (int i = 0; i < M; i++){
      if (w_now == w.at(i)){
        count++;
      }
    }
    
    if (count > count_max_w){
      count_max_w = count;
    }
  }
  
  cout << count_max_h + count_max_w << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:30: error: expected ';' before '}' token
   11 |     cin >> h.at(i) >> w.at(i)
      |                              ^
      |                              ;
   12 |   }
      |   ~                           
a.cc:26:17: error: 'count_max' was not declared in this scope; did you mean 'count_max_h'?
   26 |     if (count > count_max){
      |                 ^~~~~~~~~
      |                 count_max_h
Language: C++

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

int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0), cout.tie(0);
	
	int h, w, m;
	cin >> h >> w >> m;
	map<pair<int, int>, bool> z;
	vector<pair<int, int>> a(h), b(w);
	for (int i = 0; i < h; i++) a[i] = {0, i};
	for (int i = 0; i < w; i++) b[i] = {0, i};
	for (int i = 0; i < m; i++) {
		int x, y;
		cin >> x >> y;
		x--, y--;
		z[{x, y}] = 1;
		a[x].first++, b[y].first++;
	}
	
	sort(b.rbegin(), b.rend());
	while (b.back().first < b[0].first) b.pop_back();
	sort(a.rbegin(), a.rend());
	while (a.back().first < a[0].first) a.pop_back();
	long long x = a.size, y = b.size();
	if (x*y > m) cout << a[0].first + b[0].first;
	else {
		for (int i = 0; i < x; i++) {
			for (int j = 0; j < y; j++) {
				if (!z[{a[i].second, b[j].second}]) {
					cout << a[0].first + b[0].first;
					return 0;
				}
			}
		}
		cout << a[0].first + b[0].first - 1;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:25: error: cannot convert 'std::vector<std::pair<int, int> >::size' from type 'std::vector<std::pair<int, int> >::size_type (std::vector<std::pair<int, int> >::)() const noexcept' {aka 'long unsigned int (std::vector<std::pair<int, int> >::)() const noexcept'} to type 'long long int'
   27 |         long long x = a.size, y = b.size();
      |                         ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int H,W,M;
  int a,b,ctr,max;
  max=0;
  for(int i=0;i<M;i++){
    cin >> a >> b;
      for(int j=0;i<H;i++){
        for(int k=0;j<W;j++){
          ctr=0;
          if(i+1=a && j=b){
            ctr++;
          }
          else if(i-1=a && j=b){
            ctr++;
          }
          else if(i=a && j+1=b){
            ctr++;
          }
          else if(i=a && j-1=b){
            ctr++;
          }
          if(ctr>max){
            max=ctr;
          }
        }
      }
  }
  cout << max << endl;
}
          

Compiler output:
a.cc: In function 'int main()':
a.cc:12:20: error: lvalue required as left operand of assignment
   12 |           if(i+1=a && j=b){
      |                  ~~^~~~
a.cc:15:25: error: lvalue required as left operand of assignment
   15 |           else if(i-1=a && j=b){
      |                       ~~^~~~
a.cc:18:23: error: lvalue required as left operand of assignment
   18 |           else if(i=a && j+1=b){
      |                     ~~^~~~~~
a.cc:21:23: error: lvalue required as left operand of assignment
   21 |           else if(i=a && j-1=b){
      |                     ~~^~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <map>
#include <unordered_map>
#include <set>
#include <string>
#include <algorithm>
#include <iomanip>
#include <cmath>
#include <cstring>
#include <tuple>

int main()
{
	int H, W, M;
	std::cin >> H >> W >> M;
	std::vector<int> h(M);
	std::vector<int> w(M);
	std::vector<int> hCount(H, 0);
	std::vector<int> wCount(W, 0);
	for (int i = 0; i < M; ++i) {
		std::cin >> h[i] >> w[i];
		hCount[h[i] - 1] += 1;
		wCount[w[i] - 1] += 1;
	}

	int maxh = 0;
	int maxhCount = 0;
	{
		for (int h = 1; h <= H; ++h) {
			if (hCount[h - 1] > maxhCount) {
				maxhCount = hCount[h - 1];
				maxh = h;
			}
		}
	}

	for (int i = 0; i < M; ++i) {
		if (h[i] == maxh) {
			wCount[w[i] - 1] -= 1;
		}
	}

	int maxwCount = 0;
	{
		int maxw = 0;
		for (int w = 1; w <= W; ++w) {
			if (wCount[w - 1] > maxwCount) {
				maxwCount = wCount[w - 1];
				maxw = w;
			}
		}
	}

	int count = 0;
	for (int i = 0; i < M; ++i) {
		if (h[i] == maxh || w[i] == maxw) {
			++count;
		}
	}

	std::cout << count << std::endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:57:45: error: 'maxw' was not declared in this scope; did you mean 'maxh'?
   57 |                 if (h[i] == maxh || w[i] == maxw) {
      |                                             ^~~~
      |                                             maxh
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int H,W,M;
  int a,b,ctr,max;
  max=0;
  for(int i=0;i<M;i++){
    cin >> a >> b;
      for(i=0;i<H;i++){
        for(j=0;j<W;j++){
          ctr=0;
          if(i+1=a && j=b){
            ctr++;
          }
          else if(i-1=a && j=b){
            ctr++;
          }
          else if(i=a && j+1=b){
            ctr++;
          }
          else if(i=a && j-1=b){
            ctr++;
          }
          if(ctr>max){
            max=ctr;
          }
        }
      }
  }
  cout << max << endl;
}
          

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: 'j' was not declared in this scope
   10 |         for(j=0;j<W;j++){
      |             ^