Language: C++

vector<lli>v4;
vector<lli>v5;
vector<pair<lli,lli> >v6;
vector<pair<lli,lli> >v16;
vector<string>v7;
vector<string>v8;
vector<char>v9;
vector<double>v11;
list<lli>l;
//****coding start****
int main()
{
lli n;cin>>n;
lli a[n];
for(lli i=0;i<n;i++){
    cin>>a[i];
}
sort(a,a+n,greater<int>());
lli i=0,j=0,c=0;
while(i<n&&j<n){
    if(a[i]==a[j]){
        c++;
        j++;
    }
    else{
      v16.push_back(make_pair(a[i],c));
      i=j;
      j=i;
      c=0;
    }
}
  v16.push_back(make_pair(a[i],c));
//for(lli i=0;i<100000+1;i++){
//    cout<<e[i]<<" ";
//}ln

lli m=*max_element(a,a+n);
lli g=m;
//v6.push_back(make_pair(g,0));
for(lli i=0;i<n;i++){
    g=__gcd(g,a[i]);
    v6.push_back(make_pair(g,i));
}
sort(v6.begin(),v6.end());

lli m1=-1;
for(lli i=0;i<v6.size()&&i<v16.size();i++){
    if(v16[v6[i].second].second==1){
        m1=v6[i].second;
        break;
    }


}
//cout<<m1<<endl;
if(m!=-1){
a[m1]=m;
}
//cout<<a[0]<<endl;
lli g1=m;
for(lli i=0;i<n;i++){
    g1=__gcd(g1,a[i]);
}
cout<<g1<<endl;
    return 0;
}


Compiler output:
a.cc:1:1: error: 'vector' does not name a type
    1 | vector<lli>v4;
      | ^~~~~~
a.cc:2:1: error: 'vector' does not name a type
    2 | vector<lli>v5;
      | ^~~~~~
a.cc:3:1: error: 'vector' does not name a type
    3 | vector<pair<lli,lli> >v6;
      | ^~~~~~
a.cc:4:1: error: 'vector' does not name a type
    4 | vector<pair<lli,lli> >v16;
      | ^~~~~~
a.cc:5:1: error: 'vector' does not name a type
    5 | vector<string>v7;
      | ^~~~~~
a.cc:6:1: error: 'vector' does not name a type
    6 | vector<string>v8;
      | ^~~~~~
a.cc:7:1: error: 'vector' does not name a type
    7 | vector<char>v9;
      | ^~~~~~
a.cc:8:1: error: 'vector' does not name a type
    8 | vector<double>v11;
      | ^~~~~~
a.cc:9:1: error: 'list' does not name a type
    9 | list<lli>l;
      | ^~~~
a.cc: In function 'int main()':
a.cc:13:1: error: 'lli' was not declared in this scope
   13 | lli n;cin>>n;
      | ^~~
a.cc:13:7: error: 'cin' was not declared in this scope
   13 | lli n;cin>>n;
      |       ^~~
a.cc:13:12: error: 'n' was not declared in this scope
   13 | lli n;cin>>n;
      |            ^
a.cc:14:4: error: expected ';' before 'a'
   14 | lli a[n];
      |    ^~
      |    ;
a.cc:15:8: error: expected ';' before 'i'
   15 | for(lli i=0;i<n;i++){
      |        ^~
      |        ;
a.cc:15:13: error: 'i' was not declared in this scope
   15 | for(lli i=0;i<n;i++){
      |             ^
a.cc:16:10: error: 'a' was not declared in this scope
   16 |     cin>>a[i];
      |          ^
a.cc:18:6: error: 'a' was not declared in this scope
   18 | sort(a,a+n,greater<int>());
      |      ^
a.cc:18:12: error: 'greater' was not declared in this scope
   18 | sort(a,a+n,greater<int>());
      |            ^~~~~~~
a.cc:18:20: error: expected primary-expression before 'int'
   18 | sort(a,a+n,greater<int>());
      |                    ^~~
a.cc:18:1: error: 'sort' was not declared in this scope; did you mean 'short'?
   18 | sort(a,a+n,greater<int>());
      | ^~~~
      | short
a.cc:19:4: error: expected ';' before 'i'
   19 | lli i=0,j=0,c=0;
      |    ^~
      |    ;
a.cc:20:7: error: 'i' was not declared in this scope
   20 | while(i<n&&j<n){
      |       ^
a.cc:20:12: error: 'j' was not declared in this scope
   20 | while(i<n&&j<n){
      |            ^
a.cc:22:9: error: 'c' was not declared in this scope
   22 |         c++;
      |         ^
a.cc:26:7: error: 'v16' was not declared in this scope
   26 |       v16.push_back(make_pair(a[i],c));
      |       ^~~
a.cc:26:36: error: 'c' was not declared in this scope
   26 |       v16.push_back(make_pair(a[i],c));
      |                                    ^
a.cc:26:21: error: 'make_pair' was not declared in this scope
   26 |       v16.push_back(make_pair(a[i],c));
      |                     ^~~~~~~~~
a.cc:32:3: error: 'v16' was not declared in this scope
   32 |   v16.push_back(make_pair(a[i],c));
      |   ^~~
a.cc:32:29: error: 'i' was not declared in this scope
   32 |   v16.push_back(make_pair(a[i],c));
      |                             ^
a.cc:32:32: error: 'c' was not declared in this scope
   32 |   v16.push_back(make_pair(a[i],c));
      |                                ^
a.cc:32:17: error: 'make_pair' was not declared in this scope
   32 |   v16.push_back(make_pair(a[i],c));
      |                 ^~~~~~~~~
a.cc:37:4: error: expected ';' before 'm'
   37 | lli m=*max_element(a,a+n);
      |    ^~
      |    ;
a.cc:38:4: error: expected ';' before 'g'
   38 | lli g=m;
      |    ^~
      |    ;
a.cc:40:8: error: expected ';' before 'i'
   40 | for(lli i=0;i<n;i++){
      |        ^~
      |        ;
a.cc:41:5: error: 'g' was not declared in this scope
   41 |     g=__gcd(g,a[i]);
      |     ^
a.cc:41:7: error: '__gcd' was not declared in this scope
   41 |     g=__gcd(g,a[i]);
      |       ^~~~~
a.cc:42:5: error: 'v6' was not declared in this scope
   42 |     v6.push_back(make_pair(g,i));
      |     ^~
a.cc:44:6: error: 'v6' was not declared in this scope
   44 | sort(v6.begin(),v6.end());
      |      ^~
a.cc:46:4: error: expected ';' before 'm1'
   46 | lli m1=-1;
      |    ^~~
      |    ;
a.cc:47:8: error: expected ';' before 'i'
   47 | for(lli i=0;i<v6.size()&&i<v16.size();i++){
      |        ^~
      |        ;
a.cc:49:9: error: 'm1' was not declared in this scope
   49 |         m1=v6[i].second;
      |         ^~
a.cc:56:4: error: 'm' was not declared in this scope
   56 | if(m!=-1){
      |    ^
a.cc:57:3: error: 'm1' was not declared in this scope
   57 | a[m1]=m;
      |   ^~
a.cc:60:4: error: expected ';' before 'g1'
   60 | lli g1=m;
      |    ^~~
      |    ;
a.cc:61:8: error: expected ';' before 'i'
   61 | for(lli i=0;i<n;i++){
      |        ^~
      |        ;
a.cc:62:5: error: 'g1' was not declared in this scope
   62 |     g1=__gcd(g1,a[i]);
      |     ^~
a.cc:62:8: error: '__gcd' was not declared in this scope
   62 |     g1=__gcd(g1,a[i]);
      |        ^~~~~
a.cc:64:1: error: 'cout' was not declared in this scope
   64 | cout<<g1<<endl;
      | ^~~~
a.cc:64:7: error: 'g1' was not declared in this scope
   64 | cout<<g1<<endl;
      |       ^~
a.cc:64:11: error: 'endl' was not declared in this scope
   64 | cout<<g1<<endl;
      |           ^~~~