Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <bitset>
#include <cmath>
#include <string>
#include <fstream>
#define FI first
#define SE second
#define VE vector<int>
#define PB push_back
#define PA pair<int,int>
#define MA make_pair
#define LL long long
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define ROF(i,a,b) for(int i=b-1;i>=a;i--)
#define YES(i) cout<<(i?"YES":"NO")<<endl
#define Yes(i) cout<<(i?"Yes":"No")<<endl
#define POS(i) cout<<(i?"POSSIBLE":"IMPOSSIBLE")<<endl
using namespace std;
//
const int INF=1e9+7;
const int MOD=1e9+7;
//
int main(){
    int n,k; cin>>n>>k;
    vector<PA> vx;
    vector<PA> vy;
    FOR(i,0,n){
        int x,y; cin>>x>>y;
        vx.PB(PA(x,i));
        vy.PB(PA(y,i));
    }
    vector<PA> vxc=vx;
    vector<PA> vyc=vy;
    sort(vx.begin(),vx.end());
    sort(vy.begin(),vy.end());
    FOR(i,0,n){
        int a=vx[i].SE;
        vxc[a].FI=i;
        a=vy[i].SE;
        vyc[a].FI=i;
    }
    int koshi[50][50]={0};
    FOR(i,0,n){
        koshi[vxc[i].FI+1][vyc[i].FI+1]++;
    }
    FOR(i,0,n+1){
        FOR(j,1,n+1){
            koshi[i][j]+=koshi[i][j-1];
        }
    }
    FOR(i,0,n+1){
        FOR(j,1,n+1){
            koshi[i][j]+=koshi[i-1][j];
        }
    }
    long int m=INF;
    FOR(xi,0,n+1){
        FOR(xj,0,n+1){
            FOR(yi,0,n+1){
                FOR(yj,0,n+1){
                    int t=koshi[xj][yj]-koshi[xi][yj]-koshi[xj][yi]+koshi[xi][yi];
                    if(xj-xi>0&&yj-yi>0&&t>=k&&m>(vxc)*(yj-yi+1)){
                        m=(xj-xi+1)*(yj-yi+1);
                    }
                }
            }
        }
    }
    cout<<m<<endl;
    return 0;
}#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <bitset>
#include <cmath>
#include <string>
#include <fstream>
#define FI first
#define SE second
#define VE vector<int>
#define PB push_back
#define PA pair<int,int>
#define MA make_pair
#define LL long long
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define ROF(i,a,b) for(int i=b-1;i>=a;i--)
#define YES(i) cout<<(i?"YES":"NO")<<endl
#define Yes(i) cout<<(i?"Yes":"No")<<endl
#define POS(i) cout<<(i?"POSSIBLE":"IMPOSSIBLE")<<endl
using namespace std;
//
const int INF=1e9+7;
const int MOD=1e9+7;
//
int main(){
    int n,k; cin>>n>>k;
    vector<PA> vx;
    vector<PA> vy;
    FOR(i,0,n){
        int x,y; cin>>x>>y;
        vx.PB(PA(x,i));
        vy.PB(PA(y,i));
    }
    vector<PA> vxc=vx;
    vector<PA> vyc=vy;
    sort(vx.begin(),vx.end());
    sort(vy.begin(),vy.end());
    FOR(i,0,n){
        int a=vx[i].SE;
        vxc[a].FI=i;
        a=vy[i].SE;
        vyc[a].FI=i;
    }
    int koshi[50][50]={0};
    FOR(i,0,n){
        koshi[vxc[i].FI+1][vyc[i].FI+1]++;
    }
    FOR(i,0,n+1){
        FOR(j,1,n+1){
            koshi[i][j]+=koshi[i][j-1];
        }
    }
    FOR(i,0,n+1){
        FOR(j,1,n+1){
            koshi[i][j]+=koshi[i-1][j];
        }
    }
    long int m=INF;
    FOR(xi,0,n+1){
        FOR(xj,0,n+1){
            FOR(yi,0,n+1){
                FOR(yj,0,n+1){
                    int t=koshi[xj][yj]-koshi[xi][yj]-koshi[xj][yi]+koshi[xi][yi];
                    if(xj-xi>0&&yj-yi>0&&t>=k&&m>(vxc)*(yj-yi+1)){
                        m=(xj-xi+1)*(yj-yi+1);
                    }
                }
            }
        }
    }
    cout<<m<<endl;
    return 0;
}

Compiler output:
a.cc:75:2: error: stray '#' in program
   75 | }#include <iostream>
      |  ^
a.cc: In function 'int main()':
a.cc:66:55: error: no match for 'operator*' (operand types are 'std::vector<std::pair<int, int> >' and 'int')
   66 |                     if(xj-xi>0&&yj-yi>0&&t>=k&&m>(vxc)*(yj-yi+1)){
      |                                                  ~~~~~^~~~~~~~~~
      |                                                   |          |
      |                                                   |          int
      |                                                   std::vector<std::pair<int, int> >
a.cc: At global scope:
a.cc:75:3: error: 'include' does not name a type
   75 | }#include <iostream>
      |   ^~~~~~~
a.cc:98:11: error: redefinition of 'const int INF'
   98 | const int INF=1e9+7;
      |           ^~~
a.cc:24:11: note: 'const int INF' previously defined here
   24 | const int INF=1e9+7;
      |           ^~~
a.cc:99:11: error: redefinition of 'const int MOD'
   99 | const int MOD=1e9+7;
      |           ^~~
a.cc:25:11: note: 'const int MOD' previously defined here
   25 | const int MOD=1e9+7;
      |           ^~~
a.cc:101:5: error: redefinition of 'int main()'
  101 | int main(){
      |     ^~~~
a.cc:27:5: note: 'int main()' previously defined here
   27 | int main(){
      |     ^~~~
a.cc: In function 'int main()':
a.cc:140:55: error: no match for 'operator*' (operand types are 'std::vector<std::pair<int, int> >' and 'int')
  140 |                     if(xj-xi>0&&yj-yi>0&&t>=k&&m>(vxc)*(yj-yi+1)){
      |                                                  ~~~~~^~~~~~~~~~
      |                                                   |          |
      |                                                   |          int
      |                                                   std::vector<std::pair<int, int> >