Language: C++

/*
 * A.cpp
 *
 *  Created on: 2017/07/09
 *      Author: LitMc
 */

#define MYDEBUG
#include <bits/stdc++.h>

//#ifdef MYDEBUG
#define dbp(x) cout<<#x<<": "<<x<<endl
#define dbp2(x,y) cout<<#x<<","<<#y<<": "<<x<<","<<y<<endl
#define dbp3(x,y,z) cout<<#x<<","<<#y<<","<<#z<<": "<<x<<","<<y<<","<<z<<endl
#define dbp4(w,x,y,z) cout<<#w<<","<<#x<<","<<#y<<","<<#z<<": "<<w<<","<<x<<","<<y<<","<<z<<endl
#define ifcin(x) std::ifstream cin(x)
#else
#define dbp(x)
#define dbp2(x,y)
#define dbp3(x,y,z)
#define dbp4(w,x,y,z)
#define ifcin(x)
#endif
#define ll long long
#define ull unsigned long long
#define all(x) x.begin(), x.end()
#define rep(i, from, to) for(int i=from; i<to; ++i)
#define REP(i, from, to) for(int i=from; i<=to; ++i)
#define EPS = 1e-14;
using std::vector;
using std::cout;
using std::cin;
using std::endl;
using std::max;
using std::min;
using std::swap;
using std::string;
using std::fill;
using std::pair;
using std::sort;
using std::reverse;
using std::pair;
using std::greater;
using std::priority_queue;
using std::ostream;
typedef std::complex<int> P;

template<typename T>
ostream& operator<<(ostream& out, const vector<vector<T> >& v) {
  for (size_t i = 0; i < v.size(); ++i) {
    out << v[i] << endl;
  }
  return out;
}

template<typename T>
ostream& operator<<(ostream& out, const vector<T>& v) {
  out << "[";
  size_t last = v.size() - 1;
  for (size_t i = 0; i < v.size(); ++i) {
    out << v[i];
    if (i != last) {
      out << ",";
    }
  }
  out << "]";
  return out;
}

static const ll MOD = 1000000007;
static const ll MAX_N = 110;
ll c[MAX_N][MAX_N];
ll n, p;
vector<ll> a;
ll even, odd;

void tbl() {
  memset(c, 0, sizeof(c));
  rep(n,0,MAX_N)
  {
    c[n][0] = 1;
    rep(r,1,MAX_N)
    {
      c[n][r] = c[n - 1][r - 1] + c[n - 1][r];
    }
  }
}

void solve() {
  tbl();
  cin >> n >> p;
  even = odd = 0;
  rep(i,0,n)
  {
    ll ai;
    cin >> ai;
    a.push_back(ai);
    if (ai % 2 == 0) {
      even++;
    } else {
      odd++;
    }
  }
  sort(all(a));
  ll e = 0, o = 0;
  REP(k,0,even)
  {
    e += c[even][k];
  }
  for (ll k = p; k <= odd; k += 2) {
    o += c[odd][k];
  }
  ll ans = e * o;
  dbp3(e, o, ans);
  cout << ans << endl;
}

int main() {
  solve();
}



Compiler output:
a.cc:17:2: error: #else without #if
   17 | #else
      |  ^~~~
a.cc:18:9: warning: "dbp" redefined
   18 | #define dbp(x)
      |         ^~~
a.cc:12:9: note: this is the location of the previous definition
   12 | #define dbp(x) cout<<#x<<": "<<x<<endl
      |         ^~~
a.cc:19:9: warning: "dbp2" redefined
   19 | #define dbp2(x,y)
      |         ^~~~
a.cc:13:9: note: this is the location of the previous definition
   13 | #define dbp2(x,y) cout<<#x<<","<<#y<<": "<<x<<","<<y<<endl
      |         ^~~~
a.cc:20:9: warning: "dbp3" redefined
   20 | #define dbp3(x,y,z)
      |         ^~~~
a.cc:14:9: note: this is the location of the previous definition
   14 | #define dbp3(x,y,z) cout<<#x<<","<<#y<<","<<#z<<": "<<x<<","<<y<<","<<z<<endl
      |         ^~~~
a.cc:21:9: warning: "dbp4" redefined
   21 | #define dbp4(w,x,y,z)
      |         ^~~~
a.cc:15:9: note: this is the location of the previous definition
   15 | #define dbp4(w,x,y,z) cout<<#w<<","<<#x<<","<<#y<<","<<#z<<": "<<w<<","<<x<<","<<y<<","<<z<<endl
      |         ^~~~
a.cc:22:9: warning: "ifcin" redefined
   22 | #define ifcin(x)
      |         ^~~~~
a.cc:16:9: note: this is the location of the previous definition
   16 | #define ifcin(x) std::ifstream cin(x)
      |         ^~~~~
a.cc:23:2: error: #endif without #if
   23 | #endif
      |  ^~~~~