Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
static const int MAX = 200000;

int main(){
  int n;
  int R[MAX];

  cin >> n;
  for (int i = 0, i < n, i++) cin >> R[i];

  int maxv = -2000000000;
  int minv = R[0];

  for (int i = 1, i < n, i++){
    maxv = max(maxv, R[i] - minv)???
    minv = min(minv, R[i])???
  }

  cout << maxv << endl;

  return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:20: error: expected ';' before '<' token
   11 |   for (int i = 0, i < n, i++) cin >> R[i];
      |                    ^~
      |                    ;
a.cc:11:21: error: expected primary-expression before '<' token
   11 |   for (int i = 0, i < n, i++) cin >> R[i];
      |                     ^
a.cc:11:29: error: expected ';' before ')' token
   11 |   for (int i = 0, i < n, i++) cin >> R[i];
      |                             ^
      |                             ;
a.cc:16:20: error: expected ';' before '<' token
   16 |   for (int i = 1, i < n, i++){
      |                    ^~
      |                    ;
a.cc:16:21: error: expected primary-expression before '<' token
   16 |   for (int i = 1, i < n, i++){
      |                     ^
a.cc:16:29: error: expected ';' before ')' token
   16 |   for (int i = 1, i < n, i++){
      |                             ^
      |                             ;
a.cc:17:35: error: expected primary-expression before '?' token
   17 |     maxv = max(maxv, R[i] - minv)???
      |                                   ^
a.cc:17:36: error: expected primary-expression before '?' token
   17 |     maxv = max(maxv, R[i] - minv)???
      |                                    ^
a.cc:18:28: error: expected primary-expression before '?' token
   18 |     minv = min(minv, R[i])???
      |                            ^
a.cc:18:29: error: expected primary-expression before '?' token
   18 |     minv = min(minv, R[i])???
      |                             ^
a.cc:19:3: error: expected primary-expression before '}' token
   19 |   }
      |   ^
a.cc:18:30: error: expected ':' before '}' token
   18 |     minv = min(minv, R[i])???
      |                              ^
      |                              :
   19 |   }
      |   ~                           
a.cc:19:3: error: expected primary-expression before '}' token
   19 |   }
      |   ^
a.cc:18:30: error: expected ':' before '}' token
   18 |     minv = min(minv, R[i])???
      |                              ^
      |                              :
   19 |   }
      |   ~                           
a.cc:19:3: error: expected primary-expression before '}' token
   19 |   }
      |   ^
a.cc:18:30: error: expected ':' before '}' token
   18 |     minv = min(minv, R[i])???
      |                              ^
      |                              :
   19 |   }
      |   ~                           
a.cc:19:3: error: expected primary-expression before '}' token
   19 |   }
      |   ^
a.cc:18:30: error: expected ':' before '}' token
   18 |     minv = min(minv, R[i])???
      |                              ^
      |                              :
   19 |   }
      |   ~                           
a.cc:19:3: error: expected primary-expression before '}' token
   19 |   }
      |   ^
a.cc:18:30: error: expected ':' before '}' token
   18 |     minv = min(minv, R[i])???
      |                              ^
      |                              :
   19 |   }
      |   ~                           
a.cc:19:3: error: expected primary-expression before '}' token
   19 |   }
      |   ^
a.cc:18:30: error: expected ':' before '}' token
   18 |     minv = min(minv, R[i])???
      |                              ^
      |                              :
   19 |   }
      |   ~                           
a.cc:19:3: error: expected primary-expression before '}' token
   19 |   }
      |   ^