Language: C++

// Atcoder 176 ABC
// A

/*#include <iostream>
using namespace std;
#define ll long long
#define M 1000000007
int main(){
	int n , x, t;
	cin>>n>>x;
	cin>>t;
	if(n%x == 0){
		cout << (n/x)*t << endl;
	}
	else{
		cout << (n/x + 1)*t << endl;
	}
	return 0;

}
*/
/*
// B
#include <iostream>
using namespace std;
#define ll unsigned long long
#define M 1000000007
#define int t; cin>>t; while(t--)
#include <cstring>
// See limits once 
// 0≤N<10^200000
ll digit(string s, ll n){
	ll sum = 0;
	for(int i = 0; i < s.size(); i++){
		sum+=s[i]-'0';
	}
	return sum;
}
int main(){
string s;
cin>>s;
ll n = s.size();
ll ans = digit(s, n);
if(ans == 0){
	cout << "Yes" << endl;
	return 0;
}
if(ans%3 == 0 && ans&1){
	cout << "Yes" <<endl;
}
else{
	cout << "No" << endl;
}
	return 0;
}

*/
#include <iostream>
using namespace std;
#define ll  long long
#define M 1000000007
#define int t; cin>>t; while(t--)
#include <cstring>

ll stoolHeight(ll height[], int n){
	ll stool = 0;
	if( n == 1){
		return 0;
	}
	for(int i = 1; i < n; i++){
		if(height[i] < height[i-1]){
			stool+=height[i-1] - height[i];
			height[i] = height[i-1]; 
		}
	}
}
int main(){

	int n;
	cin>>n;
	ll height[n];
	for(int i = 0; i < n; i++){
		cin>>arr[i];
	}
	cout << stoolHeight(height, n) << endl;
}

















Compiler output:
a.cc:62:13: error: 't' has not been declared
   62 | #define int t; cin>>t; while(t--)
      |             ^
a.cc:62:14: error: expected ')' before ';' token
   62 | #define int t; cin>>t; while(t--)
      |              ^
In file included from /usr/include/c++/14/cstring:43,
                 from a.cc:63:
/usr/include/string.h:54:22: note: to match this '('
   54 | extern void *memccpy (void *__restrict __dest, const void *__restrict __src,
      |                      ^
a.cc:62:16: error: 'cin' does not name a type
   62 | #define int t; cin>>t; while(t--)
      |                ^~~
a.cc:62:24: error: expected unqualified-id before 'while'
   62 | #define int t; cin>>t; while(t--)
      |                        ^~~~~
a.cc:62:13: error: 't' has not been declared
   62 | #define int t; cin>>t; while(t--)
      |             ^
a.cc:62:14: error: expected ')' before ';' token
   62 | #define int t; cin>>t; while(t--)
      |              ^
/usr/include/string.h:61:21: note: to match this '('
   61 | extern void *memset (void *__s, int __c, size_t __n) __THROW __nonnull ((1));
      |                     ^
a.cc:62:16: error: 'cin' does not name a type
   62 | #define int t; cin>>t; while(t--)
      |                ^~~
a.cc:62:24: error: expected unqualified-id before 'while'
   62 | #define int t; cin>>t; while(t--)
      |                        ^~~~~
a.cc:62:13: error: 't' does not name a type; did you mean 'tm'?
   62 | #define int t; cin>>t; while(t--)
      |             ^
a.cc:62:16: error: 'cin' does not name a type
   62 | #define int t; cin>>t; while(t--)
      |                ^~~
a.cc:62:24: error: expected unqualified-id before 'while'
   62 | #define int t; cin>>t; while(t--)
      |                        ^~~~~
a.cc:62:13: error: 't' does not name a type; did you mean 'tm'?
   62 | #define int t; cin>>t; while(t--)
      |             ^
a.cc:62:16: error: 'cin' does not name a type
   62 | #define int t; cin>>t; while(t--)
      |                ^~~
a.cc:62:24: error: expected unqualified-id before 'while'
   62 | #define int t; cin>>t; while(t--)
      |                        ^~~~~
a.cc:62:13: error: 't' has not been declared
   62 | #define int t; cin>>t; while(t--)
      |             ^
a.cc:62:14: error: expected ')' before ';' token
   62 | #define int t; cin>>t; while(t--)
      |              ^
/usr/include/string.h:87:21: note: to match this '('
   87 | extern void *memchr (void *__s, int __c, size_t __n)
      |                     ^
a.cc:62:16: error: 'cin' does not name a type
   62 | #define int t; cin>>t; while(t--)
      |                ^~~
a.cc:62:24: error: expected unqualified-id before 'while'
   62 | #define int t; cin>>t; while(t--)
      |                        ^~~~~
a.cc:62:13: error: 't' has not been declared
   62 | #define int t; cin>>t; while(t--)
      |             ^
a.cc:62:14: error: expected ')' before ';' token
   62 | #define int t; cin>>t; while(t--)
      |              ^
/usr/include/string.h:89:27: note: to match this '('
   89 | extern const void *memchr (const void *__s, int __c, size_t __n)
      |                           ^
a.cc:62:16: error: 'cin' does not name a type
   62 | #define int t; cin>>t; while(t--)
      |                ^~~
a.cc:62:24: error: expected unqualified-id before 'while'
   62 | #define int t; cin>>t; while(t--)
      |                        ^~~~~
a.cc:62:13: error: 't' has not been declared
   62 | #define int t; cin>>t; while(t--)
      |             ^
a.cc:62:14: error: expected ')' before ';' token
   62 | #define int t; cin>>t; while(t--)
      |              ^
/usr/include/string.h:115:30: note: to match this '('
  115 | extern "C++" void *rawmemchr (void *__s, int __c)
      |                              ^
a.cc:62:16: error: 'cin' does not name a type
   62 | #define int t; cin>>t; while(t--)
      |                ^~~
a.cc:62:24: error: expected unqualified-id before 'while'
   62 | #define int t; cin>>t; while(t--)
      |                        ^~~~~
a.cc:62:13: error: 't' has not been declared
   62 | #define int t; cin>>t; while(t--)
      |             ^
a.cc:62:14: error: expected ')' before ';' token
   62 | #define int t; cin>>t; while(t--)
      |              ^
/usr/include/string.h:117:36: note: to match this '('
  117 | extern "C++" const void *rawmemchr (const void *__s, int __c)
      |                                    ^
a.cc:62:16: error: 'cin' does not name a type
   62 | #define int t; cin>>t; while(t--)
      |                ^~~
a.cc:62:24: error: expected unqualified-id before 'while'
   62 | #define int t; cin>>t; while(t--)
      |                        ^~~~~
a.cc:62:13: error: 't' has not been declared
   62 | #define int t; cin>>t; while(t--)
      |             ^
a.cc:62:14: error: expected ')' before ';' token
   62 | #define int t; cin>>t; while(t--)
      |              ^
/usr/include/string.h:126:28: note: to match this '('
  126 | extern "C++" void *memrchr (void *__s, int __c, size_t __n)
      |                            ^
a.cc:62:16: error: 'cin' does not name a type
   62 | #define int t; cin>>t; while(t--)
      |                ^~~
a.cc:62:24: error: expected unqualified-id before 'while'
   62 | #define int t; cin>>t; while(t--)
      |                        ^~~~~
a.cc:62:13: error: 't' has not been declared
   62 | #define int t; cin>>t; while(t--)
      |             ^
a.cc:62:14: error: expected ')' before ';' token
   62 | #define int t; cin>>t; while(t--)
      |              ^
/usr/include/string.h:129:34: note: to match this '('
  129 | extern "C++" const void *memrchr (const void *__s, int __c, size_t __n)
      |                                  ^
a.cc:62:16: error: 'cin' does not name a type
   62 | #define int t; cin>>t; while(t--)
      |                ^~~
a.cc:62:24: error: expected unqualified-id before 'while'
   62 | #define int t; cin>>t; while(t--)
      |                        ^~~~~
a.cc:62:13: error: 't' does not name a type; did you mean 'tm'?
   62 | #define int t; cin>>t; while(t--)
      |             ^
a.cc:62:16: error: 'cin' does not name a type
   62 | #define int t; cin>>t; while(t--)
      |                ^~~
a.cc:62:24: error: expected unqualified-id before 'while'
   62 | #define int t; cin>>t; while(t--)
      |                        ^~~~~
a.cc:62:13: error: 't' does not name a type; did you mean 'tm'?
   62 | #define int t; cin>>t; while(t--)
      |             ^
a.cc:62:16: error: 'cin' does not name a type
   62 | #define int t; cin>>t; while(t--)
      |                ^~~
a.cc:62:24: error: expected unqualified-id before 'while'
   62 | #define int t; cin>>t; while(t--)
      |                        ^~~~~
a.cc:62:13: error: 't' does not name a type; did you mean 'tm'?
   62 | #define int t; cin>>t; while(t--)
      |             ^
a.cc:62:16: error: 'cin' does not name a type
   62 | #define int t; cin>>t; while(t--)
      |                ^~~
a.cc:62:24: error: expected unqualified-id before 'while'
   62 | #define int t; cin>>t; while(t--)
      |                        ^~~~~
a.cc:62:13: error: 't' does not name a type; did you mean 'tm'?
   62 | #define int t; cin>>t; while(t--)
      |             ^
a.cc:62:16: error: 'cin' does not name a type
   62 | #define int t; cin>>t; while(t--)
      |                ^~~
a.cc:62:24: error: expected unqualified-id before 'while'
   62 | #define int t; cin>>t; while(t--)
      |                        ^~~~~
a.cc:62:13: error: 't' has not been declared
   62 | #define int t; cin>>t; while(t--)
      |             ^
a.cc:62:14: error: expected ')' before ';' token
   62 | #define int t; cin>>t; while(t--)
      |              ^
/usr/include/string.h:226:21: note: to match this '('
  226 | extern char *strchr (char *__s, int __c)
      |                     ^
a.cc:62:16: error: 'cin' does not name a type
   62 | #define int t; cin>>t; while(t--)
      |                ^~~
a.cc:62:24: error: expected unqualified-id before 'while'
   62 | #define int t; cin>>t; while(t--)
      |                        ^~~~~
a.cc:62:13: error: 't' has not been declared
   62 | #define int t; cin>>t; while(t--)
      |             ^
a.cc:62:14: error: expected ')' before ';' token
   62 | #define int t; cin>>t; while(t--)
      |              ^
/usr/include/string.h:228:27: note: to match this '('
  228 | extern const char *strchr (const char *__s, int __c)
      |                           ^
a.cc:62:16: error: 'cin' does not name a type
   62 | #define int t; cin>>t; while(t--)
      |                ^~~
a.cc:62:24: error: expected unqualified-id before 'while'
   62 | #define int t; cin>>t; while(t--)
      |                        ^~~~~
a.cc:62:13: error: 't' has not been declared
   62 | #define int t; cin>>t; while(t--)
      |             ^
a.cc:62:14: error: expected ')' before ';' token
   62 | #define int t; cin>>t; while(t--)
      |              ^
/usr/include/string.h:253:22: note: to match this '('
  253 | extern char *strrchr (char *__s, int __c)
      |                      ^
a.cc:62:16: error: 'cin' does not name a type
   62 | #define int t; cin>>t; while(t--)
      |                ^~~
a.cc:62:24: error: expected unqualified-id before 'while'
   62 | #define int t; cin>>t; while(t--)
      |                        ^~~~~
a.cc:62:13: error: 't' has not been declared
   62 | #define int t; cin>>t; while(t--)
      |             ^
a.cc:62:14: error: expected ')' before ';' token
   62 | #define int t; cin>>t; while(t--)
      |              ^
/usr/include/string.h:255:28: note: to match this '('
  255 | extern const char *strrchr (const char *__s, int __c)
      |                            ^
a.cc:62:16: error: 'cin' does not name a type
   62 | #define int t; cin>>t; while(t--)
      |                ^~~
a.cc:62:24: error: expected unqualified-id before 'while'
   62 | #define int t; cin>>t; while(t--)
      |                        ^~~~~
a.cc:62:13: error: 't' has not been declared
   62 | #define int t; cin>>t; while(t--)
      |             ^
a.cc:62:14: error: expected ')' before ';' token
   62 | #define int t; cin>>t; while(t--)
      |              ^
/usr/include/string.h:281:30: note: to match this '('
  281 | extern "C++" char *