Language: C++


int main(){
  int n;
  while(1){
    cin>>n;
    if(n==0)break;
    int w,h;
    cin>>w>>h;
    int d[101][101];
    for(int i=0;i<101;i++)for(int j=0;j<101;j++)d[i][j]=0;
    
    for(int i=0;i<n;i++){
      int x,y;
      cin>>x>>y;
      d[y][x]=1;
    }

    if(debug){
      for(int i=0;i<=h;i++){
	for(int j=0;j<=w;j++){
	  cout<<d[i][j]<<" ";
	}
	cout<<endl;
      }
    }
    
    int maxi=0;
    int s,t;
    cin>>s>>t;
    for(int i=0;i<=h-t+1;i++){
      for(int j=0;j<=w-s+1;j++){
	int cnt=0;
	for(int k=0;k<t;k++){
	  for(int l=0;l<s;l++){
	    if(d[k+i][l+j]==1)cnt++;
	  }
	}
	maxi=max(maxi,cnt);
      }
    }
    cout<<maxi<<endl;
  }
  return 0;
}
int main(){
  int n;
  while(1){
    cin>>n;
    if(n==0)break;
    int w,h;
    cin>>w>>h;
    int d[101][101];
    for(int i=0;i<101;i++)for(int j=0;j<101;j++)d[i][j]=0;
    
    for(int i=0;i<n;i++){
      int x,y;
      cin>>x>>y;
      d[y][x]=1;
    }

    if(debug){
      for(int i=0;i<=h;i++){
	for(int j=0;j<=w;j++){
	  cout<<d[i][j]<<" ";
	}
	cout<<endl;
      }
    }
    
    int maxi=0;
    int s,t;
    cin>>s>>t;
    for(int i=0;i<=h-t+1;i++){
      for(int j=0;j<=w-s+1;j++){
	int cnt=0;
	for(int k=0;k<t;k++){
	  for(int l=0;l<s;l++){
	    if(d[k+i][l+j]==1)cnt++;
	  }
	}
	maxi=max(maxi,cnt);
      }
    }
    cout<<maxi<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin>>n;
      |     ^~~
a.cc:18:8: error: 'debug' was not declared in this scope
   18 |     if(debug){
      |        ^~~~~
a.cc:21:11: error: 'cout' was not declared in this scope
   21 |           cout<<d[i][j]<<" ";
      |           ^~~~
a.cc:23:9: error: 'cout' was not declared in this scope
   23 |         cout<<endl;
      |         ^~~~
a.cc:23:15: error: 'endl' was not declared in this scope
   23 |         cout<<endl;
      |               ^~~~
a.cc:38:14: error: 'max' was not declared in this scope; did you mean 'maxi'?
   38 |         maxi=max(maxi,cnt);
      |              ^~~
      |              maxi
a.cc:41:5: error: 'cout' was not declared in this scope
   41 |     cout<<maxi<<endl;
      |     ^~~~
a.cc:41:17: error: 'endl' was not declared in this scope
   41 |     cout<<maxi<<endl;
      |                 ^~~~
a.cc: At global scope:
a.cc:45:5: error: redefinition of 'int main()'
   45 | int main(){
      |     ^~~~
a.cc:2:5: note: 'int main()' previously defined here
    2 | int main(){
      |     ^~~~
a.cc: In function 'int main()':
a.cc:48:5: error: 'cin' was not declared in this scope
   48 |     cin>>n;
      |     ^~~
a.cc:61:8: error: 'debug' was not declared in this scope
   61 |     if(debug){
      |        ^~~~~
a.cc:64:11: error: 'cout' was not declared in this scope
   64 |           cout<<d[i][j]<<" ";
      |           ^~~~
a.cc:66:9: error: 'cout' was not declared in this scope
   66 |         cout<<endl;
      |         ^~~~
a.cc:66:15: error: 'endl' was not declared in this scope
   66 |         cout<<endl;
      |               ^~~~
a.cc:81:14: error: 'max' was not declared in this scope; did you mean 'maxi'?
   81 |         maxi=max(maxi,cnt);
      |              ^~~
      |              maxi
a.cc:84:5: error: 'cout' was not declared in this scope
   84 |     cout<<maxi<<endl;
      |     ^~~~
a.cc:84:17: error: 'endl' was not declared in this scope
   84 |     cout<<maxi<<endl;
      |                 ^~~~