Language: C++

#include <algorithm>
#include <cmath>
#include <deque>
#include <iostream>
#include <numeric>
#include <queue>
#include <sstream>
#include <string>
#include <string.h>
#include <tuple>
#include <vector>

#define REP(i,x) for(int i{ 0 }; i < (int)(x); i++)
#define REPC(i,x) for(int i{ 0 }; i <= (int)(x); i++)
#define RREP(i,x) for(int i{ (int)(x) - 1 }; i >= 0 ;i--)
#define RREPC(i,x) for(int i{ (int)(x)}; i >= 0; i--)
#define REP1O(i,x) for(int i{ 1 }; i < (int)(x); i++)
#define REP1C(i,x) for(int i{ 1 }; i <= (int)(x); i++)

#define PB push_back
#define MP make_pair
#define F first
#define S second
#define SZ(x) ((int)(x).size())
#define ALL(x) (x).begin(),(x).end()

using namespace std;

typedef int64_t ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vector<int>> vvi;
typedef vector<vector<ll>> vvll;
typedef pair<int, int> pii;
typedef tuple<int, int, int> tupiii;
typedef tuple<ll, ll, ll> tuplll;

const int INTMAX = 2147483647;
const ll LLMAX = 9223372036854775807;
const int MOD = 1000000007;

template<class T> inline bool chmax(T& a, const T& b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, const T& b) { if (b < a) { a = b; return 1; } return 0; }
inline void swap(ll& a, ll& b) { a ^= b; b ^= a; a ^= b; }
inline void swap(int& a, int& b) { a ^= b; b ^= a; a ^= b; }



int main()
{
	int n;
	cin >> n;
	vi va(n);
	REP(i, n) cin >> va[i];

	int best = 10000000;
	REP1C(1, 100)
	{
		int tmp = 0;
		REP(i, n)
			tmp += (tmp - va[i]) * (tmp - va[i]);
		chmin(best, tmp);
	}

	cout << best << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:57:15: error: expected unqualified-id before numeric constant
   57 |         REP1C(1, 100)
      |               ^
a.cc:18:28: note: in definition of macro 'REP1C'
   18 | #define REP1C(i,x) for(int i{ 1 }; i <= (int)(x); i++)
      |                            ^
a.cc:57:15: error: expected ';' before numeric constant
   57 |         REP1C(1, 100)
      |               ^
a.cc:18:28: note: in definition of macro 'REP1C'
   18 | #define REP1C(i,x) for(int i{ 1 }; i <= (int)(x); i++)
      |                            ^
a.cc:18:29: error: expected ';' before '{' token
   18 | #define REP1C(i,x) for(int i{ 1 }; i <= (int)(x); i++)
      |                             ^
a.cc:57:9: note: in expansion of macro 'REP1C'
   57 |         REP1C(1, 100)
      |         ^~~~~
a.cc:18:29: error: expected primary-expression before '{' token
   18 | #define REP1C(i,x) for(int i{ 1 }; i <= (int)(x); i++)
      |                             ^
a.cc:57:9: note: in expansion of macro 'REP1C'
   57 |         REP1C(1, 100)
      |         ^~~~~
a.cc:18:29: error: expected ')' before '{' token
   18 | #define REP1C(i,x) for(int i{ 1 }; i <= (int)(x); i++)
      |                       ~     ^
a.cc:57:9: note: in expansion of macro 'REP1C'
   57 |         REP1C(1, 100)
      |         ^~~~~
a.cc:18:33: error: expected ';' before '}' token
   18 | #define REP1C(i,x) for(int i{ 1 }; i <= (int)(x); i++)
      |                                 ^
a.cc:57:9: note: in expansion of macro 'REP1C'
   57 |         REP1C(1, 100)
      |         ^~~~~
a.cc:57:15: error: lvalue required as increment operand
   57 |         REP1C(1, 100)
      |               ^
a.cc:18:51: note: in definition of macro 'REP1C'
   18 | #define REP1C(i,x) for(int i{ 1 }; i <= (int)(x); i++)
      |                                                   ^