Skip to content

Instantly share code, notes, and snippets.

@fredbr
Created March 20, 2018 17:22
Show Gist options
  • Save fredbr/9d7a5caf718c64cd76516fbe50430061 to your computer and use it in GitHub Desktop.
Save fredbr/9d7a5caf718c64cd76516fbe50430061 to your computer and use it in GitHub Desktop.
#include <bits/stdc++.h>
using namespace std;
const int maxn = 110;
int v[maxn];
int main()
{
int n;
cin >> n;
for (int i = 0; i < n; i++) cin >> v[i];
if (n%2==1 and v[0]%2==1 and v[n-1]%2==1) cout << "Yes\n";
else cout << "No\n";
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment