Language: C++

#pragma GCC optimize ("Ofast")

#pragma GCC target ("avx2,tune=native") #include <bits/stdc++.h>

using namespace std;

int main() { ios_base::sync_with_stdio(false); cin.tie(0); int N; cin >> N; int x[N], y[N], h[N], height, expected; for (int i = 0; i < N; i++) { 	cin >> x[i] >> y[i] >> h[i]; if(h[i]) height = h[i] + abs(x[i] - i) + abs(y[i] - j);} for (int i = 0; i <= 100; i++) { 	for (int j = 0; j <= 100; j++) { 		int k; 		for (k = 1; k < N; k++) { 			expected = max(height - abs(x[k] - i) - abs(y[k] - j), 0); 			if (h[k] != expected) break; 		} 		if (k == N) { 			cout << i << ' ' << j << ' ' << height; 			exit(EXIT_SUCCESS); 		} 	} } return 0; }

Compiler output:
a.cc:3:41: error: stray '#' in program
    3 | #pragma GCC target ("avx2,tune=native") #include <bits/stdc++.h>
      |                                         ^
a.cc:3:42: error: '#pragma GCC target' string is badly formed
    3 | #pragma GCC target ("avx2,tune=native") #include <bits/stdc++.h>
      |                                          ^~~~~~~
a.cc:3:42: error: '#pragma GCC target' string is badly formed
a.cc: In function 'int main()':
a.cc:7:14: error: 'ios_base' has not been declared
    7 | int main() { ios_base::sync_with_stdio(false); cin.tie(0); int N; cin >> N; int x[N], y[N], h[N], height, expected; for (int i = 0; i < N; i++) {       cin >> x[i] >> y[i] >> h[i]; if(h[i]) height = h[i] + abs(x[i] - i) + abs(y[i] - j);} for (int i = 0; i <= 100; i++) {  for (int j = 0; j <= 100; j++) {                int k;          for (k = 1; k < N; k++) {                       expected = max(height - abs(x[k] - i) - abs(y[k] - j), 0);                      if (h[k] != expected) break;            }               if (k == N) {                   cout << i << ' ' << j << ' ' << height;                         exit(EXIT_SUCCESS);             }       } } return 0; }
      |              ^~~~~~~~
a.cc:7:48: error: 'cin' was not declared in this scope
    7 | int main() { ios_base::sync_with_stdio(false); cin.tie(0); int N; cin >> N; int x[N], y[N], h[N], height, expected; for (int i = 0; i < N; i++) {       cin >> x[i] >> y[i] >> h[i]; if(h[i]) height = h[i] + abs(x[i] - i) + abs(y[i] - j);} for (int i = 0; i <= 100; i++) {  for (int j = 0; j <= 100; j++) {                int k;          for (k = 1; k < N; k++) {                       expected = max(height - abs(x[k] - i) - abs(y[k] - j), 0);                      if (h[k] != expected) break;            }               if (k == N) {                   cout << i << ' ' << j << ' ' << height;                         exit(EXIT_SUCCESS);             }       } } return 0; }
      |                                                ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #pragma GCC optimize ("Ofast")
a.cc:7:207: error: 'abs' was not declared in this scope
    7 | int main() { ios_base::sync_with_stdio(false); cin.tie(0); int N; cin >> N; int x[N], y[N], h[N], height, expected; for (int i = 0; i < N; i++) {       cin >> x[i] >> y[i] >> h[i]; if(h[i]) height = h[i] + abs(x[i] - i) + abs(y[i] - j);} for (int i = 0; i <= 100; i++) {  for (int j = 0; j <= 100; j++) {                int k;          for (k = 1; k < N; k++) {                       expected = max(height - abs(x[k] - i) - abs(y[k] - j), 0);                      if (h[k] != expected) break;            }               if (k == N) {                   cout << i << ' ' << j << ' ' << height;                         exit(EXIT_SUCCESS);             }       } } return 0; }
      |                                                                                                                                                                                                               ^~~
a.cc:7:234: error: 'j' was not declared in this scope
    7 | int main() { ios_base::sync_with_stdio(false); cin.tie(0); int N; cin >> N; int x[N], y[N], h[N], height, expected; for (int i = 0; i < N; i++) {       cin >> x[i] >> y[i] >> h[i]; if(h[i]) height = h[i] + abs(x[i] - i) + abs(y[i] - j);} for (int i = 0; i <= 100; i++) {  for (int j = 0; j <= 100; j++) {                int k;          for (k = 1; k < N; k++) {                       expected = max(height - abs(x[k] - i) - abs(y[k] - j), 0);                      if (h[k] != expected) break;            }               if (k == N) {                   cout << i << ' ' << j << ' ' << height;                         exit(EXIT_SUCCESS);             }       } } return 0; }
      |                                                                                                                                                                                                                                          ^
a.cc:7:409: error: 'abs' was not declared in this scope
    7 | int main() { ios_base::sync_with_stdio(false); cin.tie(0); int N; cin >> N; int x[N], y[N], h[N], height, expected; for (int i = 0; i < N; i++) {       cin >> x[i] >> y[i] >> h[i]; if(h[i]) height = h[i] + abs(x[i] - i) + abs(y[i] - j);} for (int i = 0; i <= 100; i++) {  for (int j = 0; j <= 100; j++) {                int k;          for (k = 1; k < N; k++) {                       expected = max(height - abs(x[k] - i) - abs(y[k] - j), 0);                      if (h[k] != expected) break;            }               if (k == N) {                   cout << i << ' ' << j << ' ' << height;                         exit(EXIT_SUCCESS);             }       } } return 0; }
      |                                                                                                                                                                                                                                                                                                                                                                                                                         ^~~
a.cc:7:396: error: 'max' was not declared in this scope
    7 | int main() { ios_base::sync_with_stdio(false); cin.tie(0); int N; cin >> N; int x[N], y[N], h[N], height, expected; for (int i = 0; i < N; i++) {       cin >> x[i] >> y[i] >> h[i]; if(h[i]) height = h[i] + abs(x[i] - i) + abs(y[i] - j);} for (int i = 0; i <= 100; i++) {  for (int j = 0; j <= 100; j++) {                int k;          for (k = 1; k < N; k++) {                       expected = max(height - abs(x[k] - i) - abs(y[k] - j), 0);                      if (h[k] != expected) break;            }               if (k == N) {                   cout << i << ' ' << j << ' ' << height;                         exit(EXIT_SUCCESS);             }       } } return 0; }
      |                                                                                                                                                                                                                                                                                                                                                                                                            ^~~
a.cc:7:553: error: 'cout' was not declared in this scope
    7 | int main() { ios_base::sync_with_stdio(false); cin.tie(0); int N; cin >> N; int x[N], y[N], h[N], height, expected; for (int i = 0; i < N; i++) {       cin >> x[i] >> y[i] >> h[i]; if(h[i]) height = h[i] + abs(x[i] - i) + abs(y[i] - j);} for (int i = 0; i <= 100; i++) {  for (int j = 0; j <= 100; j++) {                int k;          for (k = 1; k < N; k++) {                       expected = max(height - abs(x[k] - i) - abs(y[k] - j), 0);                      if (h[k] != expected) break;            }               if (k == N) {                   cout << i << ' ' << j << ' ' << height;                         exit(EXIT_SUCCESS);             }       } } return 0; }
      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         ^~~~
a.cc:7:553: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:7:622: error: 'EXIT_SUCCESS' was not declared in this scope
    7 | int main() { ios_base::sync_with_stdio(false); cin.tie(0); int N; cin >> N; int x[N], y[N], h[N], height, expected; for (int i = 0; i < N; i++) {       cin >> x[i] >> y[i] >> h[i]; if(h[i]) height = h[i] + abs(x[i] - i) + abs(y[i] - j);} for (int i = 0; i <= 100; i++) {  for (int j = 0; j <= 100; j++) {                int k;          for (k = 1; k < N; k++) {                       expected = max(height - abs(x[k] - i) - abs(y[k] - j), 0);                      if (h[k] != expected) break;            }               if (k == N) {                   cout << i << ' ' << j << ' ' << height;                         exit(EXIT_SUCCESS);             }       } } return 0; }
      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ^~~~~~~~~~~~
a.cc:1:1: note: 'EXIT_SUCCESS' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
  +++ |+#include <cstdlib>
    1 | #pragma GCC optimize ("Ofast")
a.cc:7:617: error: 'exit' was not declared in this scope
    7 | int main() { ios_base::sync_with_stdio(false); cin.tie(0); int N; cin >> N; int x[N], y[N], h[N], height, expected; for (int i = 0; i < N; i++) {       cin >> x[i] >> y[i] >> h[i]; if(h[i]) height = h[i] + abs(x[i] - i) + abs(y[i] - j);} for (int i = 0; i <= 100; i++) {  for (int j = 0; j <= 100; j++) {                int k;          for (k = 1; k < N; k++) {                       expected = max(height - abs(x[k] - i) - abs(y[k] - j), 0);                      if (h[k] != expected) break;            }               if (k == N) {                   cout << i << ' ' << j << ' ' << height;                         exit(EXIT_SUCCESS);             }       } } return 0; }
      |