Language: C

#include<stdio.h>

#define rep(i,n) for(int i=0; i< (int)(n); i++)
#define re2(j,n) for(int j=0; j< (int)(n); j++)
#define max(x,y) x>y?x:y

int main() {
  int h,w,m;
  scanf("%d %d %d\n", h,w,m);
  int hw[h+1][w+1];
  rep(0,h+1)
    rep2(0,w+1)
      hw[i][j] = 0;

  int bh,bw;
  rep(0,m){
    scanf("%d %d\n", &bh,&bw);
    hw[bh][bw] = 1;  
  }

  int sumh;
  rep(0,h){
    rep2(0,w){
      if(hw[i][j] = 1){
        sumh += 1;
      }  
    }
    hw[i][w+1] = sumh;
  }

  int sumw;
  rep(0,w){
    rep2(0,h){
      if(hw[i][j] = 1){
        sumw += 1;
      }  
    }
    hw[h+1][j] = sumw;
  }

  int maxh = -1;
  int maxw = -1;
  
  rep(0,h){
    maxh = max(maxh,hw[i][w+1])
  }
  rep(0,w){
    maxw = max(maxh,hw[h+1][i])
  }

  int ans;
  rep(0,h){
    rep2(0,w){
      hw2[i][j] = (hw[bh][bw] == 1 ? -1 : 0);
      ans = hw[i][w+1] + hw[h+1][j];
    }
  }

  printf("%d\n", ans);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:7: error: expected identifier or '(' before numeric constant
   11 |   rep(0,h+1)
      |       ^
main.c:3:26: note: in definition of macro 'rep'
    3 | #define rep(i,n) for(int i=0; i< (int)(n); i++)
      |                          ^
main.c:3:45: error: lvalue required as increment operand
    3 | #define rep(i,n) for(int i=0; i< (int)(n); i++)
      |                                             ^~
main.c:11:3: note: in expansion of macro 'rep'
   11 |   rep(0,h+1)
      |   ^~~
main.c:12:5: error: implicit declaration of function 'rep2'; did you mean 'rep'? [-Wimplicit-function-declaration]
   12 |     rep2(0,w+1)
      |     ^~~~
      |     rep
main.c:12:16: error: expected ';' before 'hw'
   12 |     rep2(0,w+1)
      |                ^
      |                ;
   13 |       hw[i][j] = 0;
      |       ~~        
main.c:16:7: error: expected identifier or '(' before numeric constant
   16 |   rep(0,m){
      |       ^
main.c:3:26: note: in definition of macro 'rep'
    3 | #define rep(i,n) for(int i=0; i< (int)(n); i++)
      |                          ^
main.c:3:45: error: lvalue required as increment operand
    3 | #define rep(i,n) for(int i=0; i< (int)(n); i++)
      |                                             ^~
main.c:16:3: note: in expansion of macro 'rep'
   16 |   rep(0,m){
      |   ^~~
main.c:22:7: error: expected identifier or '(' before numeric constant
   22 |   rep(0,h){
      |       ^
main.c:3:26: note: in definition of macro 'rep'
    3 | #define rep(i,n) for(int i=0; i< (int)(n); i++)
      |                          ^
main.c:3:45: error: lvalue required as increment operand
    3 | #define rep(i,n) for(int i=0; i< (int)(n); i++)
      |                                             ^~
main.c:22:3: note: in expansion of macro 'rep'
   22 |   rep(0,h){
      |   ^~~
main.c:23:14: error: expected ';' before '{' token
   23 |     rep2(0,w){
      |              ^
      |              ;
main.c:32:7: error: expected identifier or '(' before numeric constant
   32 |   rep(0,w){
      |       ^
main.c:3:26: note: in definition of macro 'rep'
    3 | #define rep(i,n) for(int i=0; i< (int)(n); i++)
      |                          ^
main.c:3:45: error: lvalue required as increment operand
    3 | #define rep(i,n) for(int i=0; i< (int)(n); i++)
      |                                             ^~
main.c:32:3: note: in expansion of macro 'rep'
   32 |   rep(0,w){
      |   ^~~
main.c:33:14: error: expected ';' before '{' token
   33 |     rep2(0,h){
      |              ^
      |              ;
main.c:44:7: error: expected identifier or '(' before numeric constant
   44 |   rep(0,h){
      |       ^
main.c:3:26: note: in definition of macro 'rep'
    3 | #define rep(i,n) for(int i=0; i< (int)(n); i++)
      |                          ^
main.c:3:45: error: lvalue required as increment operand
    3 | #define rep(i,n) for(int i=0; i< (int)(n); i++)
      |                                             ^~
main.c:44:3: note: in expansion of macro 'rep'
   44 |   rep(0,h){
      |   ^~~
main.c:45:24: error: 'i' undeclared (first use in this function)
   45 |     maxh = max(maxh,hw[i][w+1])
      |                        ^
main.c:5:20: note: in definition of macro 'max'
    5 | #define max(x,y) x>y?x:y
      |                    ^
main.c:45:24: note: each undeclared identifier is reported only once for each function it appears in
   45 |     maxh = max(maxh,hw[i][w+1])
      |                        ^
main.c:5:20: note: in definition of macro 'max'
    5 | #define max(x,y) x>y?x:y
      |                    ^
main.c:46:3: error: expected ';' before '}' token
   46 |   }
      |   ^
main.c:47:7: error: expected identifier or '(' before numeric constant
   47 |   rep(0,w){
      |       ^
main.c:3:26: note: in definition of macro 'rep'
    3 | #define rep(i,n) for(int i=0; i< (int)(n); i++)
      |                          ^
main.c:3:45: error: lvalue required as increment operand
    3 | #define rep(i,n) for(int i=0; i< (int)(n); i++)
      |                                             ^~
main.c:47:3: note: in expansion of macro 'rep'
   47 |   rep(0,w){
      |   ^~~
main.c:49:3: error: expected ';' before '}' token
   49 |   }
      |   ^
main.c:52:7: error: expected identifier or '(' before numeric constant
   52 |   rep(0,h){
      |       ^
main.c:3:26: note: in definition of macro 'rep'
    3 | #define rep(i,n) for(int i=0; i< (int)(n); i++)
      |                          ^
main.c:3:45: error: lvalue required as increment operand
    3 | #define rep(i,n) for(int i=0; i< (int)(n); i++)
      |                                             ^~
main.c:52:3: note: in expansion of macro 'rep'
   52 |   rep(0,h){
      |   ^~~
main.c:53:14: error: expected ';' before '{' token
   53 |     rep2(0,w){
      |              ^
      |              ;