Artifact 3c6459225e1fc2fa7236c30373efa708df56b7f8
#include <iostream>
#include <sstream>
#include <iomanip>
#include <vector>
#include <string>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
#include <iterator>
#include <functional>
#include <complex>
#include <queue>
#include <stack>
#include <cmath>
#include <cassert>
#include <cstring>
using namespace std;
typedef long long LL;
typedef complex<double> CMP;
class MagicalGirlLevelOneDivOne { public:
string isReachable(vector <int> jumpTypes, int x, int y)
{
bool hasEven = false;
for(int i=0; i<jumpTypes.size(); ++i)
if( jumpTypes[i]%2 == 0 )
hasEven = true;
if( hasEven )
return "YES";
else
return (x+y)%2==0 ? "YES" : "NO";
}
};
// BEGIN CUT HERE
#include <ctime>
double start_time; string timer()
{ ostringstream os; os << " (" << int((clock()-start_time)/CLOCKS_PER_SEC*1000) << " msec)"; return os.str(); }
template<typename T> ostream& operator<<(ostream& os, const vector<T>& v)
{ os << "{ ";
for(typename vector<T>::const_iterator it=v.begin(); it!=v.end(); ++it)
os << '\"' << *it << '\"' << (it+1==v.end() ? "" : ", "); os << " }"; return os; }
void verify_case(const string& Expected, const string& Received) {
bool ok = (Expected == Received);
if(ok) cerr << "PASSED" << timer() << endl; else { cerr << "FAILED" << timer() << endl;
cerr << "\to: \"" << Expected << '\"' << endl << "\tx: \"" << Received << '\"' << endl; } }
#define CASE(N) {cerr << "Test Case #" << N << "..." << flush; start_time=clock();
#define END verify_case(_, MagicalGirlLevelOneDivOne().isReachable(jumpTypes, x, y));}
int main(){
CASE(0)
int jumpTypes_[] = {2};
vector <int> jumpTypes(jumpTypes_, jumpTypes_+sizeof(jumpTypes_)/sizeof(*jumpTypes_));
int x = 5;
int y = 4;
string _ = "YES";
END
CASE(1)
int jumpTypes_[] = {3};
vector <int> jumpTypes(jumpTypes_, jumpTypes_+sizeof(jumpTypes_)/sizeof(*jumpTypes_));
int x = 5;
int y = 4;
string _ = "NO";
END
CASE(2)
int jumpTypes_[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
vector <int> jumpTypes(jumpTypes_, jumpTypes_+sizeof(jumpTypes_)/sizeof(*jumpTypes_));
int x = 1000000000;
int y = -999999999;
string _ = "YES";
END
CASE(3)
int jumpTypes_[] = {999999999};
vector <int> jumpTypes(jumpTypes_, jumpTypes_+sizeof(jumpTypes_)/sizeof(*jumpTypes_));
int x = 999999999;
int y = 0;
string _ = "NO";
END
/*
CASE(4)
int jumpTypes_[] = ;
vector <int> jumpTypes(jumpTypes_, jumpTypes_+sizeof(jumpTypes_)/sizeof(*jumpTypes_));
int x = ;
int y = ;
string _ = ;
END
CASE(5)
int jumpTypes_[] = ;
vector <int> jumpTypes(jumpTypes_, jumpTypes_+sizeof(jumpTypes_)/sizeof(*jumpTypes_));
int x = ;
int y = ;
string _ = ;
END
*/
}
// END CUT HERE