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

#include <iostream>
#include <vector>
#include <algorithm>
#include <string>

using namespace std;

int L,H;
string strs[1001];
int hits[1001];
int blows[1001];
int nums[1001];
bool isSelected[1001];

// numsÌgÆtgtðär
bool check(string &tgt,int hit,int blow){
    int h=0;
    int b=0;
    for(int i=0;i<tgt.size();i++){
        if(tgt[i]==nums[i]+'0'){
            h++;
        }
        else{
            if(isSelected[tgt[i]-'0'])b++;
        }
    }
    return (h==hit)&&(b==blow);
}

int main(){

    while(cin>>L>>H&&(L|H)){
        memset(isSelected,0,sizeof(isSelected));
        int cnt=0;
        string obj;
        for(int i=0;i<H;i++)
            cin>>strs[i]>>hits[i]>>blows[i];
        for(int s=0;s<(1<<10);s++){
            int a=0;
            for(int i=0;i<10;i++){
                if((s>>i)&1){
                    isSelected[i]=true;
                    nums[a++]=i;
                }
                else isSelected[i]=false;
            }
            if(a!=L)continue;
            // ÔðüêÖ¦ÂÂ·×Ä·
            do{
                bool ok=true;
                for(int i=0;i<H;i++){
                    if(!check(strs[i],hits[i],blows[i])){
                        ok=false;
                        break;
                    }
                }
                // ·×ÄÌÉÎµÄÃÈçÎ
                if(ok){
                    cnt++;
                    if(cnt>=2)break;
                    for(int i=0;i<L;i++)
                        obj+=(nums[i]+'0');
                }
            }while(next_permutation(nums,nums+L));
            if(cnt>=2)break;
        }
        if(cnt==1)
            cout<<obj<<endl;
        else cout<<"NO"<<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:9: error: 'memset' was not declared in this scope
   33 |         memset(isSelected,0,sizeof(isSelected));
      |         ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <algorithm>
  +++ |+#include <cstring>
    4 | #include <string>
Language: C++

#include <iostream>
#include <sstream>
#include <string>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cassert>

using namespace std;

#define FOR(i,k,n) for(int i=(k); i<(int)n; ++i)
#define REP(i,n) FOR(i,0,n)
#define FORIT(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)

template<class T> void debug(T begin, T end){ for(T i = begin; i != end; ++i) cout<<*i<<" "; cout<<endl; }

typedef long long ll;
const int INF = 100000000;
const double EPS = 1e-8;
const int MOD = 1000000007;

int main(){
  int L, H;
  while(cin>>L>>H,L){
    int S = (1<<L)-1;
    vector<int> ans;
    bool used[1000][10] = {};
    vector<string> vs(H);
    vector<int> hit(H);
    vector<int> brow(H);
    REP(i,H){
      cin>>vs[i]>>hit[i]>>brow[i];
      REP(j,vs[i].size())used[i][vs[i][j]-'0'] = true;
    }
    while(S < 1<<10){
      REP(i,H){
        int hb = 0;
        REP(j,10)if(used[i][j] && S >> j & 1)hb++;
        if(hit[i] + brow[i] != hb){
          goto NEXT;
        }
      }
      vector<int> digit;
      REP(i,10)if(S >> i & 1)digit.push_back(i);
      do{
        bool ok = true;
        REP(i,H){
          int h = 0;
          REP(j,L)if((vs[i][j]-'0') == digit[j])h++;
          if(hit[i] != h){
            ok = false;
            break;
          }
        }
        if(ok){
          if(ans.size() > 0){
            ans = vector<int>();
            goto OUTPUT;
          }else{
            ans = digit;
          }
        }
      }while(next_permutation(digit.begin(), digit.end()));
      NEXT:
      int x = S & -S, y = S + x;
      S = ((S & ~y) / x >> 1) | y;
    }
OUTPUT:
    if(ans.size() > 0) { REP(i,ans.size()){cout<<ans[i];} cout<<endl; }
    else cout<<"NO"<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:71:7: error: jump to label 'NEXT'
   71 |       NEXT:
      |       ^~~~
a.cc:47:16: note:   from here
   47 |           goto NEXT;
      |                ^~~~
a.cc:50:19: note:   crosses initialization of 'std::vector<int> digit'
   50 |       vector<int> digit;
      |                   ^~~~~
Language: Java

import java.util.Scanner;

public class　Main {
	public static void main(String[] args) {

		Scanner s = new Scanner(System.in);

		while (true) {
			int n = s.nextInt();
			int q = s.nextInt();

			if (n == 0 && q == 0)
				break;

			int[] day = new int[101];

			for (int i = 0; i < n; i++) {
				int m = s.nextInt();
				for (int j = 0; j < m; j++) {
					int d = s.nextInt();
					day[d]++;
				}
			}

			int max = 0;
			for (int j = 0; j < 101; j++) {
				if (max < day[j])
					max = day[j];
			}

			int ans = 0;
			for (int j = 0; j < 101; j++) {
				if (max == day[j]) {
					ans = j;
					break;
				}
			}

			if (max >= q)
				System.out.println(ans);
			else
				System.out.println(0);

		}

		s.close();
	}
}

Compiler output:
Main.java:3: error: illegal character: '\u3000'
public class?Main {
            ^
1 error
Language: Java

import java.util.Scanner;

public class　Main {
	public static void main(String[] args) {

		Scanner s = new Scanner(System.in);

		while (true) {
			int n = s.nextInt();
			int q = s.nextInt();

			if (n == 0 && q == 0)
				break;

			int[] day = new int[101];

			for (int i = 0; i < n; i++) {
				int m = s.nextInt();
				for (int j = 0; j < m; j++) {
					int d = s.nextInt();
					day[d]++;
				}
			}

			int max = 0;
			for (int j = 0; j < 101; j++) {
				if (max < day[j])
					max = day[j];
			}

			int ans = 0;
			for (int j = 0; j < 101; j++) {
				if (max == day[j]) {
					ans = j;
					break;
				}
			}

			if (max >= q)
				System.out.println(ans);
			else
				System.out.println(0);
		}
		s.close();
	}
}

Compiler output:
Main.java:3: error: illegal character: '\u3000'
public class?Main {
            ^
1 error
Language: C

g#include <stdio.h>
#define SIZE 100

int date[SIZE + 1];

/* prototype declaration */
void init();
void count(int day);
int search(int quorum);

int main(int argc, const char *argv[])
{
	int i, j, N, Q, M, day, ans;

	while(1)
	{
		/* initialization */
		init();
		ans = 0;

		scanf("%d%d", &N, &Q);	

		if(N == 0 && Q == 0)
		{
			break;
		}

		for(i = 0; i < N; i++)
		{
			scanf("%d", &M);

			for(j = 0; j < M; j++)
			{
				scanf("%d", &day);
				count(day);
			}

			if(!ans)
			{
				ans = search(Q);
			}
		}

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

	return 0;
}

void init()
{
	int i;
	for(i = 0; i < SIZE; i++)
	{
		date[i] = 0;
	}
}

void count(int day)
{
	date[day] += 1;
}

int search(int quorum)
{
	int i, min = SIZE + 1;

	for(i = 0; i < SIZE; i++)
	{
		if(date[i] >= quorum)
		{
			min = i < min ? i : min;
		}
	}

	return min == SIZE + 1 ? 0 : min;
}

Compiler output:
main.c:1:2: error: stray '#' in program
    1 | g#include <stdio.h>
      |  ^
main.c:1:1: error: unknown type name 'g'
    1 | g#include <stdio.h>
      | ^
main.c:1:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | g#include <stdio.h>
      |           ^
main.c: In function 'main':
main.c:21:17: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   21 |                 scanf("%d%d", &N, &Q);
      |                 ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | g#include <stdio.h>
main.c:21:17: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   21 |                 scanf("%d%d", &N, &Q);
      |                 ^~~~~
main.c:21:17: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:44:17: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   44 |                 printf("%d\n", ans);
      |                 ^~~~~~
main.c:44:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:44:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:44:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c: In function 'init':
main.c:55:17: error: 'date' undeclared (first use in this function)
   55 |                 date[i] = 0;
      |                 ^~~~
main.c:55:17: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'count':
main.c:61:9: error: 'date' undeclared (first use in this function)
   61 |         date[day] += 1;
      |         ^~~~
main.c: In function 'search':
main.c:70:20: error: 'date' undeclared (first use in this function)
   70 |                 if(date[i] >= quorum)
      |                    ^~~~
Language: C

#include <stdio.h>

int main(){
	int N, Q;
	int M, data;
	int i,j;
	int maxMember,maxMemberdata;
	while(1){
		//int canAttend[100]={0,};
		scanf("%d%d",&N,&Q);if(N==0&&Q==0) break;
		maxMember=Q-1;
		maxMemberdata=0;
		for(j=0;j<100;j++) canAttend[j]=0;
		for(i=0;i<N;i++){
			scanf("%d", &M);
			for(j=0;j<M;j++){
				scanf("%d", &data);
				canAttend[data]=canAttend[data]+1;
			}
		}
		for(i=0;i<100;i++){
			if(canAttend[i]>maxMember){
				maxMember=canAttend[i];
				maxMemberdata=i;
			}
		}
		printf("%d\n",maxMemberdata);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:36: error: 'canAttend' undeclared (first use in this function)
   13 |                 for(j=0;j<100;j++) canAttend[j]=0;
      |                                    ^~~~~~~~~
main.c:13:36: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(){
	int N, Q;
	int M, data;
	//int canAttend[100];
	int i,j;
	int maxMember,maxMemberdata;
	while(true){
		int canAttend[100]={0,};
		scanf("%d%d",&N,&Q);if(N==0&&Q==0) break;
		maxMember=Q-1;
		maxMemberdata=0;
		//for(j=0;j<100;j++) canAttend[j]=0;
		for(i=0;i<N;i++){
			scanf("%d", &M);
			for(j=0;j<M;j++){
				scanf("%d", &data);
				canAttend[data]=canAttend[data]+1;
			}
		}
		for(i=0;i<100;i++){
			if(canAttend[i]>maxMember){
				maxMember=canAttend[i];
				maxMemberdata=i;
			}
		}
		printf("%d\n",maxMemberdata);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:15: error: 'true' undeclared (first use in this function)
    9 |         while(true){
      |               ^~~~
main.c:2:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include <stdio.h>
  +++ |+#include <stdbool.h>
    2 | 
main.c:9:15: note: each undeclared identifier is reported only once for each function it appears in
    9 |         while(true){
      |               ^~~~
Language: C++

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

int main(){
	int N, Q, M, temp;
	
	while(1){
		int temp2[300] = {}ans = 0;
		cin>>N>>Q;
		
		if(N == 0 && Q == 0) break;
		
		for(int i = 1; i <= N; i++){
			cin>>M;
			for(int j = 1; j <= M; j++){
				cin>>temp;
				temp2[temp]++;
			}
		}
		
		for(int i = 1; i <= 250; i++){
			if(temp2[ans] < temp2[i])ans = i;
		}
		
		if(temp2[ans] >= Q) cout<<ans<<endl;
		else cout<<0<<endl;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:36: error: expected ',' or ';' before 'ans'
    8 |                 int temp2[300] = {}ans = 0;
      |                                    ^~~
a.cc:22:34: error: 'ans' was not declared in this scope; did you mean 'abs'?
   22 |                         if(temp2[ans] < temp2[i])ans = i;
      |                                  ^~~
      |                                  abs
a.cc:25:26: error: 'ans' was not declared in this scope; did you mean 'abs'?
   25 |                 if(temp2[ans] >= Q) cout<<ans<<endl;
      |                          ^~~
      |                          abs
Language: C++

#include <cstdio>
#include <algorithm>
#include <vector>
using namespace std;
vector<int> l(101,0);

int main(){
    int i,j,N,Q,M,d;
    
    while(1){
        scanf("%d %d",&N,&Q);
        if(!N && !Q){break;}
        l.fill(l.begin(),l.end(),0)
        for(i=0;i<N;i++){
            scanf("%d",&M);
            for(j=0;j<M;j++){
                scanf("%d",&d);
                l[d]++;
            }
        }
        auto maxit=max_element(l.begin(),l.end());
        if(*maxit>=Q){
            size_t midx=distance(l.begin(),maxit);
            printf("%lu\n",midx);
        }
        else{
            printf("0\n");
        }
    }
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:13:11: error: 'class std::vector<int>' has no member named 'fill'
   13 |         l.fill(l.begin(),l.end(),0)
      |           ^~~~
a.cc:14:24: error: expected ';' before ')' token
   14 |         for(i=0;i<N;i++){
      |                        ^
      |                        ;
Language: C++

#include <cstdio>
#include <algorithm>
#include <vector>
using namespace std;
vector<int> l(101,0);

int main(){
    int i,j,N,Q,M,d;
    
    while(1){
        scanf("%d %d",&N,&Q);
        if(!N && !Q){break;}
        fill(l.begin(),l.end(),0)
        for(i=0;i<N;i++){
            scanf("%d",&M);
            for(j=0;j<M;j++){
                scanf("%d",&d);
                l[d]++;
            }
        }
        auto maxit=max_element(l.begin(),l.end());
        if(*maxit>=Q){
            size_t midx=distance(l.begin(),maxit);
            printf("%lu\n",midx);
        }
        else{
            printf("0\n");
        }
    }
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:13:34: error: expected ';' before 'for'
   13 |         fill(l.begin(),l.end(),0)
      |                                  ^
      |                                  ;
   14 |         for(i=0;i<N;i++){
      |         ~~~                       
a.cc:14:24: error: expected ';' before ')' token
   14 |         for(i=0;i<N;i++){
      |                        ^
      |                        ;
Language: C++

#include <bits/stdc++.h>
#define rep(i,l,n) for(int i=l;i<n;i++)
#define all(a) a.begin(),a.end()
#define o(a) cout<<a<<endl
using namespace std;

/*int main(){
	int n,q;
	while(1){
		pair<int,int> data[101]={};
		rep(i,0,101){
			data[i].second=-i;
		}
		cin>>n>>q;
		if(n==0 && q==0) break;
		rep(i,0,n){
			int m,d;
			cin>>m;
			rep(j,0,m){
				cin>>d;
				data[d].first++;
			}
		}
		sort(data,data+101);
		reverse(data,data+101);
		if(data[0].first<q) cout<<0<<endl;
		else cout<<-data[0].second<<endl;
	}
}*/

int main(){
	int n,q;
	while(1){
		cin>>n>>q;
		if(n==0 && q==0) break;
		map<int,int> dat;
		rep(i,0,n){
			int m,d;
			cin>>m;
			rep(j,0,m){
				cin>>d;
				dat[d]++;
			}
		}
		for(map<int,int>::iterator it=dat.begin();it!=dat.end();it++)
			if(it->second>Max){
				max=it->second;
				ans=it->first;
			}
		}
		if(max<q) cout<<0<<endl;
		else cout<<ans<<endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:46:39: error: 'Max' was not declared in this scope
   46 |                         if(it->second>Max){
      |                                       ^~~
a.cc:47:41: error: overloaded function with no contextual type information
   47 |                                 max=it->second;
      |                                         ^~~~~~
a.cc:48:33: error: 'ans' was not declared in this scope; did you mean 'abs'?
   48 |                                 ans=it->first;
      |                                 ^~~
      |                                 abs
a.cc:51:20: error: parse error in template argument list
   51 |                 if(max<q) cout<<0<<endl;
      |                    ^~~~~
a.cc:51:25: error: cannot resolve overloaded function 'max' based on conversion to type 'bool'
   51 |                 if(max<q) cout<<0<<endl;
      |                         ^
a.cc:52:28: error: 'ans' was not declared in this scope; did you mean 'abs'?
   52 |                 else cout<<ans<<endl;
      |                            ^~~
      |                            abs
a.cc: At global scope:
a.cc:54:1: error: expected declaration before '}' token
   54 | }
      | ^
Language: C++

#include<iostream>
using namespace std;

int main(){
  int N,Q,M,a;

  while(cin>>N>>Q){
    if(N==0&&Q==0)break;
    int max=0;
    int b[51][101]={},c,d=100;

    for(int i=0;i<N;i++){
      cin>>M;
      if(max<M)max=M;
      for(int j=0;j<M;j++){
	cin>>a;
	b[i][j]=a;
      }
    }

    for(int i=0;i<N;i++)
      for(int j=0;b[i][j]!=0;j++)
	int count=0;
	for(int l=0;l<N;l++)
	  for(int k=0;b[l][k]!=0;k++)
	    if(b[i][j]==b[l][k]){
	      count1++;
	      if(Q<=count){
		c=b[i][j];
		if(d>c)d=c;
	      }
	    }	  

    if(Q>count)cout<<0<<endl;
    else cout<<d<<endl;     
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:18: error: 'i' was not declared in this scope
   26 |             if(b[i][j]==b[l][k]){
      |                  ^
a.cc:26:21: error: 'j' was not declared in this scope
   26 |             if(b[i][j]==b[l][k]){
      |                     ^
a.cc:27:15: error: 'count1' was not declared in this scope
   27 |               count1++;
      |               ^~~~~~
a.cc:28:21: error: 'count' was not declared in this scope
   28 |               if(Q<=count){
      |                     ^~~~~
a.cc:34:10: error: 'count' was not declared in this scope
   34 |     if(Q>count)cout<<0<<endl;
      |          ^~~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
  int N,Q,M,a;

  while(cin>>N>>Q){
    if(N==0&&Q==0)break;
    int max=0;
    int b[51][101]={},c,d=100;

    for(int i=0;i<N;i++){
      cin>>M;
      if(max<M)max=M;
      for(int j=0;j<M;j++){
	cin>>a;
	b[i][j]=a;
      }
    }

    for(int i=0;i<N;i++)
      for(int j=0;b[i][j]!=0;j++)
	int count=0;
	for(int l=0;l<N;l++)
	  for(int k=0;b[l][k]!=0;k++)
	    if(b[i][j]==b[l][k]){
	      count++;
	      if(Q<=count){
		c=b[i][j];
		if(d>c)d=c;
	      }
	    }	  

    if(Q>count)cout<<0<<endl;
    else cout<<d<<endl;     
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:18: error: 'i' was not declared in this scope
   26 |             if(b[i][j]==b[l][k]){
      |                  ^
a.cc:26:21: error: 'j' was not declared in this scope
   26 |             if(b[i][j]==b[l][k]){
      |                     ^
a.cc:27:15: error: 'count' was not declared in this scope
   27 |               count++;
      |               ^~~~~
a.cc:34:10: error: 'count' was not declared in this scope
   34 |     if(Q>count)cout<<0<<endl;
      |          ^~~~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <queue>
#include <map>
#include <set>
#include <vector>
#include <cmath>
#include <cctype>
#define rep(i,a,b) for(int i=(a);i<b;i++)
#define INF 1000000000
using namespace std;
bool debug=false;

int main(){
  int n,q;

  while(1){
    
    cin>>n>>q;
    if(n==0&&q==0)break;
    map<int,int>mp;

    for(int i=0;i<n;i++){
      int x;
      cin>>x;
      if(x==0)for(int i=0;i<52;i++)mp[i]++;
      for(int j=0;j<x;j++){
	int a;
	cin>>a;
	mp[a]++;
      }
    }
    for(int i=0;i<52;i++){
      //cout<<i<<":"<<mp[i]<<endl;
      if(mp[i]==n){
	cout<<i<<endl;
	break;
      }else if(i==51){
	cout<<0<<endl;
      }
    }
    
  }

  return

Compiler output:
a.cc: In function 'int main()':
a.cc:46:9: error: expected primary-expression at end of input
   46 |   return
      |         ^
a.cc:46:9: error: expected ';' at end of input
   46 |   return
      |         ^
      |         ;
a.cc:46:9: error: expected '}' at end of input
a.cc:15:11: note: to match this '{'
   15 | int main(){
      |           ^
Language: C++

#include <stdio.h>

int main(){
	int N, Q;
	int M, data;
	int i,j;
	int maxMember,maxMemberdata;
	while(1){
		//int canAttend[100]={0,};
		scanf("%d%d",&N,&Q);if(N==0&&Q==0) break;
		maxMember=Q-1;
		maxMemberdata=0;
		for(j=0;j<100;j++) canAttend[j]=0;
		for(i=0;i<N;i++){
			scanf("%d", &M);
			for(j=0;j<M;j++){
				scanf("%d", &data);
				canAttend[data]=canAttend[data]+1;
			}
		}
		for(i=0;i<100;i++){
			if(canAttend[i]>maxMember){
				maxMember=canAttend[i];
				maxMemberdata=i;
			}
		}
		printf("%d\n",maxMemberdata);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:36: error: 'canAttend' was not declared in this scope
   13 |                 for(j=0;j<100;j++) canAttend[j]=0;
      |                                    ^~~~~~~~~
a.cc:18:33: error: 'canAttend' was not declared in this scope
   18 |                                 canAttend[data]=canAttend[data]+1;
      |                                 ^~~~~~~~~
a.cc:22:28: error: 'canAttend' was not declared in this scope
   22 |                         if(canAttend[i]>maxMember){
      |                            ^~~~~~~~~
Language: C

#include <stdio.h>

int main() {
  int n,w,h,s,t;
  int board[100][100];
  int i,j;
  int x,y;
  int max,cnt;

  while(scanf("%d",&n),n){
  	scanf("%d%d",&w,&h);

    for(i = 0;i < n;i++){
      scanf("%d%d",&x,&y);
      f[y][x] = 1;
    }

    scanf("%d%d",&s,&t);
    for(max = 0,y = 1; y <= h; y++){
      for(x = 1; x <= w; x++){
        for(cnt = 0,i = 0; i < t; i++){
          if(y + i > h)break;
          for(j = 0; j < s; j++){
            if(x + j > w)break;
            cnt += f[y + i][x + j];
            if(cnt > max)max = cnt;
          }
        }
      }
    }
    printf("%d\n",max);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:7: error: 'f' undeclared (first use in this function)
   15 |       f[y][x] = 1;
      |       ^
main.c:15:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main() {
  int n,w,h,s,t;
  int board[100][100];
  int i,j;
  int x,y;
  int max,cnt;

  while(scanf("%d",&n),n){
  	scanf("%d%d",&w,&h);

    for(i = 0;i < n;i++){
      scanf("%d%d",&x,&y);
      f[y][x] = 1;
    }

    scanf("%d%d",&s,&t);
    for(max = 0,y = 1; y <= h; y++){
      for(x = 1; x <= w; x++){
        for(cnt = 0,i = 0; i < t; i++){
          if(y + i > h)break;
          for(j = 0; j < s; j++){
            if(x + j > w)break;
            cnt += board[y + i][x + j];
            if(cnt > max)max = cnt;
          }
        }
      }
    }
    printf("%d\n",max);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:7: error: 'f' undeclared (first use in this function)
   15 |       f[y][x] = 1;
      |       ^
main.c:15:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>
#include<stack>

using namespace std;

typedef long long Int;
typedef vector<int> vint;
typedef pair<int,int> pint;
typedef vector<string> vstring;
typedef vector<pint> vpint;
typedef stringstream SS;

template<class T> void chmin(T &t, T f) { if (t > f) t = f; }
template<class T> void chmax(T &t, T f) { if (t < f) t = f; }

#define rep(i,n) for(int i=0;i<(n);++i)
#define repn(i,m,n) for(int i=(m);i<(n);++i)
#define repd(i,n) for(int i=(n)-1;i>=0;--i)
#define repnd(i,m,n) for(int i=(n)-1;i>=(m);--i)
#define rep0(i,n) for(i=0;i<(n);++i)
#define repn0(i,m,n) for(i=(m);i<(n);++i)
#define repd0(i,n) for(i=(n)-1;i>=0;--i)
#define repnd0(i,m,n) for(i=(n)-1;i>=(m);--i)
#define repc(i,n) for(int i=0;i<=(n);++i)
#define repcn(i,m,n) for(int i=(m);i<=(n);++i)
#define repcd(i,n) for(int i=(n);i>=0;--i)
#define repcnd(i,m,n) for(int i=(n);i>=(m);--i)
#define repc0(i,n) for(i=0;i<=(n);++i)
#define repcn0(i,m,n) for(i=(m);i<=(n);++i)
#define repcd0(i,n) for(i=(n);i>=0;--i)
#define repcnd0(i,m,n) for(i=(n);i>=(m);--i)
#define all(n) n.begin(),n.end()
#define sz(n) ((int)(n).size())
#define IL for(;;)
#define MP make_pair
#define PB push_back
#define X second
#define Y first
#define p_queue(n) priority_queue<n,vector<n>,greater<n> >
#define PUTLINE cout<<"LINE:"<<__LINE__<<endl;

const int INF = 2147483647/3;
const double EPS = 1e-10;
const double PI = acos(-1.0);

const int dx[]={1,-1,0,0,1,1,-1,-1,0};
const int dy[]={0,0,1,-1,1,-1,1,-1,0};

int dp[111][111];
int tree[111][111];

int main() {
	int n, w, h, s, t, x, y;
	IL {
		cin >> n;
		if (n == 0) break;
		memset(dp, 0, sizeof(dp));
		memset(tree, 0, sizeof(tree));
		cin >> w >> h;
		rep (i, n) {
			cin >> x >> y;
			tree[y][x] = 1;
		}
		cin >> s >> t;
		repcn (i, 1, h) repcn (j, 1, w) {
			dp[i][j] = dp[i-1][j] + dp[i][j-1] - dp[i-1][j-1] + tree[i][j];
		}
		int res = 0;
		rep (i, h - t + 1) rep (j, w - s + 1) {
			chmax(res, dp[i + t][j + s] - dp[i][j + s] - dp[i + t][j] + dp[i][j]);
		}
		cout << res << endl;
	}
	return 0;
}

Compiler output:
main.c:1:9: fatal error: cstdio: No such file or directory
    1 | #include<cstdio>
      |         ^~~~~~~~
compilation terminated.
Language: C

#include <stdio.h>
#define MAX(a,b) ((a) > (b) ? (a) : (b));

int countTree(int a,int b,int c,int d,int e[][]);

int main(){
	int N;
	int i,j;
	while(1){
		int maxNumber=0;
		scanf("%d",&N); if(N==0) break;
		scanf("%d%d",&W,&H);
		int map[H][W]={};
		int x,y;
		for(i=0;i<N;i++){
			scanf("%d%d",&x,&y);
			map[x][y]=1;
		}
		scanf("%d%d",&S,&T);
		for(i=0;i<H-T+1;i++){
			for(j=0;j<W-S+1;j++) maxNumber=MAX(maxNumber,countTree(i,j,S,T,map));
		}
		printf("%d\n",maxNumber);
	}
}

int countTree(int a,int b,int c,int d,int e[][]){
	int k,l;
	int countSum=0;
	for(k=0;k<a+c;i++){
		for(l=0;l<b+d;l++){
			if(e[k][l]==1) countSum++;
		}
	}
	return countSum;
}

Compiler output:
main.c:4:43: error: array type has incomplete element type 'int[]'
    4 | int countTree(int a,int b,int c,int d,int e[][]);
      |                                           ^
main.c:4:43: note: declaration of 'e' as multidimensional array must have bounds for all dimensions except the first
main.c: In function 'main':
main.c:12:31: error: 'W' undeclared (first use in this function)
   12 |                 scanf("%d%d",&W,&H);
      |                               ^
main.c:12:31: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:34: error: 'H' undeclared (first use in this function)
   12 |                 scanf("%d%d",&W,&H);
      |                                  ^
main.c:19:31: error: 'S' undeclared (first use in this function)
   19 |                 scanf("%d%d",&S,&T);
      |                               ^
main.c:19:34: error: 'T' undeclared (first use in this function)
   19 |                 scanf("%d%d",&S,&T);
      |                                  ^
main.c:21:88: error: type of formal parameter 5 is incomplete
   21 |                         for(j=0;j<W-S+1;j++) maxNumber=MAX(maxNumber,countTree(i,j,S,T,map));
      |                                                                                        ^~~
main.c:2:26: note: in definition of macro 'MAX'
    2 | #define MAX(a,b) ((a) > (b) ? (a) : (b));
      |                          ^
main.c:21:88: error: type of formal parameter 5 is incomplete
   21 |                         for(j=0;j<W-S+1;j++) maxNumber=MAX(maxNumber,countTree(i,j,S,T,map));
      |                                                                                        ^~~
main.c:2:38: note: in definition of macro 'MAX'
    2 | #define MAX(a,b) ((a) > (b) ? (a) : (b));
      |                                      ^
main.c: At top level:
main.c:27:43: error: array type has incomplete element type 'int[]'
   27 | int countTree(int a,int b,int c,int d,int e[][]){
      |                                           ^
main.c:27:43: note: declaration of 'e' as multidimensional array must have bounds for all dimensions except the first
main.c: In function 'countTree':
main.c:30:23: error: 'i' undeclared (first use in this function)
   30 |         for(k=0;k<a+c;i++){
      |                       ^
Language: C

#include <stdio.h>
#define MAX(a,b) ((a) > (b) ? (a) : (b));

int countTree(int a,int b,int c,int d,int e[][]);

int main(){
	int N;
	int i,j;
	while(1){
		int maxNumber=0;
		scanf("%d",&N); if(N==0) break;
		scanf("%d%d",&W,&H);
		int map[H][W]={};
		int x,y;
		for(i=0;i<N;i++){
			scanf("%d%d",&x,&y);
			map[x][y]=1;
		}
		scanf("%d%d",&S,&T);
		for(i=0;i<H-T+1;i++){
			for(j=0;j<W-S+1;j++) maxNumber=MAX(maxNumber,countTree(i,j,S,T,map));
		}
		printf("%d\n",maxNumber);
	}
}

int countTree(int a,int b,int c,int d,int e[][]){
	int k,l;
	int countSum=0;
	for(k=a;k<a+c;k++){
		for(l=b;l<b+d;l++){
			if(e[k][l]==1) countSum++;
		}
	}
	return countSum;
}

Compiler output:
main.c:4:43: error: array type has incomplete element type 'int[]'
    4 | int countTree(int a,int b,int c,int d,int e[][]);
      |                                           ^
main.c:4:43: note: declaration of 'e' as multidimensional array must have bounds for all dimensions except the first
main.c: In function 'main':
main.c:12:31: error: 'W' undeclared (first use in this function)
   12 |                 scanf("%d%d",&W,&H);
      |                               ^
main.c:12:31: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:34: error: 'H' undeclared (first use in this function)
   12 |                 scanf("%d%d",&W,&H);
      |                                  ^
main.c:19:31: error: 'S' undeclared (first use in this function)
   19 |                 scanf("%d%d",&S,&T);
      |                               ^
main.c:19:34: error: 'T' undeclared (first use in this function)
   19 |                 scanf("%d%d",&S,&T);
      |                                  ^
main.c:21:88: error: type of formal parameter 5 is incomplete
   21 |                         for(j=0;j<W-S+1;j++) maxNumber=MAX(maxNumber,countTree(i,j,S,T,map));
      |                                                                                        ^~~
main.c:2:26: note: in definition of macro 'MAX'
    2 | #define MAX(a,b) ((a) > (b) ? (a) : (b));
      |                          ^
main.c:21:88: error: type of formal parameter 5 is incomplete
   21 |                         for(j=0;j<W-S+1;j++) maxNumber=MAX(maxNumber,countTree(i,j,S,T,map));
      |                                                                                        ^~~
main.c:2:38: note: in definition of macro 'MAX'
    2 | #define MAX(a,b) ((a) > (b) ? (a) : (b));
      |                                      ^
main.c: At top level:
main.c:27:43: error: array type has incomplete element type 'int[]'
   27 | int countTree(int a,int b,int c,int d,int e[][]){
      |                                           ^
main.c:27:43: note: declaration of 'e' as multidimensional array must have bounds for all dimensions except the first
Language: C

#include <stdio.h>
#define MAX(a,b) ((a) > (b) ? (a) : (b));

int countTree(int a1,int b1,int c1,int d1,int e1[][]);

int main(){
	int N;
	int i,j;
	while(1){
		int maxNumber=0;
		scanf("%d",&N); if(N==0) break;
		scanf("%d%d",&W,&H);
		int map[H][W]={};
		int x,y;
		for(i=0;i<N;i++){
			scanf("%d%d",&x,&y);
			map[y][x]=1;
		}
		scanf("%d%d",&S,&T);
		for(i=0;i<H-T+1;i++){
			for(j=0;j<W-S+1;j++) maxNumber=MAX(maxNumber,countTree(i,j,T,S,map));
		}
		printf("%d\n",maxNumber);
	}
}

int countTree(int a1,int b1,int c1,int d1,int e1[][]){
	int k,l;
	int countSum=0;
	for(k=a1;k<a1+c1;k++){
		for(l=b1;l<b1+d1;l++){
			if(e1[k][l]==1) countSum++;
		}
	}
	return countSum;
}

Compiler output:
main.c:4:47: error: array type has incomplete element type 'int[]'
    4 | int countTree(int a1,int b1,int c1,int d1,int e1[][]);
      |                                               ^~
main.c:4:47: note: declaration of 'e1' as multidimensional array must have bounds for all dimensions except the first
main.c: In function 'main':
main.c:12:31: error: 'W' undeclared (first use in this function)
   12 |                 scanf("%d%d",&W,&H);
      |                               ^
main.c:12:31: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:34: error: 'H' undeclared (first use in this function)
   12 |                 scanf("%d%d",&W,&H);
      |                                  ^
main.c:19:31: error: 'S' undeclared (first use in this function)
   19 |                 scanf("%d%d",&S,&T);
      |                               ^
main.c:19:34: error: 'T' undeclared (first use in this function)
   19 |                 scanf("%d%d",&S,&T);
      |                                  ^
main.c:21:88: error: type of formal parameter 5 is incomplete
   21 |                         for(j=0;j<W-S+1;j++) maxNumber=MAX(maxNumber,countTree(i,j,T,S,map));
      |                                                                                        ^~~
main.c:2:26: note: in definition of macro 'MAX'
    2 | #define MAX(a,b) ((a) > (b) ? (a) : (b));
      |                          ^
main.c:21:88: error: type of formal parameter 5 is incomplete
   21 |                         for(j=0;j<W-S+1;j++) maxNumber=MAX(maxNumber,countTree(i,j,T,S,map));
      |                                                                                        ^~~
main.c:2:38: note: in definition of macro 'MAX'
    2 | #define MAX(a,b) ((a) > (b) ? (a) : (b));
      |                                      ^
main.c: At top level:
main.c:27:47: error: array type has incomplete element type 'int[]'
   27 | int countTree(int a1,int b1,int c1,int d1,int e1[][]){
      |                                               ^~
main.c:27:47: note: declaration of 'e1' as multidimensional array must have bounds for all dimensions except the first
Language: C++

#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>


int main()
{
	int i,j,k,l;
	int n;
	int w,h;
	int ww,hh;
	int ans,sum;
	int a[100][100];

	while(1)
	{
		scanf("%d",&n);
		if(n==0){break;}
		else
		{
			ans=0;
			for(i=0;i<100;i++){for(j=0;j<100;j++){a[i][j]=0}}

			for(i=0;i<n;i++)
			{
				int x,y;
				scanf("%d %d",&x,&y);
				a[x-1][y-1]=1;
			}

			scanf("%d %d",&ww,&hh);

			for(i=0;i<(w-ww);i++)
			{
				for(j=0;j<(h-hh);j++)
				{
					sum=0;
					for(k=i;k<(i+ww);k++)
					{
						for(l=j;l<(j+hh);l++)
						{
							sum+=a[k][l];
						}
					}
					if(ans<sum){ans=sum;}
				}
			}
		}
		printf("%d\n",ans);
	}
	return 0;
}
	

Compiler output:
a.cc: In function 'int main()':
a.cc:24:72: error: expected ';' before '}' token
   24 |                         for(i=0;i<100;i++){for(j=0;j<100;j++){a[i][j]=0}}
      |                                                                        ^
      |                                                                        ;
Language: C++

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

int main() {
  int n;
  while(cin >> n, n) {
    int w, h; cin >> w >> h;
    bool field[110][110];
    memset(field, false, sizeof(field));

    for(int i = 0; i < n; i++) {
      int x, y; cin >> x >> y;
      field[y][x] = true;
    }

    int s, t; cin >> s >> t;
    int ans = 0;
    for(int i = 1; i < h-t+10; i++) {
      for(int j = 1; j < w-s+10; j++) {
        int sum = 0;
        for(int k = 0; k < t; k++) {
          for(int l = 0; l < s; l++) {
            if(field[i+k][j+l]) sum++;
          }
        }
        if(sum > ans) ans = sum;
      }
    }
    cout << ans << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'memset' was not declared in this scope
   10 |     memset(field, false, sizeof(field));
      |     ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <algorithm>
  +++ |+#include <cstring>
    3 | using namespace std;
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
using namespace std;
int d[101][101]={},s,t;
typedef pair<int,int> P;
vector<P> V;
int f(int x,int y){
	int cnt=0;
	for(int i=0;i<t;i++){
		for(int j=0;j<s;j++){
			if(y+j<=w && x+i<=h){s
				if(d[y+j][x+i]){
					cnt++;
				}
			}
		}
	}
	return cnt;
}
int main(){
	int n;
	while(cin>>n,n){
		int ans=0,w,h,x,y;
		cin>>w>>h;
		for(int i=1;i<=h;i++){
			for(int j=1;j<=w;j++){
				d[i][j]=0;
			}
		}
		for(int i=0;i<n;i++){
			cin>>x>>y;
			d[x][y]=1;
			V.push_back(P(x,y));
		}
		cin>>s>>t;
		for(int i=0;i<V.size();i++){
			ans=max(ans,f(V[i].second,V[i].first));
		}
		cout<<ans<<endl;;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int f(int, int)':
a.cc:13:33: error: 'w' was not declared in this scope
   13 |                         if(y+j<=w && x+i<=h){s
      |                                 ^
a.cc:13:43: error: 'h' was not declared in this scope
   13 |                         if(y+j<=w && x+i<=h){s
      |                                           ^
a.cc:13:47: error: expected ';' before 'if'
   13 |                         if(y+j<=w && x+i<=h){s
      |                                               ^
      |                                               ;
   14 |                                 if(d[y+j][x+i]){
      |                                 ~~
Language: C++

#include "stdafx.h"
#include <iostream>
using namespace std;

int main(void){
	int N;
	int W, H;
	bool pos[101][101];//pos[x][y];
	int x, y;
	int i, j,k,l;
	int S, T;
	int max, temp;

	cin >> N;
	while(N != 0)
	{
		cin >> W >> H;
		while (N--){
			cin >> x >> y;
			pos[x][y] = true;
		}
		
/*		for (i = 1; i <= H; i++){
			for (j = 1; j <= W; j++){
				if (pos[j][i] == true) printf("@");
				else printf("-");
			}
			putchar('\n');
		}
*/
		cin >> S >> T;

		max = 0;
		for (i = 1; i <= H - T; i++){
			for (j = 1; j <= W - S; j++){
				temp = 0;
				for (k = 0; k < T; k++){
					for (l = 0; l < S; l++){
						if (pos[j+l][i+k] == true) temp++;
					}
				}
				if (temp > max) max = temp;
			}
		}

		cout << max << endl;

		cin >> N;
	}

	return(0);


}

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

#include<bits/stdc++.h>
int h,w,k,l,m,a,b,s,t,u,v,i,j,x[999][999];main(){while(1){memset(x,0,1<<21);v=0;std::cin>>k;if(!k){break;}std::cin>>w>>h;for(i=0;i<k;i++){cin>>a>>b;x[a][b]=1;}cin>>s>>t;for(i=1;i<=w;i++){for(j=1;j<=h;j++){u=0;for(l=0;l<s;l++){for(m=0;m<t;m++){if(x[i+l][j+m]){u++;}}}v=v>u?v:u;}}printf("%d\n",v);}}

Compiler output:
a.cc:2:43: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | int h,w,k,l,m,a,b,s,t,u,v,i,j,x[999][999];main(){while(1){memset(x,0,1<<21);v=0;std::cin>>k;if(!k){break;}std::cin>>w>>h;for(i=0;i<k;i++){cin>>a>>b;x[a][b]=1;}cin>>s>>t;for(i=1;i<=w;i++){for(j=1;j<=h;j++){u=0;for(l=0;l<s;l++){for(m=0;m<t;m++){if(x[i+l][j+m]){u++;}}}v=v>u?v:u;}}printf("%d\n",v);}}
      |                                           ^~~~
a.cc: In function 'int main()':
a.cc:2:139: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    2 | int h,w,k,l,m,a,b,s,t,u,v,i,j,x[999][999];main(){while(1){memset(x,0,1<<21);v=0;std::cin>>k;if(!k){break;}std::cin>>w>>h;for(i=0;i<k;i++){cin>>a>>b;x[a][b]=1;}cin>>s>>t;for(i=1;i<=w;i++){for(j=1;j<=h;j++){u=0;for(l=0;l<s;l++){for(m=0;m<t;m++){if(x[i+l][j+m]){u++;}}}v=v>u?v:u;}}printf("%d\n",v);}}
      |                                                                                                                                           ^~~
      |                                                                                                                                           std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:2:160: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    2 | int h,w,k,l,m,a,b,s,t,u,v,i,j,x[999][999];main(){while(1){memset(x,0,1<<21);v=0;std::cin>>k;if(!k){break;}std::cin>>w>>h;for(i=0;i<k;i++){cin>>a>>b;x[a][b]=1;}cin>>s>>t;for(i=1;i<=w;i++){for(j=1;j<=h;j++){u=0;for(l=0;l<s;l++){for(m=0;m<t;m++){if(x[i+l][j+m]){u++;}}}v=v>u?v:u;}}printf("%d\n",v);}}
      |                                                                                                                                                                ^~~
      |                                                                                                                                                                std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

#include<bits/stdc++.h>
int h,w,k,l,m,a,b,s,t,u,v,i,j,x[999][999];main(){while(1){memset(x,0,1<<21);v=0;std::cin>>k;if(!k){break;}std::cin>>w>>h;for(i=0;i<k;i++){cin>>a>>b;x[a][b]=1;}std::cin>>s>>t;for(i=1;i<=w;i++){for(j=1;j<=h;j++){u=0;for(l=0;l<s;l++){for(m=0;m<t;m++){if(x[i+l][j+m]){u++;}}}v=v>u?v:u;}}printf("%d\n",v);}}

Compiler output:
a.cc:2:43: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | int h,w,k,l,m,a,b,s,t,u,v,i,j,x[999][999];main(){while(1){memset(x,0,1<<21);v=0;std::cin>>k;if(!k){break;}std::cin>>w>>h;for(i=0;i<k;i++){cin>>a>>b;x[a][b]=1;}std::cin>>s>>t;for(i=1;i<=w;i++){for(j=1;j<=h;j++){u=0;for(l=0;l<s;l++){for(m=0;m<t;m++){if(x[i+l][j+m]){u++;}}}v=v>u?v:u;}}printf("%d\n",v);}}
      |                                           ^~~~
a.cc: In function 'int main()':
a.cc:2:139: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    2 | int h,w,k,l,m,a,b,s,t,u,v,i,j,x[999][999];main(){while(1){memset(x,0,1<<21);v=0;std::cin>>k;if(!k){break;}std::cin>>w>>h;for(i=0;i<k;i++){cin>>a>>b;x[a][b]=1;}std::cin>>s>>t;for(i=1;i<=w;i++){for(j=1;j<=h;j++){u=0;for(l=0;l<s;l++){for(m=0;m<t;m++){if(x[i+l][j+m]){u++;}}}v=v>u?v:u;}}printf("%d\n",v);}}
      |                                                                                                                                           ^~~
      |                                                                                                                                           std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

#include <iostream>

using namespace std;

int main() {
  int n, w, h, s, t;
  int f[100][100]; // field

  while (cin >> n, n) {
    cin >> w >> h;

    memset(f, 0, sizeof(f));
    int x, y;
    for (int i=0; i<n; i++) {
      cin >> x >> y;
      f[y][x] = 1;
    }

    cin >> s >> t;
    int max = 0;
    for (int y=1; y<=h; y++) {
      for (int x=1; x<=w; x++) {
        int cnt = 0;
        for (int y2=0; y2<t; y2++) {
          if (y+y2 > h) { break; }
          for (int x2=0; x2<s; x2++) {
            if (x+x2 > w) { break; }

            cnt += f[y+y2][x+x2];
            if (cnt > max) { max = cnt; }
          }
        }
      }
    }
    cout << max << endl;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: 'memset' was not declared in this scope
   12 |     memset(f, 0, sizeof(f));
      |     ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 |
Language: C++

#include <iostream>

using namespace std;

int N, W, H, X, Y, S, T, r[100][100];

int main()
{
	while (true)
	{
		scanf("%d", &N);

		if (N == 0) break;

		memset(r, 0, sizeof(r));

		scanf("%d", &W);
		scanf("%d", &H);

		for (int i = 0; i < N; i++)
		{
			scanf("%d", &X);
			scanf("%d", &Y);

			r[Y - 1][X - 1] = 1;
		}

		scanf("%d", &S);
		scanf("%d", &T);

		int ret = 0;

		for (int i = 0; i < H - T; i++)
		{
			for (int j = 0; j < W - S; j++)
			{
				int res = 0;

				for (int k = i; k < i + T; k++)
				{
					for (int l = j; l < j + S; l++)
					{
						res += r[k][l];
					}
				}

				ret = ret > res ? ret : res;
			}
		}

		printf("%d\n", ret);
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: 'memset' was not declared in this scope
   15 |                 memset(r, 0, sizeof(r));
      |                 ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 |
Language: C++

#include<iostream>
#include<iomanip>
#include<math.h>
#include<algorithm>
#include<string>
#include<vector>
#include<queue>
#include<stack>
#include<set>
#include<map>
#define REP(i, N) for(ll i = 0; i < N; ++i)
#define FOR(i, a, b) for(ll i = a; i < b; ++i)
#define ALL(a) (a).begin(),(a).end()
#define pb push_back
#define INF (long long)1000000000
#define MOD 1000000007
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};

int main(void) {
	while(true) {
		int N, W, H;
		cin>>N;
		if(N == 0) break;
		cin>>W>>H;
		vector<vector<bool> > m(H, vector<bool>(W, false));
		vector<vector<int> > wa(H + 1, vector<int>(W + 1, 0));
		REP(i, N) {
			int x, y;
			cin>>x>>y;
			--x;
			--y;
			m[y][x] = true;
		}
		REP(i, H) {
			REP(j, W) {
				wa[i + 1][j + 1] += wa[i + 1][j] + (int)m[i][j];
			}
		}
		REP(i, H) {
			REP(j, W) {
				wa[i + 1][j + 1] += [i][j + 1];
			}
		}
		int S, T;
		cin>>S>>T;
		int ans = 0;
		REP(i, H - T + 1) {
			REP(j, W - S + 1) {
				ans = max(ans, wa[T + i][S + j] - wa[T + i][j] - wa[i][S + j] + wa[i][j]);
			}
		}
		cout<<ans<<endl;
	}
}

Compiler output:
a.cc: In lambda function:
a.cc:45:56: error: expected '{' before '[' token
   45 |                                 wa[i + 1][j + 1] += [i][j + 1];
      |                                                        ^
a.cc: In function 'int main()':
a.cc:45:56: error: no match for 'operator[]' (operand types are 'main()::<lambda()>' and 'll' {aka 'long long int'})
Language: C++

#include<iostream>
#include<algorithm>
#include<stack>
#include<queue>
#include<string>
#include<set>
#include<functional>
using namespace std;

#define INF 1<<21
#define MOD 1000000007

int main() {
  int N;
  int W, H;
  int a, b;
  int S, T;
  int table[105][105];
  int maxx;
  while (1) {
	cin >> N;
	if (N == 0) {
	  return 0;
	}
	cin >> W >> H;
	memset(table, 0, sizeof(table));
	maxx = 0;
	for (int i = 0; i < N; i++) {
	  cin >> a >> b;
	  table[b][a] = 1;
	}
	cin >> S >> T;
	for (int i = 1; i <= H - T + 1; i++) {
	  for (int j =1 ; j <= W - S + 1; j++) {
		int cnt = 0;
		for (int k = i; k < i + T; k++) {
		  for (int l = j; l < j + S; l++) {
			if (table[k][l] == 1)cnt++;
		  }
		}
		maxx = max(cnt, maxx);
	  }
	}
	cout << maxx << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:9: error: 'memset' was not declared in this scope
   26 |         memset(table, 0, sizeof(table));
      |         ^~~~~~
a.cc:8:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    7 | #include<functional>
  +++ |+#include <cstring>
    8 | using namespace std;
Language: C++

#include<iostream>
using namespace std;

bool tree[1000][1000];
int s[1000][1000];

int main(){
  int n, w, h;
  int x, y, S, T;
  while(cin >> n && n){
    memset(s, 0, sizeof(s));
    memset(tree, false, sizeof(tree));
    cin >> w >> h;
    for(int i = 0; i < n; i++){
      cin >> x >> y;
      tree[x][y] = true;
    }
    cin >> S >> T; 
    for(int i = 1; i <= w; i++){
      for(int j = 1; j <= h; j++){
	s[i][j] = s[i-1][j] + s[i][j-1] - s[i-1][j-1];
	if(tree[i][j]) s[i][j]++;
      }
    }
    int res = 0;
    for(int i = 1; i <= w - S + 1; i++){
      for(int j = 1; j <= h - T + 1; j++){
	int num = s[i+S-1][j+T-1] - s[i][j+T-1] - s[j+S-1][j] + s[i][j];
	res = max(num, res);
      }
    }
    cout << res << endl;
  }
  return 0;
}
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'memset' was not declared in this scope
   11 |     memset(s, 0, sizeof(s));
      |     ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | using namespace std;