Language: C++

#include<bits/stdc++.h>
 
#define REP(i,s,N) for (int i=s;i<(N); ++i)
#define ALL(x) (x).begin(), (x).end()
typedef long long ll;
using namespace std;


int main(){
	ll int A,B,M;
	cin >> A >> B >> M;
	vector<ll int> a(A);
	vector<ll int> b(B);
	REP(i,0,A){
		cin >> a.at(i);
	}
	REP(i,0,B){
		cin >> b.at(i);
	}
	
	vector<pair<ll int,ll int>> xy(M);
	vector<ll int> c(M);
	REP(i,0,M){
		ll int x_tmp,y_tmp,c_tmp;
		cin >> x_tmp >> y_tmp >> c_tmp;
		xy.at(i) = make_pair(x_tmp,y_tmp);
		c.at(i) = c_tmp;
	}
	
	vector<ll int> sum(N*N);
	REP(i,0,N){
		REP(j,0,N){
			sum.at(i*N+j) = a.at(i) + b.at(j);
			REP(k,0,M){
				if(xy.at(k).first == a.at(i) && xy.at(k) == b.at(j)){
					sum.at(i*N+j) -= c.at(k);
				}
			}
		}
	}
	sort(sum.begin(),sum.end());
	
	cout << sum.at(0) << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: two or more data types in declaration of 'A'
   10 |         ll int A,B,M;
      |         ^~
a.cc:10:9: error: two or more data types in declaration of 'B'
a.cc:10:9: error: two or more data types in declaration of 'M'
a.cc:11:16: error: 'A' was not declared in this scope
   11 |         cin >> A >> B >> M;
      |                ^
a.cc:11:21: error: 'B' was not declared in this scope
   11 |         cin >> A >> B >> M;
      |                     ^
a.cc:11:26: error: 'M' was not declared in this scope
   11 |         cin >> A >> B >> M;
      |                          ^
a.cc:12:16: error: two or more data types in declaration of 'type name'
   12 |         vector<ll int> a(A);
      |                ^~
a.cc:12:22: error: template argument 1 is invalid
   12 |         vector<ll int> a(A);
      |                      ^
a.cc:12:22: error: template argument 2 is invalid
a.cc:13:16: error: two or more data types in declaration of 'type name'
   13 |         vector<ll int> b(B);
      |                ^~
a.cc:13:22: error: template argument 1 is invalid
   13 |         vector<ll int> b(B);
      |                      ^
a.cc:13:22: error: template argument 2 is invalid
a.cc:15:26: error: request for member 'at' in 'a', which is of non-class type 'int'
   15 |                 cin >> a.at(i);
      |                          ^~
a.cc:18:26: error: request for member 'at' in 'b', which is of non-class type 'int'
   18 |                 cin >> b.at(i);
      |                          ^~
a.cc:21:21: error: two or more data types in declaration of 'type name'
   21 |         vector<pair<ll int,ll int>> xy(M);
      |                     ^~
a.cc:21:28: error: two or more data types in declaration of 'type name'
   21 |         vector<pair<ll int,ll int>> xy(M);
      |                            ^~
a.cc:21:31: error: template argument 1 is invalid
   21 |         vector<pair<ll int,ll int>> xy(M);
      |                               ^~~
a.cc:21:31: error: template argument 2 is invalid
a.cc:21:34: error: template argument 1 is invalid
   21 |         vector<pair<ll int,ll int>> xy(M);
      |                                  ^~
a.cc:21:34: error: template argument 2 is invalid
a.cc:22:16: error: two or more data types in declaration of 'type name'
   22 |         vector<ll int> c(M);
      |                ^~
a.cc:22:22: error: template argument 1 is invalid
   22 |         vector<ll int> c(M);
      |                      ^
a.cc:22:22: error: template argument 2 is invalid
a.cc:24:17: error: two or more data types in declaration of 'x_tmp'
   24 |                 ll int x_tmp,y_tmp,c_tmp;
      |                 ^~
a.cc:24:17: error: two or more data types in declaration of 'y_tmp'
a.cc:24:17: error: two or more data types in declaration of 'c_tmp'
a.cc:25:24: error: 'x_tmp' was not declared in this scope
   25 |                 cin >> x_tmp >> y_tmp >> c_tmp;
      |                        ^~~~~
a.cc:25:33: error: 'y_tmp' was not declared in this scope
   25 |                 cin >> x_tmp >> y_tmp >> c_tmp;
      |                                 ^~~~~
a.cc:25:42: error: 'c_tmp' was not declared in this scope
   25 |                 cin >> x_tmp >> y_tmp >> c_tmp;
      |                                          ^~~~~
a.cc:26:20: error: request for member 'at' in 'xy', which is of non-class type 'int'
   26 |                 xy.at(i) = make_pair(x_tmp,y_tmp);
      |                    ^~
a.cc:27:19: error: request for member 'at' in 'c', which is of non-class type 'int'
   27 |                 c.at(i) = c_tmp;
      |                   ^~
a.cc:30:16: error: two or more data types in declaration of 'type name'
   30 |         vector<ll int> sum(N*N);
      |                ^~
a.cc:30:22: error: template argument 1 is invalid
   30 |         vector<ll int> sum(N*N);
      |                      ^
a.cc:30:22: error: template argument 2 is invalid
a.cc:30:28: error: 'N' was not declared in this scope
   30 |         vector<ll int> sum(N*N);
      |                            ^
a.cc:33:29: error: request for member 'at' in 'sum', which is of non-class type 'int'
   33 |                         sum.at(i*N+j) = a.at(i) + b.at(j);
      |                             ^~
a.cc:33:43: error: request for member 'at' in 'a', which is of non-class type 'int'
   33 |                         sum.at(i*N+j) = a.at(i) + b.at(j);
      |                                           ^~
a.cc:33:53: error: request for member 'at' in 'b', which is of non-class type 'int'
   33 |                         sum.at(i*N+j) = a.at(i) + b.at(j);
      |                                                     ^~
a.cc:35:39: error: request for member 'at' in 'xy', which is of non-class type 'int'
   35 |                                 if(xy.at(k).first == a.at(i) && xy.at(k) == b.at(j)){
      |                                       ^~
a.cc:35:56: error: request for member 'at' in 'a', which is of non-class type 'int'
   35 |                                 if(xy.at(k).first == a.at(i) && xy.at(k) == b.at(j)){
      |                                                        ^~
a.cc:35:68: error: request for member 'at' in 'xy', which is of non-class type 'int'
   35 |                                 if(xy.at(k).first == a.at(i) && xy.at(k) == b.at(j)){
      |                                                                    ^~
a.cc:35:79: error: request for member 'at' in 'b', which is of non-class type 'int'
   35 |                                 if(xy.at(k).first == a.at(i) && xy.at(k) == b.at(j)){
      |                                                                               ^~
a.cc:36:45: error: request for member 'at' in 'sum', which is of non-class type 'int'
   36 |                                         sum.at(i*N+j) -= c.at(k);
      |                                             ^~
a.cc:36:60: error: request for member 'at' in 'c', which is of non-class type 'int'
   36 |                                         sum.at(i*N+j) -= c.at(k);
      |                                                            ^~
a.cc:41:18: error: request for member 'begin' in 'sum', which is of non-class type 'int'
   41 |         sort(sum.begin(),sum.end());
      |                  ^~~~~
a.cc:41:30: error: request for member 'end' in 'sum', which is of non-class type 'int'
   41 |         sort(sum.begin(),sum.end());
      |                              ^~~
a.cc:43:21: error: request for member 'at' in 'sum', which is of non-class type 'int'
   43 |         cout << sum.at(0) << endl;
      |                     ^~