View Code of Problem 3812

#include <iostream>
#include <cstdio>
#include <cstring>
#include <string>
using namespace std;

#define MAXN 2000010
typedef long long ll;
const int mod=1000000009;

int a[MAXN];

int main()
{
    int t;
    scanf("%d",&t);
    while(t--)
    {
        int n;
        scanf("%d",&n);
        for(int i=0;i<n;i++)
             scanf("%d",&a[i]);
        if(n%2&&a[0]%2&&a[n-1]%2) puts("Yes");
        else puts("No");
    }
    return 0;
}

Double click to view unformatted code.


Back to problem 3812