dc,0xf7,0xcf,0x4a,0x90,
  0x65,0x1,0x44,0xb,0xfe,0xd1,0x2,0xa3,0x12,0xb2,0x5b,0x48,0xa9,0x8d,0xe7,0xa1,
  0x23,0xa5,0x2c,0x45,0xf6,0x33,0x37,0x1e,0xb9,0x34,0xe5,0x39,0xf6,0xb9,0x9c,0x9c,
  0x13,0xd5,0xc,0x74,0xdb,0x96,0xdd,0x8f,0x5f,0x6a,0x61,0x25,0x93,0x19,0xc,0x3b,
  0x1a,0xa9,0x75,0x70,0x8e,0xa,0x6e,0x23,0x9e,0x99,0xa7,0x5b,0xb1,0x2b,0x80,0xcb,
  0x81,0xd8,0x51,0x7e,0x65,0xae,0x86,0x93,0x87,0x35,0x9c,0xb6,0x24,0x2a,0xed,0x11,
  0x7,0x69,0x23,0xa1,0x34,0x91,0x38,0x52,0x3,0x8d,0xa7,0xd7,0x15,0x30,0x60,0xe5,
  0x98,0x85,0xf9,0x4e,0x31,0x4d,0x6d,0xf8,0xde,0x0,0x27,0x3d,0x29,0xcd,0xb9,0x69,
  0x61,0x46,0xbc,0x29,0xe8,0x91,0x29,0x65,0x54,0x2d,0x82,0x7d,0x29,0xcc,0x63,0x60,
  0xe,0xec,0x9c,0x73,0xc7,0x19,0xa8,0xc6,0x5e,0x31,0xbc,0x60,0xfa,0x52,0x30,0x26,
  0x40,0xbb,0xb6,0xf1,0xd2,0xa1,0x41,0xc6,0x5e,0xf3,0x36,0xe7,0x4d,0x2d,0x9,0x63,
  0x58,0xca,0x9e,0xd8,0xed,0x55,0xa5,0x42,0xd3,0x1,0x8d,0xb8,0x3d,0xbb,0xd4,0xa3,
  0x9,0xdf,0xf3,0xa8,0x67,0x59,0xc,0xab,0xb1,0x98,0x93,0xdb,0xb5,0x55,0x56,0x9e,
  0x89,0x90,0xf9,0x5c,0xae,0xe2,0x43,0x23,0x48,0xd2,0xed,0x4,0xe1,0x7a,0x71,0x4f,
  0xb6,0x4,0x4a,0x77,0xf,0x9a,0x96,0x50,0x56,0x3c,0xbb,0x82,0xc3,0xa2,0xa9,0xa8,
  0xed,0xdc,0x99,0x79,0xc6,0xe2,0x3a,0x54,0xaa,0x2e,0x29,0xb6,0x6b,0xa4,0xbe,0x8,
  0xd8,0x9a,0x53,0x95,0xc3,0x1c,0x1e,0xdc,0x57,0x29,0xe2,0xd,0x32,0x7b,0xbb,0x2,
  0xe8,0xea,0xc1,0x6,0x76,0x84,0x7,0x35,0xd4,0x34,0x6c,0xd2,0x9d,0xe4,0x63,0xb1,
  0xa9,0x2,0x85,0xb3,0x91,0x1a,0x40,0x3,0x29,0xe6,0xaa,0x6a,0x9c,0xe1,0x66,0xb5,
  0x26,0x85,0x67,0x17,0xa9,0xe0,0x46,0x36,0x86,0x52,0x19,0x76,0xb0,0x3d,0x8,0xab,
  0x69,0x21,0x68,0xce,0xdf,0xbc,0x7b,0xe2,0xaf,0x6b,0x36,0xd2,0x5a,0xea,0xae,0x4,
  0x6c,0x51,0x8e,0x77,0x11,0x9a,0xcc,0x8d,0x18,0x0,0x73,0xb1,0x9,0xfc,0xeb,0xc2,
  0xad,0x41,0x46,0x76,0x3e,0x8a,0x95,0x78,0xd4,0x8a,0xd1,0x12,0x88,0xf0,0xd9,0x2c,
  0x9,0xa2,0x4f,0x2e,0x36,0x5c,0x5,0x62,0x7d,0x5,0x38,0x95,0x19,0xe5,0x4a,0xfa,
  0xfa,0xd5,0x70,0xde,0x6d,0xc7,0x18,0x0,0x74,0xac,0x5c,0x66,0xdd,0xda,0xd0,0xca,
  0x6a,0xd2,0xb2,0x43,0x66,0x3,0x19,0xd/*
 *   Copyright Platform Computing Inc., an IBM company, 1997-2008, 2012
 *                          All Rights Reserved.
 *
 *	$Revision: 10244 $
 */

#include <iostream.h>
#include <fstream.h>

class Entry {
private:
	int value;   
public:
	Entry() { value = 0; }
	Entry(int x) { value = x; }
	Entry(const Entry &e) { value = e.getValue(); }
	Entry& operator= (const Entry &e)
		{ value = e.getValue(); return (*this); }
	int getValue() const { return value; }
	int operator> (const Entry &e) const { return (value > e.getValue()); }
	friend ostream& operator<< (ostream &os, const Entry &e)
		{ return (os << e.value); }
	friend istream& operator>> (istream &is, Entry &e)
		{ return (is >> e.value); }
};

class BlockOfEntries {
private:
	Entry **entries;
	int numOfEntries;

	ifstream inFile;
	ofstream outFile;
public:
	BlockOfEntries(char *infname, char *outfname, int *numOfEntries_p);
	~BlockOfEntries();

	int getnumOfEntries() { return numOfEntries; }
	void setLeftShadow(const Entry &e) { *(entries[0]) = e; }
	void setRightShadow(const Entry &e)
		{ *(entries[numOfEntries - 1]) = e; }

	const Entry& getLeftEnd() { return *(entries[1]); }
	const Entry& getRightEnd() { return *(entries[numOfEntries - 2]); }

	void singleStepOddEntries();
	void singleStepEvenEntries();
};
