Start: Feb, 21, 2019 12:00:00
2018-2019 ACM集训队冬季集训第二次考核
End: Feb, 21, 2019 17:00:00
Time elapsed:
Time remaining:

Problem_ID: I
Result: Accepted
Time: 6ms
Memory: 1712kB
Author: 2017212212237
In contest: 1261

#include<iostream>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<cstdio>
#include<queue>
#include<vector>
using namespace std;

#define ll long long
const int maxn = 1e4 + 10;
const int mod = 1e9 + 7;

int main()
{
	int n;
	while(~scanf("%d",&n))
	{
		int a[maxn];
		for(int i=0;i<n;i++)
			scanf("%d",&a[i]);
		for(int i=0;i<n;i++)
			if(a[i] == 1 && a[i+1] == 1)
				a[i] = a[i+1] = 0;
//		for(int i=0;i<n;i++)
//		printf("%d ",a[i]);
		int num[maxn];
		int pos = 0;	
		for(int i=0;i<n;i++)
			if(a[i])
			{
				num[pos] = a[i];
				pos++;
			}
//		for(int i=0;i<pos;i++)
//		printf("%d ",num[i]);
		if(num[0] == 1)
		{
			puts("L");
		}
		else 
		{
			puts("H");
		}
	}
}

/*
int a[maxn];
int main()
{
	int n;
	scanf("%d",&n);
	for(int i=1;i<=n;i++)
		scanf("%d",&a[i]);
	if(n == 1)
	{
		printf("%d\n",a[1]);
		return 0;
	}
	if(n % 2 == 1)
	{
		sort(a+1,a+1+(n-1)/2);
		int av = a[1] + a[(n-1)/2];
		int ans1 = 0;
		for(int i=1;i<=(n+1)/2;i++)
		{
			ans1 += abs(a[i])
		}
	}	
}
*/