Language: C++

#include<stdio.h>
#include<algorithm>
using namespace std; 
static const int MAX = 20000;

int main(){
	int R[MAX],n;
	
	cin >> n;
	for( int i=0; i < n; i++ ) cin >> R[i]???
	
	int maxv = R[1] - R[0]???
	int minv = R[0];
	
	for( int i=1; i < n; i++){
		if( ( R[i] - minv ) > maxv ) maxv = R[i] - minv;
		if( R[i] < minv ) minv = R[i];
	} 
	
	count << maxv << endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'cin' was not declared in this scope
    9 |         cin >> n;
      |         ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include<algorithm>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:10:48: error: expected primary-expression before '?' token
   10 |         for( int i=0; i < n; i++ ) cin >> R[i]???
      |                                                ^
a.cc:10:49: error: expected primary-expression before '?' token
   10 |         for( int i=0; i < n; i++ ) cin >> R[i]???
      |                                                 ^
a.cc:12:9: error: expected primary-expression before 'int'
   12 |         int maxv = R[1] - R[0]???
      |         ^~~
a.cc:10:50: error: expected ':' before 'int'
   10 |         for( int i=0; i < n; i++ ) cin >> R[i]???
      |                                                  ^
      |                                                  :
   11 | 
   12 |         int maxv = R[1] - R[0]???
      |         ~~~                                       
a.cc:12:9: error: expected primary-expression before 'int'
   12 |         int maxv = R[1] - R[0]???
      |         ^~~
a.cc:10:50: error: expected ':' before 'int'
   10 |         for( int i=0; i < n; i++ ) cin >> R[i]???
      |                                                  ^
      |                                                  :
   11 | 
   12 |         int maxv = R[1] - R[0]???
      |         ~~~                                       
a.cc:12:9: error: expected primary-expression before 'int'
   12 |         int maxv = R[1] - R[0]???
      |         ^~~
a.cc:10:50: error: expected ':' before 'int'
   10 |         for( int i=0; i < n; i++ ) cin >> R[i]???
      |                                                  ^
      |                                                  :
   11 | 
   12 |         int maxv = R[1] - R[0]???
      |         ~~~                                       
a.cc:12:9: error: expected primary-expression before 'int'
   12 |         int maxv = R[1] - R[0]???
      |         ^~~
a.cc:16:30: error: 'minv' was not declared in this scope
   16 |                 if( ( R[i] - minv ) > maxv ) maxv = R[i] - minv;
      |                              ^~~~
a.cc:16:39: error: 'maxv' was not declared in this scope
   16 |                 if( ( R[i] - minv ) > maxv ) maxv = R[i] - minv;
      |                                       ^~~~
a.cc:17:28: error: 'minv' was not declared in this scope
   17 |                 if( R[i] < minv ) minv = R[i];
      |                            ^~~~
a.cc:20:18: error: 'maxv' was not declared in this scope
   20 |         count << maxv << endl;
      |                  ^~~~
a.cc:20:26: error: 'endl' was not declared in this scope
   20 |         count << maxv << endl;
      |                          ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include<algorithm>
  +++ |+#include <ostream>
    3 | using namespace std;