// (c) 2017 /u/1337coder, this software is proprietary. Do not share/alter without permission.

// If you do, I'll find you.

// ultra top secret password, DO NOT share

#define TOP_SECRET_CLASSIFIED_PASS "password123"

// extremely essential convoluted control flags

bool topSecretEvennessDetectionProtocolInitialized = 0x00000000 ;

bool numberSingletonFactoryExists = 0x00000000 ;

#include <cstdlib>

#include <iostream>

#include <vector>

using namespace std ;

class TopSecretBoolean {

private :

bool topSecretUltraConcealedBooleanData ;

public :

bool getTopSecretUltraConcealedBooleanData ( string password ) {

if ( password. compare ( TOP_SECRET_CLASSIFIED_PASS ) == 0 )

return topSecretUltraConcealedBooleanData ;

else

return 0xDEADDEAD ;

}

void setTopSecretUltraConcealedBooleanData ( string password, bool rawBooleanInput ) {

if ( password. compare ( TOP_SECRET_CLASSIFIED_PASS ) == 0x00000000 )

topSecretUltraConcealedBooleanData = rawBooleanInput ;

}

TopSecretBoolean ( string password ) {

if ( password. compare ( TOP_SECRET_CLASSIFIED_PASS ) == 0x00000000 )

delete this ;

}

} ;

class Number {

private :

int topSecretIntegerData ;

public :

Number ( string password, int topSecretPassedIntegerData ) {

if ( password. compare ( TOP_SECRET_CLASSIFIED_PASS ) == 0x00000000 )

topSecretIntegerData = topSecretPassedIntegerData ;

else

topSecretIntegerData = 0xDEADDEAD ;

}

int getTopSecretIntegerData ( string password ) {

if ( password. compare ( TOP_SECRET_CLASSIFIED_PASS ) == 0x00000000 )

return topSecretIntegerData ;

else

return 0xDEADDEAD ; // ultra hyper top secret failure code

}

vector < TopSecretBoolean > getNumberIsEvenBooleanField ( string password ) {

vector < TopSecretBoolean > res ;

if ( password. compare ( TOP_SECRET_CLASSIFIED_PASS ) == 0x00000000 ) {

TopSecretBoolean myTopSecretBoolean ( password ) ;

myTopSecretBoolean. setTopSecretUltraConcealedBooleanData ( password, ! ( topSecretIntegerData % 0x00000002 ) ) ;

res. push_back ( myTopSecretBoolean ) ;

}

return res ;

}

} ;

class NumberSingletonFactoryInterface {

public :

virtual Number createNumber ( string password, int digitalRepresentation ) = 0 ;

} ;

class NumberSingletonFactory : NumberSingletonFactoryInterface {

public :

NumberSingletonFactory ( ) {

if ( numberSingletonFactoryExists )

delete this ;

else

numberSingletonFactoryExists = 0x00000001 ;

}

Number createNumber ( string password, int digitalRepresentation ) {

return Number ( password, digitalRepresentation ) ;

}

} ;

class TopSecretEvennessDetectionProtocol {

public :

NumberSingletonFactory initializeNumberSingletonFactory ( string password ) {

if ( password. compare ( TOP_SECRET_CLASSIFIED_PASS ) == 0 ) {

if ( ! topSecretEvennessDetectionProtocolInitialized ) {

topSecretEvennessDetectionProtocolInitialized = 0x00000001 ;

NumberSingletonFactory initializedNumberSingletonFactory ;

return initializedNumberSingletonFactory ;

}

}

}

} ;

// Must be called EVERY TIME a password is supplied to a function.

string governmentCertifiedSecureEncryptionProtocol ( string rawCharacterInput ) {

string hyperEncryptedString ;

/// THIS CODE IS ENCRYPTED, THEREFORE YOU CANNOT SEE IT

/// THIS CODE IS ENCRYPTED, THEREFORE YOU CANNOT SEE IT

/// THIS CODE IS ENCRYPTED, THEREFORE YOU CANNOT SEE IT

hyperEncryptedString = rawCharacterInput ;

/// THIS CODE IS ENCRYPTED, THEREFORE YOU CANNOT SEE IT

/// THIS CODE IS ENCRYPTED, THEREFORE YOU CANNOT SEE IT

/// THIS CODE IS ENCRYPTED, THEREFORE YOU CANNOT SEE IT

return hyperEncryptedString ;

}

// Implementation of TopSecretEvennessDetectionProtocol for babies.

bool isEven ( int n ) {

TopSecretEvennessDetectionProtocol myTopSecretEvennessDetectionProtocol ;

NumberSingletonFactory myNumberSingletonFactory = myTopSecretEvennessDetectionProtocol. initializeNumberSingletonFactory ( governmentCertifiedSecureEncryptionProtocol ( "password123" ) ) ;

Number myNumber = myNumberSingletonFactory. createNumber ( governmentCertifiedSecureEncryptionProtocol ( "password123" ) , n ) ;

vector < TopSecretBoolean > secretBooleanFarm = myNumber. getNumberIsEvenBooleanField ( governmentCertifiedSecureEncryptionProtocol ( "password123" ) ) ;

return secretBooleanFarm [ 0x00000000 ] . getTopSecretUltraConcealedBooleanData ( governmentCertifiedSecureEncryptionProtocol ( "password123" ) ) ;

}

/// USAGE EXAMPLE

/// g++ iseven.cc -std=c++11 -o iseven.exe

/// iseven 1337 (should say that it is NOT even)

int main ( int argc, char ** argv ) {

int n = atoi ( argv [ 0x00000001 ] ) ;

cout << n << " is " << ( ! isEven ( n ) ? "NOT " : "" ) << "even." ;