Language: C++

#include/bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using  namespace std;

int absolute_value(int n){
  if(n >= 0) return n;
  if(n < 0) return -n;
}

int main(){
  int N,M;
  cin >> N >> M;
  vector<vector<int>> student(N, vector<int>(2));
  vector<vector<int>> check_point(N, vector<int>(2));
  rep(i, N){
    cin >> student[i][0] >> student[i][1];
  }
  rep(i, M){
    cin >> check_point[i][0] >>check_point[i][1];
  }
  
  rep(i, N){    
    int min_d = 0;
    int P;
    rep(j, M){     
      int d;
      d = absolute_value(student[i][0]-check_point[j][0]) + absolute_value(student[i][1]-check_point[j][1]);
      if(d < min_d){
        min_d = d;
        P = i+1
      }
    }
    cout << P << endl;
  }
}
      
      
  

Compiler output:
a.cc:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include/bits/stdc++.h>
      |         ^
a.cc: In function 'int main()':
a.cc:12:3: error: 'cin' was not declared in this scope
   12 |   cin >> N >> M;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #include/bits/stdc++.h>
a.cc:13:3: error: 'vector' was not declared in this scope
   13 |   vector<vector<int>> student(N, vector<int>(2));
      |   ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | #include/bits/stdc++.h>
a.cc:13:17: error: expected primary-expression before 'int'
   13 |   vector<vector<int>> student(N, vector<int>(2));
      |                 ^~~
a.cc:14:17: error: expected primary-expression before 'int'
   14 |   vector<vector<int>> check_point(N, vector<int>(2));
      |                 ^~~
a.cc:16:12: error: 'student' was not declared in this scope
   16 |     cin >> student[i][0] >> student[i][1];
      |            ^~~~~~~
a.cc:19:12: error: 'check_point' was not declared in this scope
   19 |     cin >> check_point[i][0] >>check_point[i][1];
      |            ^~~~~~~~~~~
a.cc:27:26: error: 'student' was not declared in this scope
   27 |       d = absolute_value(student[i][0]-check_point[j][0]) + absolute_value(student[i][1]-check_point[j][1]);
      |                          ^~~~~~~
a.cc:27:40: error: 'check_point' was not declared in this scope
   27 |       d = absolute_value(student[i][0]-check_point[j][0]) + absolute_value(student[i][1]-check_point[j][1]);
      |                                        ^~~~~~~~~~~
a.cc:30:16: error: expected ';' before '}' token
   30 |         P = i+1
      |                ^
      |                ;
   31 |       }
      |       ~         
a.cc:33:5: error: 'cout' was not declared in this scope
   33 |     cout << P << endl;
      |     ^~~~
a.cc:33:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:33:18: error: 'endl' was not declared in this scope
   33 |     cout << P << endl;
      |                  ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #include/bits/stdc++.h>
a.cc: In function 'int absolute_value(int)':
a.cc:8:1: warning: control reaches end of non-void function [-Wreturn-type]
    8 | }
      | ^