又做水题一道
#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
const int maxn=100000+1000;
int a[maxn], b[maxn];
int main()
{
int n, p=0, q=0, sum1=0, sum2=0;
cin>>n;
for(int i=1;i<=n;i++)
{
if(i%2)
{
cin>>a[p];
sum1+=a[p];
p++;
}
else
{
cin>>b[q];
sum2+=b[q];
q++;
}
}
/// cout<<sum1<<" "<<sum2<<endl;
if(sum1>sum2)
cout<<"Greater than"<<endl;
else if(sum1==sum2)
cout<<"Equal"<<endl;
else
cout<<"Less than"<<endl;
return 0;
}