AMZSEQ

AMZSEQ

#include<iostream>
using namespace std;
typedef long long int int64;
int main()
{
 int64 arr[10000];
 arr[1] = 3;
 arr[2] = 7;
 int i = 2;
 while(arr[i]<1e10)
 {
  arr[i+1] = 2*arr[i] + arr[i-1];
  i++;                 
 }   
 int n;
 cin>>n;
 cout<<arr[n]<<endl;
}

ARMY

ARMY

#include<iostream>
using namespace std;
int main()
{ int t,ng,nm,sg,sm,maxg,maxm,flag;
 cin>>t;
while(t--)
 {cin>>ng>>nm;
 maxg=0;maxm=0;
 if(ng==0&&nm==0){cout<<"uncertain"<<endl;goto last;}
 else if(nm==0){cout<<"Godzilla"<<endl;goto last;}
 else if(ng==0){cout<<"MechaGodzilla"<<endl;goto last;}
  while(ng--)
  { cin>>sg;
  if(sg>maxg)maxg=sg;
  } 
  while(nm--)
  { cin>>sm;
  if(sm>maxm)maxm=sm;
  } 
         if(maxg>=maxm)cout<<"Godzilla"<<endl;
         else cout<<"MechaGodzilla"<<endl;
        
         last:;
         }
         return 0;
    }