diff --git a/M/TC/About.exe b/M/TC/About.exe new file mode 100644 index 0000000..1b315d5 Binary files /dev/null and b/M/TC/About.exe differ diff --git a/M/TC/BGI/ATT.BGI b/M/TC/BGI/ATT.BGI new file mode 100644 index 0000000..a9108a7 Binary files /dev/null and b/M/TC/BGI/ATT.BGI differ diff --git a/M/TC/BGI/BGIDEMO.C b/M/TC/BGI/BGIDEMO.C new file mode 100644 index 0000000..eeb902f --- /dev/null +++ b/M/TC/BGI/BGIDEMO.C @@ -0,0 +1,1403 @@ +/* + GRAPHICS DEMO FOR Borland C++ 3.0 + + Copyright (c) 1987,88,91 Borland International. All rights reserved. + + From the command line, use: + + bcc bgidemo graphics.lib + +*/ + +#ifdef __TINY__ +#error BGIDEMO will not run in the tiny model. +#endif + +#include +#include +#include +#include +#include +#include + +#include + +#define ESC 0x1b /* Define the escape key */ +#define TRUE 1 /* Define some handy constants */ +#define FALSE 0 /* Define some handy constants */ +#define PI 3.14159 /* Define a value for PI */ +#define ON 1 /* Define some handy constants */ +#define OFF 0 /* Define some handy constants */ + +#define NFONTS 11 + +char *Fonts[NFONTS] = { + "DefaultFont", "TriplexFont", "SmallFont", + "SansSerifFont", "GothicFont", "ScriptFont", "SimplexFont", "TriplexScriptFont", + "ComplexFont", "EuropeanFont", "BoldFont" +}; + +char *LineStyles[] = { + "SolidLn", "DottedLn", "CenterLn", "DashedLn", "UserBitLn" +}; + +char *FillStyles[] = { + "EmptyFill", "SolidFill", "LineFill", "LtSlashFill", + "SlashFill", "BkSlashFill", "LtBkSlashFill", "HatchFill", + "XHatchFill", "InterleaveFill", "WideDotFill", "CloseDotFill" +}; + +char *TextDirect[] = { + "HorizDir", "VertDir" +}; + +char *HorizJust[] = { + "LeftText", "CenterText", "RightText" +}; + +char *VertJust[] = { + "BottomText", "CenterText", "TopText" +}; + +struct PTS { + int x, y; +}; /* Structure to hold vertex points */ + +int GraphDriver; /* The Graphics device driver */ +int GraphMode; /* The Graphics mode value */ +double AspectRatio; /* Aspect ratio of a pixel on the screen*/ +int MaxX, MaxY; /* The maximum resolution of the screen */ +int MaxColors; /* The maximum # of colors available */ +int ErrorCode; /* Reports any graphics errors */ +struct palettetype palette; /* Used to read palette info */ + +/* */ +/* Function prototypes */ +/* */ + +void Initialize(void); +void ReportStatus(void); +void TextDump(void); +void Bar3DDemo(void); +void RandomBars(void); +void TextDemo(void); +void ColorDemo(void); +void ArcDemo(void); +void CircleDemo(void); +void PieDemo(void); +void BarDemo(void); +void LineRelDemo(void); +void PutPixelDemo(void); +void PutImageDemo(void); +void LineToDemo(void); +void LineStyleDemo(void); +void CRTModeDemo(void); +void UserLineStyleDemo(void); +void FillStyleDemo(void); +void FillPatternDemo(void); +void PaletteDemo(void); +void PolyDemo(void); +void SayGoodbye(void); +void Pause(void); +void MainWindow(char *header); +void StatusLine(char *msg); +void DrawBorder(void); +void changetextstyle(int font, int direction, int charsize); +int gprintf(int *xloc, int *yloc, char *fmt, ... ); + +/* */ +/* Begin main function */ +/* */ + +int main() +{ + + Initialize(); /* Set system into Graphics mode */ + ReportStatus(); /* Report results of the initialization */ + + ColorDemo(); /* Begin actual demonstration */ + if( GraphDriver==EGA || GraphDriver==EGALO || GraphDriver==VGA ) + PaletteDemo(); + PutPixelDemo(); + PutImageDemo(); + Bar3DDemo(); + BarDemo(); + RandomBars(); + ArcDemo(); + CircleDemo(); + PieDemo(); + LineRelDemo(); + LineToDemo(); + LineStyleDemo(); + UserLineStyleDemo(); + TextDump(); + TextDemo(); + CRTModeDemo(); + FillStyleDemo(); + FillPatternDemo(); + PolyDemo(); + SayGoodbye(); /* Give user the closing screen */ + + closegraph(); /* Return the system to text mode */ + return(0); +} + +/* */ +/* INITIALIZE: Initializes the graphics system and reports */ +/* any errors which occured. */ +/* */ + +void Initialize(void) +{ + int xasp, yasp; /* Used to read the aspect ratio*/ + + GraphDriver = DETECT; /* Request auto-detection */ + initgraph( &GraphDriver, &GraphMode, "" ); + ErrorCode = graphresult(); /* Read result of initialization*/ + if( ErrorCode != grOk ){ /* Error occured during init */ + printf(" Graphics System Error: %s\n", grapherrormsg( ErrorCode ) ); + exit( 1 ); + } + + getpalette( &palette ); /* Read the palette from board */ + MaxColors = getmaxcolor() + 1; /* Read maximum number of colors*/ + + MaxX = getmaxx(); + MaxY = getmaxy(); /* Read size of screen */ + + getaspectratio( &xasp, &yasp ); /* read the hardware aspect */ + AspectRatio = (double)xasp / (double)yasp; /* Get correction factor */ + +} + +/* */ +/* REPORTSTATUS: Report the current configuration of the system */ +/* after the auto-detect initialization. */ +/* */ + +void ReportStatus(void) +{ + struct viewporttype viewinfo; /* Params for inquiry procedures*/ + struct linesettingstype lineinfo; + struct fillsettingstype fillinfo; + struct textsettingstype textinfo; + struct palettetype palette; + + char *driver, *mode; /* Strings for driver and mode */ + int x, y; + + getviewsettings( &viewinfo ); + getlinesettings( &lineinfo ); + getfillsettings( &fillinfo ); + gettextsettings( &textinfo ); + getpalette( &palette ); + + x = 10; + y = 4; + + MainWindow( "Status report after InitGraph" ); + settextjustify( LEFT_TEXT, TOP_TEXT ); + + driver = getdrivername(); + mode = getmodename(GraphMode); /* get current setting */ + + gprintf( &x, &y, "Graphics device : %-20s (%d)", driver, GraphDriver ); + gprintf( &x, &y, "Graphics mode : %-20s (%d)", mode, GraphMode ); + gprintf( &x, &y, "Screen resolution : ( 0, 0, %d, %d )", getmaxx(), getmaxy() ); + + gprintf( &x, &y, "Current view port : ( %d, %d, %d, %d )", + viewinfo.left, viewinfo.top, viewinfo.right, viewinfo.bottom ); + gprintf( &x, &y, "Clipping : %s", viewinfo.clip ? "ON" : "OFF" ); + + gprintf( &x, &y, "Current position : ( %d, %d )", getx(), gety() ); + gprintf( &x, &y, "Colors available : %d", MaxColors ); + gprintf( &x, &y, "Current color : %d", getcolor() ); + + gprintf( &x, &y, "Line style : %s", LineStyles[ lineinfo.linestyle ] ); + gprintf( &x, &y, "Line thickness : %d", lineinfo.thickness ); + + gprintf( &x, &y, "Current fill style : %s", FillStyles[ fillinfo.pattern ] ); + gprintf( &x, &y, "Current fill color : %d", fillinfo.color ); + + gprintf( &x, &y, "Current font : %s", Fonts[ textinfo.font ] ); + gprintf( &x, &y, "Text direction : %s", TextDirect[ textinfo.direction ] ); + gprintf( &x, &y, "Character size : %d", textinfo.charsize ); + gprintf( &x, &y, "Horizontal justify : %s", HorizJust[ textinfo.horiz ] ); + gprintf( &x, &y, "Vertical justify : %s", VertJust[ textinfo.vert ] ); + + Pause(); /* Pause for user to read screen*/ + +} + +/* */ +/* TEXTDUMP: Display the all the characters in each of the */ +/* available fonts. */ +/* */ + +void TextDump() +{ + static int CGASizes[] = { + 1, 3, 7, 3, 3, 2, 2, 2, 2, 2, 2 }; + static int NormSizes[] = { + 1, 4, 7, 4, 4, 2, 2, 2, 2, 2, 2 }; + + char buffer[80]; + int font, ch, wwidth, lwidth, size; + struct viewporttype vp; + + for( font=0 ; font wwidth ) + moveto( 2, gety() + textheight("H") + 3 ); + ++ch; /* Goto the next character */ + } + } + else{ + + size = (MaxY < 200) ? CGASizes[font] : NormSizes[font]; + changetextstyle( font, HORIZ_DIR, size ); + + ch = '!'; /* Begin at 1st printable */ + while( ch < 256 ){ /* For each printable character */ + buffer[0] = ch; /* Put character into a string */ + outtext( buffer ); /* send string to screen */ + if( (lwidth+getx()) > wwidth ) /* Are we still in window? */ + moveto( 2, gety()+textheight("H")+3 ); + ++ch; /* Goto the next character */ + } + + } + + Pause(); /* Pause until user acks */ + + } /* End of FONT loop */ + +} + +/* */ +/* BAR3DDEMO: Display a 3-D bar chart on the screen. */ +/* */ + +void Bar3DDemo(void) +{ + static int barheight[] = { + 1, 3, 5, 4, 3, 2, 1, 5, 4, 2, 3 }; + struct viewporttype vp; + int xstep, ystep; + int i, j, h, color, bheight; + char buffer[10]; + + MainWindow( "Bar 3-D / Rectangle Demonstration" ); + + h = 3 * textheight( "H" ); + getviewsettings( &vp ); + settextjustify( CENTER_TEXT, TOP_TEXT ); + changetextstyle( TRIPLEX_FONT, HORIZ_DIR, 4 ); + outtextxy( MaxX/2, 6, "These are 3-D Bars" ); + changetextstyle( DEFAULT_FONT, HORIZ_DIR, 1 ); + setviewport( vp.left+50, vp.top+40, vp.right-50, vp.bottom-10, 1 ); + getviewsettings( &vp ); + + line( h, h, h, vp.bottom-vp.top-h ); + line( h, (vp.bottom-vp.top)-h, (vp.right-vp.left)-h, (vp.bottom-vp.top)-h ); + xstep = ((vp.right-vp.left) - (2*h)) / 10; + ystep = ((vp.bottom-vp.top) - (2*h)) / 5; + j = (vp.bottom-vp.top) - h; + settextjustify( CENTER_TEXT, CENTER_TEXT ); + + for( i=0 ; i<6 ; ++i ){ + line( h/2, j, h, j ); + itoa( i, buffer, 10 ); + outtextxy( 0, j, buffer ); + j -= ystep; + } + + j = h; + settextjustify( CENTER_TEXT, TOP_TEXT ); + + for( i=0 ; i<11 ; ++i ){ + color = random( MaxColors ); + setfillstyle( i+1, color ); + line( j, (vp.bottom-vp.top)-h, j, (vp.bottom-vp.top-3)-(h/2) ); + itoa( i, buffer, 10 ); + outtextxy( j, (vp.bottom-vp.top)-(h/2), buffer ); + if( i != 10 ){ + bheight = (vp.bottom-vp.top) - h - 1; + bar3d( j, (vp.bottom-vp.top-h)-(barheight[i]*ystep), j+xstep, bheight, 15, 1 ); + } + j += xstep; + } + + Pause(); /* Pause for user's response */ + +} + +/* */ +/* RANDOMBARS: Display random bars */ +/* */ + +void RandomBars(void) +{ + int color; + + MainWindow( "Random Bars" ); + StatusLine( "Esc aborts or press a key..." ); /* Put msg at bottom of screen */ + while( !kbhit() ){ /* Until user enters a key... */ + color = random( MaxColors-1 )+1; + setcolor( color ); + setfillstyle( random(11)+1, color ); + bar3d( random( getmaxx() ), random( getmaxy() ), + random( getmaxx() ), random( getmaxy() ), 0, OFF); + } + + Pause(); /* Pause for user's response */ + +} + + +/* */ +/* TEXTDEMO: Show each font in several sizes to the user. */ +/* */ + +void TextDemo(void) +{ + int charsize[] = { + 1, 3, 7, 3, 4, 2, 2, 2, 2, 2, 2 }; + int font, size; + int h, x, y, i; + struct viewporttype vp; + char buffer[80]; + + for( font=0 ; font vp.right) + x = vp.right-vp.left-width + 1; + else + if (x < 0) + x = 0; + if (vp.top + y + height - 1 > vp.bottom) + y = vp.bottom-vp.top-height + 1; + else + if (y < 0) + y = 0; + } + free( Saucer ); + Pause(); +} + + +/* */ +/* LINETODEMO: Display a pattern using moveto and lineto commands. */ +/* */ + +#define MAXPTS 15 + +void LineToDemo(void) +{ + struct viewporttype vp; + struct PTS points[MAXPTS]; + int i, j, h, w, xcenter, ycenter; + int radius, angle, step; + double rads; + + MainWindow( "MoveTo / LineTo Demonstration" ); + + getviewsettings( &vp ); + h = vp.bottom - vp.top; + w = vp.right - vp.left; + + xcenter = w / 2; /* Determine the center of circle */ + ycenter = h / 2; + radius = (h - 30) / (AspectRatio * 2); + step = 360 / MAXPTS; /* Determine # of increments */ + + angle = 0; /* Begin at zero degrees */ + for( i=0 ; i> i); /* Clear the Ith bit in word */ + + setlinestyle( USERBIT_LINE, style, NORM_WIDTH ); + line( x, y, x, h-y ); /* Draw the new line pattern */ + + x += 5; /* Move the X location of line */ + i = ++i % 16; /* Advance to next bit pattern */ + + if( style == 0xffff ){ /* Are all bits set? */ + flag = FALSE; /* begin removing bits */ + i = 0; /* Start with whole pattern */ + } + else{ /* Bits not all set... */ + if( style == 0 ) /* Are all bits clear? */ + flag = TRUE; /* begin setting bits */ + } + } + + settextjustify( LEFT_TEXT, TOP_TEXT ); + + Pause(); /* Wait for user's response */ + +} + +/* */ +/* FILLSTYLEDEMO: Display the standard fill patterns available. */ +/* */ + +void FillStyleDemo(void) +{ + int h, w, style; + int i, j, x, y; + struct viewporttype vp; + char buffer[40]; + + MainWindow( "Pre-defined Fill Styles" ); + + getviewsettings( &vp ); + w = 2 * ((vp.right + 1) / 13); + h = 2 * ((vp.bottom - 10) / 10); + + x = w / 2; + y = h / 2; /* Leave 1/2 blk margin */ + style = 0; + + for( j=0 ; j<3 ; ++j ){ /* Three rows of boxes */ + for( i=0 ; i<4 ; ++i ){ /* Four column of boxes */ + setfillstyle(style, MaxColors-1); /* Set the fill style and WHITE */ + bar( x, y, x+w, y+h ); /* Draw the actual box */ + rectangle( x, y, x+w, y+h ); /* Outline the box */ + itoa( style, buffer, 10 ); /* Convert style 3 to ASCII */ + outtextxy( x+(w / 2), y+h+4, buffer ); + ++style; /* Go on to next style # */ + x += (w / 2) * 3; /* Go to next column */ + } /* End of coulmn loop */ + x = w / 2; /* Put base back to 1st column */ + y += (h / 2) * 3; /* Advance to next row */ + } /* End of Row loop */ + + settextjustify( LEFT_TEXT, TOP_TEXT ); + + Pause(); /* Wait for user's response */ + +} + +/* */ +/* FILLPATTERNDEMO: Demonstrate how to use the user definable */ +/* fill patterns. */ +/* */ + +void FillPatternDemo(void) +{ + int style; + int h, w; + int x, y, i, j; + char buffer[40]; + struct viewporttype vp; + static char patterns[][8] = { + { 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55 }, + { 0x33, 0x33, 0xCC, 0xCC, 0x33, 0x33, 0xCC, 0xCC }, + { 0xF0, 0xF0, 0xF0, 0xF0, 0x0F, 0x0F, 0x0F, 0x0F }, + { 0x00, 0x10, 0x28, 0x44, 0x28, 0x10, 0x00, 0x00 }, + { 0x00, 0x70, 0x20, 0x27, 0x24, 0x24, 0x07, 0x00 }, + { 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x3C, 0x3C, 0x3C, 0x3C, 0x00, 0x00 }, + { 0x00, 0x7E, 0x7E, 0x7E, 0x7E, 0x7E, 0x7E, 0x00 }, + { 0x00, 0x00, 0x22, 0x08, 0x00, 0x22, 0x1C, 0x00 }, + { 0xFF, 0x7E, 0x3C, 0x18, 0x18, 0x3C, 0x7E, 0xFF }, + { 0x00, 0x10, 0x10, 0x7C, 0x10, 0x10, 0x00, 0x00 }, + { 0x00, 0x42, 0x24, 0x18, 0x18, 0x24, 0x42, 0x00 } + }; + + MainWindow( "User Defined Fill Styles" ); + + getviewsettings( &vp ); + w = 2 * ((vp.right + 1) / 13); + h = 2 * ((vp.bottom - 10) / 10); + + x = w / 2; + y = h / 2; /* Leave 1/2 blk margin */ + style = 0; + + for( j=0 ; j<3 ; ++j ){ /* Three rows of boxes */ + for( i=0 ; i<4 ; ++i ){ /* Four column of boxes */ + setfillpattern( &patterns[style][0], MaxColors-1 ); + bar( x, y, x+w, y+h ); /* Draw the actual box */ + rectangle( x, y, x+w, y+h ); /* Outline the box */ + itoa( style, buffer, 10 ); /* Convert style 3 to ASCII */ + outtextxy( x+(w / 2), y+h+4, buffer ); + ++style; /* Go on to next style # */ + x += (w / 2) * 3; /* Go to next column */ + } /* End of coulmn loop */ + x = w / 2; /* Put base back to 1st column */ + y += (h / 2) * 3; /* Advance to next row */ + } /* End of Row loop */ + + settextjustify( LEFT_TEXT, TOP_TEXT ); + + Pause(); /* Wait for user's response */ + +} + +/* */ +/* POLYDEMO: Display a random pattern of polygons on the screen */ +/* until the user says enough. */ +/* */ + +void PaletteDemo(void) +{ + int i, j, x, y, color; + struct viewporttype vp; + int height, width; + + MainWindow( "Palette Demonstration" ); + StatusLine( "Press any key to continue, ESC to Abort" ); + + getviewsettings( &vp ); + width = (vp.right - vp.left) / 15; /* get width of the box */ + height = (vp.bottom - vp.top) / 10; /* Get the height of the box */ + + x = y = 0; /* Start in upper corner */ + color = 1; /* Begin at 1st color */ + + for( j=0 ; j<10 ; ++j ){ /* For 10 rows of boxes */ + for( i=0 ; i<15 ; ++i ){ /* For 15 columns of boxes */ + setfillstyle( SOLID_FILL, color++ ); /* Set the color of box */ + bar( x, y, x+width, y+height ); /* Draw the box */ + x += width + 1; /* Advance to next col */ + color = 1 + (color % (MaxColors - 2)); /* Set new color */ + } /* End of COLUMN loop */ + x = 0; /* Goto 1st column */ + y += height + 1; /* Goto next row */ + } /* End of ROW loop */ + + while( !kbhit() ){ /* Until user enters a key... */ + setpalette( 1+random(MaxColors - 2), random( 65 ) ); + } + + setallpalette( &palette ); + + Pause(); /* Wait for user's response */ + +} + +/* */ +/* POLYDEMO: Display a random pattern of polygons on the screen */ +/* until the user says enough. */ +/* */ + +#define MaxPts 6 /* Maximum # of pts in polygon */ + +void PolyDemo(void) +{ + struct PTS poly[ MaxPts ]; /* Space to hold datapoints */ + int color; /* Current drawing color */ + int i; + + MainWindow( "DrawPoly / FillPoly Demonstration" ); + StatusLine( "ESC Aborts - Press a Key to stop" ); + + while( !kbhit() ){ /* Repeat until a key is hit */ + + color = 1 + random( MaxColors-1 ); /* Get a random color # (no blk)*/ + setfillstyle( random(10), color ); /* Set a random line style */ + setcolor( color ); /* Set the desired color */ + + for( i=0 ; i<(MaxPts-1) ; i++ ){ /* Determine a random polygon */ + poly[i].x = random( MaxX ); /* Set the x coord of point */ + poly[i].y = random( MaxY ); /* Set the y coord of point */ + } + + poly[i].x = poly[0].x; /* last point = first point */ + poly[i].y = poly[1].y; + + fillpoly( MaxPts, (int far *)poly ); /* Draw the actual polygon */ + } /* End of WHILE not KBHIT */ + + Pause(); /* Wait for user's response */ + +} + + +/* */ +/* SAYGOODBYE: Give a closing screen to the user before leaving. */ +/* */ + +void SayGoodbye(void) +{ + struct viewporttype viewinfo; /* Structure to read viewport */ + int h, w; + + MainWindow( "== Finale ==" ); + + getviewsettings( &viewinfo ); /* Read viewport settings */ + changetextstyle( TRIPLEX_FONT, HORIZ_DIR, 4 ); + settextjustify( CENTER_TEXT, CENTER_TEXT ); + + h = viewinfo.bottom - viewinfo.top; + w = viewinfo.right - viewinfo.left; + outtextxy( w/2, h/2, "That's all, folks!" ); + + StatusLine( "Press any key to EXIT" ); + getch(); + + cleardevice(); /* Clear the graphics screen */ + +} + +/* */ +/* PAUSE: Pause until the user enters a keystroke. If the */ +/* key is an ESC, then exit program, else simply return. */ +/* */ + +void Pause(void) +{ + static char msg[] = "Esc aborts or press a key..."; + int c; + + StatusLine( msg ); /* Put msg at bottom of screen */ + + c = getch(); /* Read a character from kbd */ + + if( ESC == c ){ /* Does user wish to leave? */ + closegraph(); /* Change to text mode */ + exit( 1 ); /* Return to OS */ + } + + if( 0 == c ){ /* Did use hit a non-ASCII key? */ + c = getch(); /* Read scan code for keyboard */ + } + + cleardevice(); /* Clear the screen */ + +} + +/* */ +/* MAINWINDOW: Establish the main window for the demo and set */ +/* a viewport for the demo code. */ +/* */ + +void MainWindow( char *header ) +{ + int height; + + cleardevice(); /* Clear graphics screen */ + setcolor( MaxColors - 1 ); /* Set current color to white */ + setviewport( 0, 0, MaxX, MaxY, 1 ); /* Open port to full screen */ + + height = textheight( "H" ); /* Get basic text height */ + + changetextstyle( DEFAULT_FONT, HORIZ_DIR, 1 ); + settextjustify( CENTER_TEXT, TOP_TEXT ); + outtextxy( MaxX/2, 2, header ); + setviewport( 0, height+4, MaxX, MaxY-(height+4), 1 ); + DrawBorder(); + setviewport( 1, height+5, MaxX-1, MaxY-(height+5), 1 ); + +} + +/* */ +/* STATUSLINE: Display a status line at the bottom of the screen. */ +/* */ + +void StatusLine( char *msg ) +{ + int height; + + setviewport( 0, 0, MaxX, MaxY, 1 ); /* Open port to full screen */ + setcolor( MaxColors - 1 ); /* Set current color to white */ + + changetextstyle( DEFAULT_FONT, HORIZ_DIR, 1 ); + settextjustify( CENTER_TEXT, TOP_TEXT ); + setlinestyle( SOLID_LINE, 0, NORM_WIDTH ); + setfillstyle( EMPTY_FILL, 0 ); + + height = textheight( "H" ); /* Detemine current height */ + bar( 0, MaxY-(height+4), MaxX, MaxY ); + rectangle( 0, MaxY-(height+4), MaxX, MaxY ); + outtextxy( MaxX/2, MaxY-(height+2), msg ); + setviewport( 1, height+5, MaxX-1, MaxY-(height+5), 1 ); + +} + +/* */ +/* DRAWBORDER: Draw a solid single line around the current */ +/* viewport. */ +/* */ + +void DrawBorder(void) +{ + struct viewporttype vp; + + setcolor( MaxColors - 1 ); /* Set current color to white */ + + setlinestyle( SOLID_LINE, 0, NORM_WIDTH ); + + getviewsettings( &vp ); + rectangle( 0, 0, vp.right-vp.left, vp.bottom-vp.top ); + +} + +/* */ +/* CHANGETEXTSTYLE: similar to settextstyle, but checks for */ +/* errors that might occur whil loading the font file. */ +/* */ + +void changetextstyle(int font, int direction, int charsize) +{ + int ErrorCode; + + graphresult(); /* clear error code */ + settextstyle(font, direction, charsize); + ErrorCode = graphresult(); /* check result */ + if( ErrorCode != grOk ){ /* if error occured */ + closegraph(); + printf(" Graphics System Error: %s\n", grapherrormsg( ErrorCode ) ); + exit( 1 ); + } +} + +/* */ +/* GPRINTF: Used like PRINTF except the output is sent to the */ +/* screen in graphics mode at the specified co-ordinate. */ +/* */ + +int gprintf( int *xloc, int *yloc, char *fmt, ... ) +{ + va_list argptr; /* Argument list pointer */ + char str[140]; /* Buffer to build sting into */ + int cnt; /* Result of SPRINTF for return */ + + va_start( argptr, fmt ); /* Initialize va_ functions */ + + cnt = vsprintf( str, fmt, argptr ); /* prints string to buffer */ + outtextxy( *xloc, *yloc, str ); /* Send string in graphics mode */ + *yloc += textheight( "H" ) + 2; /* Advance to next line */ + + va_end( argptr ); /* Close va_ functions */ + + return( cnt ); /* Return the conversion count */ + +} diff --git a/M/TC/BGI/BGIOBJ.EXE b/M/TC/BGI/BGIOBJ.EXE new file mode 100644 index 0000000..482581d Binary files /dev/null and b/M/TC/BGI/BGIOBJ.EXE differ diff --git a/M/TC/BGI/BOLD.CHR b/M/TC/BGI/BOLD.CHR new file mode 100644 index 0000000..8af2bc2 Binary files /dev/null and b/M/TC/BGI/BOLD.CHR differ diff --git a/M/TC/BGI/CGA.BGI b/M/TC/BGI/CGA.BGI new file mode 100644 index 0000000..143c73b Binary files /dev/null and b/M/TC/BGI/CGA.BGI differ diff --git a/M/TC/BGI/CHKLIST.MS b/M/TC/BGI/CHKLIST.MS new file mode 100644 index 0000000..bc859e1 Binary files /dev/null and b/M/TC/BGI/CHKLIST.MS differ diff --git a/M/TC/BGI/EGAVGA.BGI b/M/TC/BGI/EGAVGA.BGI new file mode 100644 index 0000000..8001631 Binary files /dev/null and b/M/TC/BGI/EGAVGA.BGI differ diff --git a/M/TC/BGI/EURO.CHR b/M/TC/BGI/EURO.CHR new file mode 100644 index 0000000..bb1f9ec Binary files /dev/null and b/M/TC/BGI/EURO.CHR differ diff --git a/M/TC/BGI/GOTH.CHR b/M/TC/BGI/GOTH.CHR new file mode 100644 index 0000000..75f9a7e Binary files /dev/null and b/M/TC/BGI/GOTH.CHR differ diff --git a/M/TC/BGI/HERC.BGI b/M/TC/BGI/HERC.BGI new file mode 100644 index 0000000..c11db64 Binary files /dev/null and b/M/TC/BGI/HERC.BGI differ diff --git a/M/TC/BGI/IBM8514.BGI b/M/TC/BGI/IBM8514.BGI new file mode 100644 index 0000000..5e0933e Binary files /dev/null and b/M/TC/BGI/IBM8514.BGI differ diff --git a/M/TC/BGI/LCOM.CHR b/M/TC/BGI/LCOM.CHR new file mode 100644 index 0000000..0916763 Binary files /dev/null and b/M/TC/BGI/LCOM.CHR differ diff --git a/M/TC/BGI/LITT.CHR b/M/TC/BGI/LITT.CHR new file mode 100644 index 0000000..08c3067 Binary files /dev/null and b/M/TC/BGI/LITT.CHR differ diff --git a/M/TC/BGI/PC3270.BGI b/M/TC/BGI/PC3270.BGI new file mode 100644 index 0000000..faf87d8 Binary files /dev/null and b/M/TC/BGI/PC3270.BGI differ diff --git a/M/TC/BGI/SANS.CHR b/M/TC/BGI/SANS.CHR new file mode 100644 index 0000000..c38bc69 Binary files /dev/null and b/M/TC/BGI/SANS.CHR differ diff --git a/M/TC/BGI/SCRI.CHR b/M/TC/BGI/SCRI.CHR new file mode 100644 index 0000000..92fb8a9 Binary files /dev/null and b/M/TC/BGI/SCRI.CHR differ diff --git a/M/TC/BGI/SIMP.CHR b/M/TC/BGI/SIMP.CHR new file mode 100644 index 0000000..00ee8d7 Binary files /dev/null and b/M/TC/BGI/SIMP.CHR differ diff --git a/M/TC/BGI/TRIP.CHR b/M/TC/BGI/TRIP.CHR new file mode 100644 index 0000000..d1f79f8 Binary files /dev/null and b/M/TC/BGI/TRIP.CHR differ diff --git a/M/TC/BGI/TSCR.CHR b/M/TC/BGI/TSCR.CHR new file mode 100644 index 0000000..31900c9 Binary files /dev/null and b/M/TC/BGI/TSCR.CHR differ diff --git a/M/TC/BIN/AA.BAK b/M/TC/BIN/AA.BAK new file mode 100644 index 0000000..a7d8a9d --- /dev/null +++ b/M/TC/BIN/AA.BAK @@ -0,0 +1,17 @@ +#include +#include +#include +#include + +int main(void) +{ + int i,j; + + for(j=0;j<131;j++) + { + // randomize(); + for(i=0;i<233;i++) + printf("%d\n", rand() % MAXINT); + } + return 0; +} \ No newline at end of file diff --git a/M/TC/BIN/AA.CPP b/M/TC/BIN/AA.CPP new file mode 100644 index 0000000..2a1805b --- /dev/null +++ b/M/TC/BIN/AA.CPP @@ -0,0 +1,17 @@ +#include +#include +#include +#include + +int main(void) +{ + int i,j; + + for(j=0;j<150;j++) + { + // randomize(); + for(i=0;i<200;i++) + printf("%d\n", rand() % MAXINT); + } + return 0; +} \ No newline at end of file diff --git a/M/TC/BIN/AA.EXE b/M/TC/BIN/AA.EXE new file mode 100644 index 0000000..fffb786 Binary files /dev/null and b/M/TC/BIN/AA.EXE differ diff --git a/M/TC/BIN/AA.OBJ b/M/TC/BIN/AA.OBJ new file mode 100644 index 0000000..337cd41 Binary files /dev/null and b/M/TC/BIN/AA.OBJ differ diff --git a/M/TC/BIN/AAA b/M/TC/BIN/AAA new file mode 100644 index 0000000..ee5431c --- /dev/null +++ b/M/TC/BIN/AAA @@ -0,0 +1,29000 @@ +346 +130 +10982 +1090 +11656 +7117 +17595 +6415 +22948 +31126 +9004 +14558 +3571 +22879 +18492 +1360 +5412 +26721 +22463 +25047 +27119 +31441 +7190 +13985 +31214 +27509 +30252 +26571 +14779 +19816 +21681 +19651 +17995 +23593 +3734 +13310 +3979 +21995 +15561 +16092 +18489 +11288 +28466 +8664 +5892 +13863 +22766 +5364 +17639 +21151 +20427 +100 +25795 +8812 +15108 +12666 +12347 +19042 +19774 +9169 +5589 +26383 +9666 +10941 +13390 +7878 +13565 +1779 +16190 +32233 +53 +13429 +2285 +2422 +8333 +31937 +11636 +13268 +6460 +6458 +6936 +8160 +24842 +29142 +29667 +24115 +15116 +17418 +1156 +4279 +15008 +15859 +19561 +8297 +3755 +22981 +21275 +29040 +28690 +1401 +18137 +16735 +20343 +25267 +8312 +7111 +7733 +10993 +18554 +4353 +20126 +1018 +31086 +6970 +26484 +20614 +23431 +23999 +18086 +18730 +5504 +10891 +28492 +27015 +20143 +31246 +32484 +32180 +24168 +16704 +9679 +23528 +9365 +20966 +16135 +5740 +18323 +12580 +25378 +12736 +21327 +4164 +4748 +11020 +30113 +21445 +21249 +23243 +21480 +21672 +23625 +32691 +13799 +18422 +12344 +32231 +480 +30870 +14821 +7776 +17903 +16205 +20522 +23192 +19113 +25878 +14172 +121 +27381 +23461 +32332 +14982 +11562 +30774 +21118 +18505 +22889 +7323 +10152 +29436 +2365 +31365 +20079 +2683 +27762 +23826 +22109 +30313 +16179 +9367 +22310 +10146 +11623 +24752 +32028 +30177 +8013 +13446 +29935 +13747 +11094 +29025 +4778 +4763 +10563 +4974 +20459 +31111 +8831 +3281 +32099 +8051 +7103 +2798 +17294 +28764 +29656 +8693 +20147 +29287 +21472 +2732 +16926 +26962 +27785 +24193 +20125 +17948 +31930 +32207 +2104 +12016 +23918 +3184 +22326 +11096 +3794 +12421 +8269 +16543 +666 +32642 +40 +2695 +8100 +17788 +13855 +7212 +15057 +4791 +6706 +13624 +288 +15211 +14918 +5961 +3851 +13783 +31396 +1951 +12582 +649 +21935 +18698 +2550 +2795 +5862 +6675 +6416 +8722 +11546 +874 +24435 +5059 +28656 +656 +7463 +28103 +29849 +23749 +25622 +28529 +19921 +9780 +31785 +19309 +21270 +18781 +21671 +10186 +19243 +6851 +32460 +2123 +5580 +17624 +28070 +3818 +12467 +6181 +30516 +16046 +13259 +3006 +21185 +11439 +8371 +31205 +4221 +19302 +8566 +25854 +18013 +15418 +4745 +20659 +28214 +21321 +29702 +31592 +12565 +14708 +7720 +993 +7137 +22701 +21767 +18226 +31028 +32389 +6036 +743 +19574 +24816 +17879 +1909 +10812 +29020 +31336 +1760 +27104 +10738 +13101 +19374 +27744 +16683 +9554 +25613 +29820 +28567 +22670 +3392 +19468 +13290 +26004 +27471 +12959 +16712 +29655 +22767 +20826 +978 +21123 +23471 +12303 +26481 +18616 +2149 +26524 +19682 +30985 +25560 +3463 +22787 +29749 +2991 +5335 +2652 +22308 +13210 +8245 +16625 +4133 +17087 +324 +9287 +10087 +7527 +24893 +5044 +9909 +26345 +20175 +3308 +31862 +18391 +11574 +13513 +30180 +1128 +16538 +28250 +11404 +28454 +21418 +11312 +775 +984 +12921 +26596 +3319 +14002 +30360 +27629 +32324 +17339 +24693 +23456 +32152 +2688 +14836 +9608 +30233 +16887 +32331 +19433 +17510 +4278 +17187 +12175 +23252 +21845 +7917 +18652 +14570 +11040 +2177 +31505 +21019 +30465 +27646 +28124 +16322 +2221 +28894 +6435 +23139 +7182 +11608 +28432 +5665 +18161 +17146 +20573 +15995 +7921 +8327 +14049 +27979 +9123 +25871 +16988 +22784 +14595 +8269 +4991 +22043 +15903 +27717 +8511 +10216 +3074 +7198 +29787 +31871 +26851 +31805 +29996 +12282 +15247 +24484 +14253 +13048 +2836 +30345 +29130 +12370 +5807 +10810 +2029 +19997 +4600 +31281 +23495 +9696 +20812 +5747 +18780 +20503 +29307 +13102 +32338 +7912 +19891 +20882 +6010 +25636 +15021 +31215 +12448 +24193 +30230 +8977 +21135 +10774 +13120 +17113 +27496 +20504 +9737 +17437 +15653 +20947 +4364 +24001 +28265 +19180 +9223 +1814 +10634 +1749 +13965 +1394 +30177 +9617 +10988 +20241 +14161 +11178 +1377 +16172 +22 +6512 +891 +22360 +8399 +25971 +16333 +2593 +8911 +30275 +11736 +19174 +6304 +30567 +31287 +24311 +28889 +9627 +6924 +11246 +14114 +28239 +7339 +32587 +28549 +32348 +30342 +2899 +30711 +7177 +29784 +5418 +7206 +26686 +32662 +4143 +18309 +25351 +21779 +8857 +406 +20300 +29426 +20303 +8311 +20943 +19153 +16652 +23984 +26470 +1075 +29363 +14652 +3707 +23342 +12528 +22229 +16321 +26455 +12561 +16772 +4664 +22251 +14627 +16745 +9828 +27199 +5457 +12232 +13513 +15210 +22137 +30038 +23467 +7728 +5647 +7874 +2052 +9266 +15159 +13190 +5573 +4436 +32030 +15087 +850 +19567 +7834 +7018 +21560 +6200 +7938 +16402 +32561 +8304 +23631 +12407 +858 +10062 +25203 +1713 +179 +24362 +25593 +28582 +28631 +15467 +6111 +8600 +21758 +19378 +30897 +29938 +2608 +22599 +8422 +2899 +31947 +28357 +16511 +12507 +31288 +2050 +26590 +25526 +26602 +26689 +9188 +11752 +664 +32411 +10063 +15704 +187 +20651 +32082 +26142 +13386 +15993 +374 +31505 +1972 +10921 +6321 +10380 +29215 +21221 +26564 +15745 +16096 +25735 +730 +3778 +17467 +6539 +21086 +24715 +25948 +27061 +10524 +595 +31637 +7166 +18332 +2259 +730 +17477 +18620 +21080 +9594 +31027 +13196 +16710 +800 +20079 +11887 +22765 +20233 +24324 +3951 +10385 +8583 +29711 +17888 +12468 +6327 +5037 +22841 +11942 +9343 +1060 +31023 +31312 +6603 +3920 +23315 +25149 +26888 +4688 +24685 +12778 +5088 +9586 +17114 +20047 +15928 +26717 +16675 +5293 +30312 +15997 +2463 +26522 +4282 +1972 +24011 +5707 +12837 +8510 +11047 +2594 +26186 +15077 +5459 +26232 +23728 +19559 +11626 +1708 +10556 +14117 +21151 +1644 +9204 +24589 +30743 +16451 +17397 +19913 +19462 +28260 +4530 +5929 +31756 +22965 +3183 +11726 +4818 +17183 +7933 +20760 +10976 +29461 +32695 +13650 +29378 +7011 +6077 +11037 +15964 +30521 +19824 +21274 +8585 +21879 +20014 +10715 +20475 +31035 +13135 +30732 +15951 +31912 +7776 +29406 +16495 +8697 +10398 +6325 +8493 +16071 +16822 +5650 +28445 +11671 +22972 +16066 +31411 +29096 +29290 +26440 +16798 +30971 +29594 +10888 +17252 +10403 +24325 +26550 +31550 +8014 +16190 +1151 +31542 +23060 +28137 +16246 +25727 +10111 +3393 +7872 +14613 +5340 +20682 +18180 +17045 +16833 +29010 +18061 +2655 +17888 +26670 +8386 +7914 +5386 +19891 +9672 +8807 +3463 +30451 +25205 +24217 +7317 +11961 +13432 +23028 +9534 +9671 +20167 +10741 +5471 +30287 +14922 +32449 +21749 +22191 +7877 +9217 +31659 +22385 +24587 +29436 +30882 +18563 +23393 +29175 +6272 +8627 +20784 +7370 +5563 +2670 +18160 +4803 +7975 +23737 +27985 +9664 +190 +16240 +22187 +1671 +23216 +13247 +2472 +2665 +4779 +12766 +15407 +17944 +27500 +12561 +17044 +31173 +28295 +14047 +32511 +2685 +5235 +18834 +23834 +1221 +22233 +25071 +9727 +25717 +6429 +14391 +14432 +7634 +4910 +2142 +28920 +9199 +10891 +10634 +20275 +26694 +26006 +5327 +8729 +3986 +25885 +14121 +18816 +22511 +4134 +10939 +22387 +27701 +24059 +13127 +7645 +8337 +27254 +6638 +29818 +21605 +16527 +17448 +17151 +30051 +1827 +8711 +7048 +24549 +31751 +20392 +28995 +6287 +26957 +1530 +14171 +6951 +213 +14003 +29736 +15028 +18968 +28559 +5268 +20182 +3633 +24779 +3024 +10853 +28205 +8930 +2873 +5966 +3988 +6023 +24197 +21418 +2872 +483 +14386 +19487 +2621 +12816 +31280 +3964 +15721 +24534 +18125 +14224 +6829 +4261 +26082 +17227 +3317 +9427 +19004 +7704 +557 +26646 +17229 +20602 +916 +16709 +10004 +5605 +17477 +23883 +74 +21471 +20994 +29036 +3278 +11863 +21572 +28860 +6227 +13637 +1409 +20700 +32584 +26500 +21181 +14840 +26119 +1772 +19796 +15870 +28738 +31156 +23302 +29472 +1195 +13574 +20547 +3469 +26851 +27876 +24761 +21611 +16806 +1338 +4636 +3608 +17204 +68 +7477 +16290 +7682 +26147 +26926 +23429 +29602 +25019 +3356 +15268 +24560 +3792 +973 +649 +25214 +13665 +32212 +16353 +13378 +28227 +32211 +29747 +21886 +27906 +11017 +20448 +24561 +27380 +1564 +18785 +26940 +28575 +27687 +26299 +406 +29261 +5127 +22086 +6836 +4334 +29154 +12960 +25331 +22574 +11514 +3565 +24776 +22743 +5041 +8273 +23146 +1641 +14812 +13743 +21950 +6903 +11596 +13986 +15491 +31812 +27802 +26813 +28862 +24095 +3123 +16895 +23912 +7676 +13733 +27546 +20310 +5076 +27945 +20454 +8810 +21566 +18800 +20383 +3832 +8142 +2482 +31335 +9083 +31662 +13813 +26232 +13945 +12155 +13723 +937 +23732 +9315 +2095 +1444 +12178 +24956 +3185 +16742 +28623 +8551 +415 +6648 +20577 +15653 +12038 +22636 +30123 +26681 +24010 +2842 +29927 +31231 +4338 +18460 +24525 +16460 +10167 +28424 +10377 +5959 +22029 +17901 +27100 +17032 +8051 +3472 +24464 +17263 +16376 +26856 +6946 +10438 +12174 +13271 +16555 +5018 +11156 +9515 +22544 +27990 +29342 +22485 +32363 +2849 +7815 +5992 +953 +14970 +18617 +3029 +16580 +29459 +25788 +8293 +12627 +10731 +31997 +16888 +7825 +430 +15841 +20604 +26043 +21585 +31498 +24496 +9998 +20970 +6888 +8987 +26864 +12493 +5252 +8519 +31581 +10989 +27529 +2627 +10133 +17521 +22164 +19800 +30724 +6037 +31677 +18954 +9329 +8644 +28518 +14419 +28267 +19956 +24899 +9243 +31217 +14401 +9130 +6139 +28257 +26317 +31005 +21299 +27555 +29655 +21525 +9961 +8085 +25882 +29969 +22180 +1978 +11368 +4831 +6153 +11039 +3463 +31018 +3540 +22671 +25932 +18757 +23066 +13559 +3574 +18743 +9149 +9756 +23757 +27911 +11056 +25979 +29947 +1609 +19053 +18304 +27562 +17897 +31795 +748 +31072 +31799 +18053 +1152 +13463 +17203 +9312 +6895 +4512 +32539 +19131 +1795 +9146 +24883 +25797 +15374 +23406 +22740 +9050 +23700 +15917 +7864 +15303 +16182 +21293 +18052 +12735 +2017 +16769 +663 +2205 +8504 +23415 +1554 +14300 +8768 +4919 +12584 +32468 +27723 +5273 +29607 +29623 +3366 +70 +4551 +27084 +12678 +1043 +14131 +2794 +13233 +19610 +1110 +16439 +4713 +3098 +487 +17954 +23581 +4753 +9912 +1951 +23123 +13080 +23483 +7330 +2384 +29310 +10837 +2015 +10251 +15145 +231 +4032 +27729 +4649 +14746 +20134 +10041 +2461 +20332 +22116 +26059 +27723 +28024 +761 +23020 +24187 +17546 +22670 +6028 +28692 +21219 +2224 +29204 +23546 +2633 +31439 +1546 +28839 +83 +29687 +15111 +24072 +5363 +14797 +18907 +25754 +15172 +19660 +4862 +8645 +20630 +5569 +20794 +30072 +11703 +8837 +29846 +15622 +24196 +19963 +12679 +24385 +11185 +28490 +4178 +26069 +25301 +27739 +2245 +8167 +2233 +19349 +30230 +2542 +25058 +8407 +28443 +30417 +32092 +29111 +20140 +13890 +11721 +27898 +30806 +13402 +7339 +4435 +9537 +20086 +25582 +8032 +17764 +22865 +22969 +29411 +16615 +5218 +31350 +7997 +9688 +1656 +7456 +27440 +3602 +32660 +24012 +2006 +18795 +15367 +27259 +7901 +6173 +25804 +7711 +5124 +375 +26920 +5611 +5595 +4804 +28032 +11487 +22967 +4732 +19322 +2452 +7923 +29610 +24408 +10821 +21870 +5533 +7825 +6943 +834 +7123 +13233 +17098 +17858 +27170 +7027 +28984 +2486 +4392 +32540 +7341 +22234 +14069 +18458 +30991 +19092 +18424 +10462 +21872 +7670 +31783 +5878 +27610 +21236 +31859 +29295 +3930 +25831 +13419 +22122 +25679 +6209 +7215 +20221 +3828 +17810 +1688 +28749 +1068 +15292 +16293 +2793 +26766 +5491 +1833 +31081 +10673 +7672 +13235 +17223 +15801 +8470 +2494 +4349 +13602 +16989 +4890 +11616 +2764 +14237 +666 +4156 +24136 +679 +28671 +11825 +1121 +1600 +30756 +2509 +6638 +4709 +3436 +16875 +1240 +17350 +1129 +6475 +3942 +21117 +10446 +13171 +2513 +11279 +26263 +709 +7684 +29861 +21367 +9186 +16820 +19339 +9346 +8766 +29345 +28394 +23579 +25092 +10538 +6850 +15392 +11052 +11543 +16171 +18517 +4571 +14499 +27084 +25871 +14331 +5577 +32412 +24097 +9243 +8656 +7128 +25099 +10632 +25370 +17733 +15714 +7597 +7465 +12968 +25211 +22184 +3826 +23938 +2395 +12078 +18279 +10769 +29667 +2977 +15423 +18308 +8760 +7280 +3848 +9085 +881 +22958 +11376 +3277 +28293 +29686 +12752 +24939 +28531 +13950 +17657 +25525 +13491 +5753 +19012 +4843 +10461 +27571 +9428 +8937 +1176 +3688 +27950 +28453 +25797 +22117 +18941 +1256 +12525 +14178 +22303 +8401 +24041 +30366 +18163 +15239 +22736 +13756 +10726 +446 +9766 +20189 +2108 +21357 +322 +15871 +14876 +9805 +2048 +5014 +10719 +26518 +16040 +11369 +27802 +14581 +30751 +10927 +23785 +9425 +28236 +27753 +9215 +9663 +5837 +31490 +23787 +7491 +32732 +12325 +15917 +5578 +16763 +3039 +30073 +27620 +20199 +30710 +8650 +15046 +13372 +29833 +6058 +10240 +3173 +27113 +23489 +27259 +15175 +7095 +32669 +10422 +14382 +31038 +19648 +2625 +29815 +18194 +27120 +6266 +10879 +24042 +26298 +19079 +8396 +31420 +22856 +22676 +11643 +23575 +31333 +12878 +1513 +10437 +27598 +13472 +9893 +23457 +5308 +31405 +24470 +12469 +16558 +26126 +20585 +20376 +27772 +14925 +24894 +12039 +28057 +26530 +915 +28099 +24488 +24812 +18288 +7338 +1090 +6387 +4308 +13849 +262 +733 +31072 +16001 +10211 +12782 +10818 +19015 +13730 +29828 +14948 +25826 +12983 +1618 +23766 +5424 +25160 +13788 +27514 +31512 +27519 +6451 +6638 +16998 +10509 +11763 +23743 +26339 +19199 +122 +20683 +1460 +14021 +13930 +12023 +14325 +20864 +6241 +6163 +12950 +8332 +30456 +17674 +10101 +27726 +1786 +26446 +9148 +20799 +4326 +17795 +26494 +27449 +4007 +24682 +29325 +1793 +6802 +11281 +17054 +1558 +13985 +10553 +32416 +24761 +27374 +27399 +2905 +29245 +13427 +21743 +17731 +31633 +13568 +7390 +23462 +2059 +14718 +23975 +2294 +8311 +29538 +17841 +9327 +30816 +372 +11742 +18671 +413 +9154 +9406 +3348 +4640 +14047 +14836 +2198 +2043 +21089 +5609 +8934 +6067 +9882 +10672 +26376 +12490 +30102 +826 +22702 +9351 +17237 +4539 +1686 +31496 +6474 +26204 +22053 +8843 +30996 +15650 +17477 +25849 +23163 +23070 +6011 +20404 +20654 +1750 +16205 +31138 +12987 +15347 +23763 +21370 +25423 +17197 +12444 +28238 +5040 +23924 +27076 +25690 +7672 +14689 +4691 +20491 +21140 +17884 +5336 +32083 +21757 +11534 +5957 +16684 +25525 +905 +9998 +9067 +10116 +30646 +29309 +18119 +26100 +3455 +2905 +15145 +13066 +12862 +28343 +9782 +32327 +13542 +20000 +28187 +5856 +28272 +21989 +21144 +825 +9865 +27838 +8272 +18344 +122 +10409 +27215 +30823 +31831 +29954 +30172 +13018 +22635 +9695 +17537 +23043 +24292 +29871 +26713 +12867 +27579 +8722 +3738 +14419 +14055 +14587 +27746 +20355 +11970 +12036 +31174 +9009 +28347 +24081 +10009 +22412 +7742 +4905 +30841 +25995 +17376 +11921 +13216 +15912 +22735 +4394 +3049 +4322 +10362 +21261 +30881 +20850 +18556 +32612 +8593 +22732 +13518 +20876 +3529 +15705 +23598 +12136 +174 +15988 +10442 +23816 +12614 +24355 +20786 +9596 +18371 +3095 +32124 +29938 +19791 +26854 +3257 +8214 +31255 +8327 +1688 +21675 +3482 +21774 +1369 +28518 +7476 +2730 +9205 +13067 +1253 +10716 +15500 +7370 +26215 +29945 +783 +20956 +25201 +3299 +18478 +25178 +30789 +24836 +28804 +23901 +14208 +9867 +27649 +29276 +12322 +13035 +14744 +7106 +19676 +21904 +17195 +3790 +922 +3300 +7603 +27824 +2129 +12930 +31156 +28898 +28170 +31418 +20448 +6340 +25135 +25413 +5642 +123 +28182 +27978 +2126 +28939 +27340 +16017 +21119 +23475 +4899 +1541 +9681 +16009 +24574 +16240 +1736 +11862 +6876 +12915 +24416 +436 +21155 +18629 +8574 +22886 +7855 +6061 +1431 +504 +23579 +14529 +12702 +27288 +20814 +19936 +21556 +11571 +25546 +19566 +11 +25555 +19505 +27599 +21403 +18232 +29849 +21286 +14601 +21174 +27921 +25167 +19028 +26958 +8819 +12827 +9666 +14352 +17261 +10187 +16010 +20912 +32715 +14287 +30147 +16231 +3591 +13247 +1932 +781 +8979 +16283 +6269 +18037 +18533 +19007 +28494 +13320 +15428 +9514 +9926 +13476 +18514 +6000 +25575 +3767 +14938 +2045 +23640 +8855 +27484 +6924 +14611 +16421 +215 +24294 +8527 +20899 +21590 +25568 +31152 +22482 +11582 +23439 +9133 +29519 +14550 +6990 +18754 +30512 +27799 +7667 +216 +16602 +16054 +24782 +21873 +20774 +24816 +14306 +32536 +25268 +27029 +30055 +22408 +31118 +5848 +128 +22300 +10241 +6230 +14137 +9719 +1209 +2788 +14276 +3444 +3612 +4765 +27892 +21968 +30440 +16172 +31227 +23573 +6159 +9814 +24928 +27723 +979 +24780 +836 +11227 +30238 +21808 +20181 +8259 +7716 +32102 +17171 +7680 +32059 +4636 +6851 +11192 +22266 +18588 +16304 +9640 +28305 +3794 +24873 +11598 +3433 +29081 +18872 +12631 +3836 +6474 +20511 +6603 +28150 +2183 +32665 +25719 +3725 +2372 +21327 +15771 +16925 +29720 +8472 +24789 +16392 +15811 +3957 +20045 +4046 +30463 +13004 +8226 +8296 +10892 +11749 +3093 +2281 +17782 +29091 +23925 +11864 +30121 +30723 +29514 +19144 +10936 +5722 +3781 +4537 +9450 +17099 +32232 +28083 +16006 +26887 +28273 +4897 +23393 +10825 +29965 +25707 +10917 +9360 +5307 +25432 +9955 +7455 +21117 +11171 +92 +10803 +8518 +13019 +23948 +14340 +12833 +18816 +7672 +1279 +29854 +6491 +2874 +28994 +21378 +7454 +9290 +15703 +31150 +19773 +28430 +5173 +11088 +32268 +31781 +31860 +32585 +11033 +2288 +3280 +1247 +11212 +27619 +32738 +8612 +3389 +14090 +794 +13222 +3414 +15583 +23808 +17368 +29482 +25419 +18091 +21697 +16532 +28922 +5250 +6499 +30996 +16611 +2610 +8302 +31206 +2072 +30192 +16294 +8036 +6603 +28401 +19345 +13214 +21922 +21286 +26470 +25143 +11324 +24636 +31027 +11651 +26116 +980 +3661 +8414 +6197 +16128 +15357 +15439 +29742 +14590 +18536 +21854 +23800 +23864 +10175 +26931 +28437 +8315 +6568 +7152 +26251 +18807 +29421 +24912 +3889 +22648 +24420 +2688 +11066 +27236 +10270 +13630 +31743 +13045 +18899 +22576 +22801 +27191 +26510 +26759 +383 +18756 +26005 +21716 +4964 +29247 +14491 +20778 +21941 +24463 +13609 +12405 +16457 +13917 +27466 +18203 +28202 +6224 +23158 +4817 +26139 +20616 +2497 +9151 +25961 +30681 +20548 +727 +6391 +27721 +22988 +4466 +28804 +14284 +13250 +7725 +30784 +16958 +28250 +11012 +25743 +27298 +7680 +8364 +15389 +25498 +18687 +27445 +19490 +28454 +3444 +15329 +21239 +21921 +2930 +27711 +3290 +13305 +24439 +16011 +3838 +32046 +14607 +30538 +7383 +19214 +22983 +3106 +25507 +23087 +2132 +25591 +18492 +19757 +17413 +25676 +13086 +4901 +17510 +18392 +1716 +3442 +4406 +31336 +11239 +20647 +16011 +30197 +24809 +7372 +6468 +23813 +13887 +26846 +20399 +20039 +26125 +7553 +25212 +11625 +29094 +23304 +27106 +23869 +12628 +26279 +31503 +9997 +16996 +6903 +14806 +19260 +32630 +30635 +25236 +30494 +28419 +11409 +22627 +7193 +21551 +15308 +899 +25596 +19921 +3920 +3077 +16031 +12224 +7582 +15545 +17596 +609 +31170 +6746 +27662 +21614 +27274 +31480 +18600 +19208 +25864 +10663 +22423 +7168 +1610 +25190 +3772 +24162 +26712 +12882 +11747 +23875 +28271 +2060 +3368 +22733 +25725 +103 +25740 +24968 +3549 +15190 +18643 +14827 +32596 +17686 +22944 +27171 +24652 +24471 +23764 +29218 +28496 +14385 +17187 +17899 +26055 +21892 +20985 +29 +5877 +18864 +28300 +30398 +26159 +29879 +17986 +7754 +28765 +25391 +20549 +26364 +1206 +5420 +25700 +92 +18616 +14700 +25389 +12042 +9062 +10436 +11081 +8393 +19398 +11724 +22552 +27343 +5786 +25799 +1421 +7755 +24414 +16341 +5451 +7992 +10370 +31580 +12545 +10593 +20200 +3763 +1539 +12213 +27809 +25873 +30249 +461 +18148 +27318 +14829 +25532 +25424 +14936 +12224 +1046 +8291 +30416 +21676 +31811 +27963 +7429 +8753 +18181 +31883 +23065 +19801 +22856 +3809 +12755 +8989 +18730 +12310 +333 +32252 +12107 +1046 +10718 +4314 +11862 +32466 +28746 +790 +19664 +9090 +23593 +6640 +3360 +10016 +9109 +27417 +28640 +4641 +28440 +21660 +19555 +15734 +468 +13805 +11143 +18115 +4596 +9806 +4284 +22495 +23891 +9323 +23893 +23948 +18028 +31533 +14862 +2424 +1410 +22498 +13023 +15219 +14864 +19857 +28928 +11763 +26739 +16791 +16189 +453 +12246 +32134 +17532 +1301 +17502 +25151 +8332 +20898 +31127 +30797 +22320 +7738 +26911 +22917 +13675 +24444 +401 +12252 +7438 +5071 +2485 +17801 +25216 +22173 +25573 +25179 +10446 +5844 +7618 +29276 +26611 +3231 +6169 +12711 +2409 +19042 +21264 +22919 +18160 +1268 +10901 +2769 +14237 +28448 +3848 +29060 +14119 +17502 +1575 +23966 +4974 +24270 +58 +19777 +11340 +29814 +19841 +9223 +29089 +22461 +16347 +2978 +27545 +22311 +17591 +14776 +14657 +6227 +832 +5886 +12618 +2610 +19140 +915 +4380 +19081 +23910 +13471 +26142 +6826 +25349 +26412 +7493 +16239 +4203 +25668 +25819 +26743 +20154 +4684 +19601 +31396 +28436 +4000 +20424 +22997 +13962 +4720 +13852 +3553 +20039 +2523 +30259 +24276 +25598 +15434 +1732 +17517 +1681 +24334 +18923 +17624 +2818 +25405 +32427 +7848 +1439 +29641 +25796 +23064 +9066 +24802 +32440 +7555 +28614 +29839 +7704 +24865 +21097 +27784 +9748 +24067 +20862 +5462 +12354 +21586 +25625 +17070 +32686 +1220 +24801 +8458 +28195 +31071 +21752 +7305 +16313 +31090 +20270 +22793 +2208 +17616 +27495 +30594 +4395 +29264 +10826 +9382 +25632 +3458 +24876 +11447 +29503 +20403 +20027 +4264 +32272 +4131 +7407 +22647 +9970 +18309 +26286 +7882 +25185 +17080 +31678 +4552 +11399 +24773 +112 +25914 +12550 +30745 +10891 +29155 +20741 +16132 +10999 +32285 +13177 +21361 +4010 +27573 +19381 +15847 +10712 +18184 +565 +3009 +17494 +29534 +27559 +23722 +13904 +28806 +14907 +32603 +7724 +30131 +21804 +31129 +20669 +23959 +17039 +5993 +18604 +8126 +20315 +23958 +8740 +21292 +8634 +31590 +28349 +30266 +8591 +6040 +28076 +30638 +25416 +5282 +29736 +15642 +229 +10281 +4639 +8823 +3401 +25024 +16154 +12033 +3521 +31973 +7022 +31573 +9682 +6713 +4516 +1225 +24904 +15360 +25643 +27148 +18556 +8665 +29500 +19711 +10981 +24510 +18190 +21971 +19426 +19519 +10812 +4963 +24006 +8698 +24691 +13524 +30500 +28767 +17760 +22635 +28253 +14242 +24537 +27566 +18280 +19457 +13642 +22718 +8162 +23608 +26979 +31988 +17750 +14145 +30207 +9403 +25038 +11601 +1880 +2222 +27290 +10256 +18538 +2034 +15711 +22039 +11172 +7125 +5988 +1455 +31702 +16551 +21273 +2761 +16727 +20441 +6121 +19513 +18294 +1877 +26689 +21559 +20003 +14877 +14817 +24 +13279 +26150 +1122 +11080 +9185 +11127 +29193 +29068 +5258 +24702 +7883 +25719 +8715 +16306 +4512 +20522 +4436 +27247 +23565 +27472 +1856 +15630 +3052 +3672 +16384 +12356 +23423 +19957 +21189 +17341 +19381 +5332 +19890 +11769 +5307 +6301 +13825 +19814 +6342 +17965 +14452 +5823 +17696 +273 +5630 +31908 +3441 +21062 +6322 +3195 +27984 +25135 +7405 +15494 +7178 +23000 +31424 +10053 +24241 +1898 +23456 +12302 +9321 +25070 +18513 +19691 +22767 +18502 +31504 +29108 +6506 +5993 +16896 +22637 +14198 +29662 +32215 +8930 +13934 +25212 +2249 +4481 +12026 +3168 +4532 +19320 +17626 +18991 +14222 +29711 +6897 +21133 +28940 +2376 +29077 +10206 +3220 +18356 +23318 +8508 +21606 +3992 +12940 +10937 +8966 +1857 +16614 +6358 +29676 +30373 +15408 +11075 +15471 +6203 +3364 +6873 +6383 +23324 +1781 +20182 +6722 +21083 +32087 +5464 +16225 +19873 +25810 +31515 +26452 +22285 +26953 +7799 +18267 +4683 +9926 +6549 +12638 +14579 +28808 +24561 +13975 +12324 +21071 +11029 +29309 +29536 +14310 +21140 +2548 +20651 +26354 +11076 +10932 +12768 +14075 +18881 +5879 +28499 +13240 +17439 +2407 +26541 +5535 +20206 +32071 +22788 +15533 +20852 +9952 +14137 +6515 +19750 +10286 +31639 +12386 +13416 +19916 +10665 +9047 +3207 +24605 +1372 +28010 +30451 +21692 +13910 +15603 +32193 +27687 +21653 +6110 +16224 +1959 +6732 +13873 +21915 +17282 +14075 +16091 +5072 +8548 +32717 +21184 +30831 +20235 +31030 +4609 +28086 +21811 +30157 +1936 +13738 +15041 +18023 +9972 +7513 +26675 +14197 +18522 +21328 +22343 +22432 +20189 +32087 +23274 +17315 +25879 +26996 +2916 +29544 +31720 +30239 +8899 +17510 +30598 +3522 +21893 +15674 +14021 +20853 +29577 +18052 +24745 +20215 +23864 +21765 +9257 +24048 +6383 +16630 +22086 +101 +5296 +18091 +6733 +25212 +24586 +27753 +104 +21874 +27206 +18820 +18027 +25050 +4307 +27324 +9950 +19736 +2548 +20442 +25158 +11805 +30632 +16007 +28345 +28005 +11994 +26220 +31137 +19502 +32458 +4752 +10192 +20218 +1211 +25582 +16325 +10055 +22494 +20822 +10813 +30861 +6526 +26758 +29949 +5241 +13678 +3208 +17375 +2665 +24240 +11598 +23579 +9768 +5223 +13453 +13784 +14827 +15102 +9175 +16371 +20363 +5530 +8188 +16911 +7429 +11198 +26018 +2269 +22575 +26429 +25378 +18605 +17853 +30310 +29606 +25142 +8052 +15978 +30593 +30114 +11693 +27153 +17871 +28637 +12300 +24733 +13134 +32287 +29058 +12542 +10875 +5048 +9089 +15673 +4336 +28188 +23679 +12818 +30205 +17198 +21934 +5889 +18054 +1489 +17401 +596 +541 +27821 +26690 +15777 +11616 +10046 +13019 +26223 +32148 +27940 +5699 +22308 +31106 +21414 +25890 +25649 +2962 +5511 +22406 +14717 +16678 +14606 +4960 +25616 +13114 +16464 +21562 +21505 +21561 +20417 +3643 +25250 +7970 +30458 +10333 +10473 +25563 +1997 +10732 +12834 +11477 +10119 +30531 +22227 +31202 +1668 +31171 +19440 +19539 +27129 +20244 +12864 +16470 +29694 +23455 +12815 +12174 +21978 +23628 +28437 +6388 +22676 +21369 +24742 +18925 +26550 +27963 +23068 +1196 +2660 +14040 +20354 +8139 +30366 +17797 +8834 +23333 +10962 +10332 +913 +26103 +14758 +16801 +13145 +21046 +13315 +25398 +12390 +28979 +23909 +19036 +7445 +21869 +5730 +22188 +27066 +30135 +10617 +6229 +3857 +11659 +26141 +4503 +25831 +5805 +13826 +18304 +24841 +30723 +6311 +32230 +19053 +17844 +12580 +15014 +11423 +28288 +21046 +27675 +5999 +29280 +13448 +20193 +30425 +32350 +17220 +28363 +3893 +2487 +10970 +24355 +27040 +12334 +5648 +1569 +15529 +17843 +17739 +6062 +7488 +24373 +27676 +7002 +988 +19652 +270 +6554 +29164 +16620 +27567 +19527 +17281 +8525 +15580 +28245 +31033 +15487 +23890 +1744 +1647 +24869 +24178 +19228 +28576 +4687 +22868 +29805 +17697 +21782 +2064 +9349 +17919 +21362 +1353 +13742 +14135 +20575 +24058 +4599 +15127 +10544 +24965 +28082 +13556 +24627 +23545 +302 +1293 +27782 +9891 +7601 +10431 +19257 +15065 +14778 +2795 +3494 +13058 +20597 +4261 +24844 +26090 +12414 +11807 +19314 +2117 +5594 +4052 +6587 +129 +11059 +9208 +15110 +22736 +20052 +4128 +1353 +31606 +13285 +24366 +7981 +9552 +18023 +29567 +2860 +15014 +23667 +2392 +4073 +27186 +8751 +21903 +31184 +19056 +21009 +3190 +29166 +23848 +6360 +23821 +26130 +9530 +16583 +11367 +15909 +15018 +36 +7517 +23239 +2284 +1778 +12402 +6444 +9072 +10218 +2054 +22581 +23665 +14528 +7360 +15058 +2555 +1428 +28213 +9111 +9531 +29622 +31709 +9629 +12299 +12190 +4664 +26268 +3262 +555 +14396 +11846 +13352 +10524 +18691 +7910 +30194 +20172 +1458 +21305 +12060 +32050 +11181 +23949 +8915 +10265 +23289 +25624 +24949 +10908 +22769 +22171 +27107 +21476 +31533 +31031 +28934 +24357 +18095 +16527 +31652 +29399 +3920 +15136 +13925 +818 +9066 +989 +14368 +13293 +20423 +31246 +6764 +5431 +18378 +14954 +5220 +22517 +15836 +5492 +954 +21822 +14361 +32531 +4095 +1301 +27964 +13173 +21552 +16486 +13768 +3365 +14981 +27203 +23929 +18539 +30327 +23647 +24810 +12260 +18704 +13003 +25479 +28258 +31607 +21232 +27062 +519 +15291 +18894 +9025 +3228 +18399 +23924 +20999 +32055 +4903 +28095 +6372 +20238 +20898 +86 +16093 +22934 +5625 +5094 +12944 +28127 +28022 +5787 +23003 +15668 +9816 +7135 +31180 +17646 +11349 +11607 +17097 +15257 +10097 +21274 +19713 +15179 +18687 +12084 +4370 +9536 +29428 +18523 +10491 +31418 +9588 +24560 +25925 +10008 +24215 +28473 +621 +30517 +22651 +10205 +2710 +14852 +20880 +5025 +12141 +18025 +19232 +12130 +10331 +25178 +27165 +7506 +24818 +18230 +26159 +19063 +914 +16229 +13054 +9057 +11355 +6450 +20413 +13354 +20568 +27365 +26871 +20404 +9449 +25636 +14494 +6687 +4977 +10380 +20561 +4745 +1345 +28555 +14829 +30730 +5061 +25985 +6744 +9710 +26861 +2583 +17034 +17205 +23519 +2015 +23260 +24904 +5595 +16684 +5269 +26110 +19310 +3636 +3506 +23759 +21978 +26725 +21238 +2903 +14534 +32516 +11315 +25870 +24610 +28941 +7895 +14918 +8797 +10310 +21177 +15974 +21195 +4517 +17702 +16741 +28753 +12004 +30247 +14474 +15442 +15715 +31765 +29282 +17887 +28222 +10592 +4610 +13594 +27566 +12444 +11646 +25323 +10149 +29389 +11178 +2279 +12197 +25588 +15632 +5501 +482 +12761 +3121 +28771 +8088 +6427 +257 +15168 +22702 +5238 +13213 +23194 +3212 +21077 +27215 +21251 +23609 +7320 +16068 +18048 +2489 +7847 +18060 +7738 +166 +13751 +23251 +11368 +17421 +14172 +23390 +21115 +15756 +23120 +2249 +30604 +10665 +11650 +20991 +23300 +7541 +18786 +12538 +3978 +24929 +10092 +29372 +10802 +7520 +19443 +1678 +29155 +4670 +11824 +12409 +6921 +23616 +2699 +15106 +23421 +31485 +2856 +1065 +25265 +6780 +29365 +420 +544 +22927 +13683 +6232 +4597 +2415 +11395 +25369 +24058 +8857 +20339 +17571 +9924 +27368 +8201 +24792 +797 +2291 +13390 +22844 +11698 +170 +2782 +26798 +2814 +21804 +5488 +14953 +29558 +19435 +9633 +6203 +3574 +3330 +10245 +19460 +18027 +7382 +22896 +20593 +11458 +27372 +25217 +11514 +18449 +29195 +1393 +6426 +10757 +9618 +18970 +17102 +20108 +10268 +21579 +21585 +5059 +1874 +20555 +5398 +22050 +30991 +8619 +16902 +31973 +21947 +16465 +30971 +702 +19425 +28610 +21372 +18106 +2323 +15535 +3258 +12658 +21504 +27843 +20172 +31347 +21459 +19628 +807 +6638 +206 +2152 +16993 +12964 +31271 +31185 +16167 +12 +15651 +6508 +18556 +5319 +31089 +32110 +16180 +30023 +32457 +4880 +6832 +23227 +32709 +32277 +22747 +10813 +9727 +19096 +30053 +27711 +13164 +23835 +17471 +20530 +11513 +19661 +19288 +2169 +19044 +5148 +30614 +2702 +10076 +17275 +18711 +32627 +29148 +8821 +21160 +28764 +4549 +27379 +10374 +31643 +1466 +2762 +6741 +7627 +28993 +6024 +21599 +23361 +6167 +24704 +17422 +21935 +17108 +19219 +23468 +6682 +18624 +25921 +4441 +13055 +15092 +23153 +13645 +19137 +27829 +13950 +31568 +27223 +21773 +8962 +21366 +8243 +1451 +2790 +28192 +7029 +13053 +20522 +1840 +1873 +2443 +32754 +21644 +12989 +19607 +12498 +13269 +20576 +31219 +30555 +29545 +23223 +28450 +7398 +21143 +26761 +19379 +1184 +5409 +32142 +3289 +27350 +17912 +9051 +7759 +27266 +1331 +22161 +23659 +29975 +32081 +5191 +17281 +10378 +23472 +5044 +18555 +12193 +26701 +30753 +5814 +6272 +6334 +1806 +12063 +19825 +14957 +11940 +9358 +7155 +4118 +26715 +29026 +30214 +32388 +17388 +8798 +22966 +9351 +9849 +21188 +2790 +31290 +2555 +13744 +2911 +21363 +18668 +10423 +32025 +24971 +16951 +3008 +23240 +4175 +24924 +23073 +12970 +23110 +22248 +16638 +20368 +28710 +3348 +11999 +31787 +20369 +9404 +6289 +19609 +9492 +1668 +28479 +6704 +5474 +21573 +976 +7562 +18893 +18110 +21379 +21201 +23558 +17272 +31177 +5196 +32022 +14074 +17251 +5931 +29596 +32558 +7868 +13967 +19784 +29203 +25993 +14557 +24472 +19621 +15263 +31556 +29650 +5641 +32532 +12173 +14915 +17150 +1434 +6178 +24758 +9600 +8983 +28258 +26679 +29886 +13705 +24356 +5641 +31038 +12826 +18825 +7141 +10574 +28543 +11271 +21365 +16815 +10646 +27571 +10513 +9853 +31296 +25039 +4537 +6242 +17276 +23444 +10323 +2556 +18116 +30784 +20006 +8587 +26028 +4451 +27286 +13023 +18361 +6503 +9761 +15745 +24960 +7263 +15514 +15137 +6400 +20241 +17061 +19008 +832 +22598 +31348 +286 +30508 +16465 +5056 +29926 +29101 +13021 +29451 +16664 +1800 +32508 +23572 +6968 +23930 +365 +7067 +16053 +27920 +25902 +3158 +15644 +204 +26179 +4915 +32381 +13557 +708 +28368 +32286 +28351 +17965 +30265 +3935 +2332 +6882 +8929 +14061 +13026 +19969 +483 +25643 +14878 +12653 +26745 +5853 +16567 +2072 +1981 +15639 +5703 +10384 +15264 +21861 +13110 +461 +12584 +8508 +4377 +28217 +16366 +29601 +23625 +257 +4823 +26648 +15047 +14747 +31762 +3535 +9296 +18840 +4178 +21259 +1981 +22700 +25933 +15572 +14749 +29435 +3957 +14045 +26645 +3494 +15094 +1974 +4087 +19862 +31728 +13620 +12065 +31880 +12790 +25889 +12312 +22617 +6855 +1568 +19174 +10388 +28748 +19684 +22321 +17977 +11730 +20882 +19357 +464 +22664 +22899 +26211 +5039 +26427 +6366 +15154 +647 +9553 +31077 +8774 +11318 +11525 +12351 +17607 +23752 +21730 +12534 +16996 +8142 +11393 +18513 +11312 +14308 +25734 +27524 +20668 +26749 +15833 +1943 +5494 +32242 +23586 +23828 +22850 +16331 +6023 +13300 +7254 +14668 +10666 +29644 +26971 +1092 +20957 +27700 +15298 +530 +19624 +22904 +24419 +12024 +14973 +29058 +1373 +31652 +20922 +1287 +2601 +22780 +30688 +241 +10497 +25130 +7698 +23565 +6256 +20712 +31953 +15606 +19514 +10253 +2806 +25666 +22639 +16472 +19441 +9963 +12746 +9085 +20801 +1279 +18255 +24942 +2867 +10379 +12581 +19435 +17630 +22726 +28849 +17485 +26463 +11642 +32245 +1934 +24658 +3768 +7719 +9373 +18321 +19644 +16277 +2273 +8240 +23582 +22200 +20236 +20665 +571 +30872 +15394 +11940 +32227 +11872 +5833 +14618 +30788 +15937 +17618 +24299 +18967 +25995 +23304 +27597 +24841 +16394 +2873 +30936 +20844 +22687 +7299 +31806 +24607 +7967 +23009 +21583 +4282 +16241 +8949 +27052 +1022 +5602 +2840 +17611 +12925 +15564 +12960 +12972 +20358 +28520 +18033 +21721 +24659 +15856 +20934 +14500 +21366 +20216 +20033 +20893 +9345 +10766 +7730 +29521 +22517 +18321 +23844 +9802 +23405 +25039 +12974 +29764 +5643 +17251 +4984 +1964 +13603 +3789 +7307 +14943 +295 +15186 +29919 +28576 +18131 +17174 +24863 +21850 +8345 +15992 +30143 +26776 +11343 +26798 +4929 +22850 +30999 +18850 +6339 +10522 +14735 +268 +30925 +8695 +1594 +28368 +7257 +32576 +15407 +13466 +16420 +26284 +17408 +19640 +14388 +3128 +19693 +12855 +17834 +7528 +18506 +22082 +27338 +20419 +12590 +24247 +26952 +11913 +27741 +27146 +22229 +951 +19576 +21599 +29674 +30782 +1635 +14819 +12500 +18303 +8695 +12908 +3329 +8714 +13034 +593 +15497 +7064 +26107 +15499 +16384 +16454 +11873 +4620 +23163 +11540 +8054 +19039 +4576 +18334 +16032 +8578 +9587 +28953 +22912 +1793 +9886 +20625 +11359 +31315 +8193 +4193 +25813 +121 +30394 +10995 +19643 +28373 +29174 +8889 +10579 +1864 +5304 +16748 +6838 +8592 +13801 +14980 +1919 +24032 +673 +19704 +24758 +7361 +22197 +16440 +18943 +14376 +6017 +22631 +29188 +14809 +31991 +7645 +10015 +2811 +29928 +5085 +29772 +22781 +3218 +14995 +21071 +11176 +3179 +30802 +14626 +26757 +12845 +17931 +7585 +16242 +13602 +15121 +10105 +15487 +178 +21515 +11085 +31503 +20778 +4410 +13611 +13868 +7887 +18413 +12079 +12842 +803 +17217 +28790 +15232 +1142 +4126 +16454 +14050 +29617 +4207 +6523 +32420 +18527 +12705 +14900 +2379 +9980 +25183 +19391 +5493 +32130 +9099 +11971 +22251 +25138 +20608 +14252 +24836 +8352 +31367 +26460 +19005 +8450 +29591 +27664 +17686 +5562 +25682 +30351 +10799 +6945 +2364 +12186 +12195 +13718 +29502 +22929 +18853 +22983 +26459 +27234 +28762 +27455 +14769 +10679 +18166 +23856 +16306 +8032 +24601 +24963 +13732 +24062 +7020 +21022 +13143 +30193 +22647 +16501 +3110 +7300 +31430 +22355 +13873 +21336 +31549 +31466 +5337 +7182 +695 +21274 +17020 +1081 +18918 +11262 +13682 +5506 +14951 +22717 +23624 +30237 +3364 +1167 +3388 +17773 +25071 +7694 +25849 +243 +3164 +18623 +28820 +32124 +4575 +224 +16070 +16523 +5415 +23924 +13419 +17925 +10938 +7309 +16444 +32283 +21201 +26074 +18889 +3965 +5238 +28529 +30650 +10685 +30172 +28893 +10567 +29697 +19967 +4203 +16116 +25581 +11132 +14001 +3730 +2255 +19635 +29792 +7795 +5901 +25883 +26188 +1004 +16332 +11237 +17337 +273 +8418 +28628 +745 +15789 +22782 +11356 +16355 +14207 +3094 +23546 +20869 +17852 +25618 +979 +14540 +19394 +22967 +13456 +22115 +30489 +20949 +31864 +4715 +9391 +23220 +1744 +25225 +18772 +5565 +25712 +23094 +31092 +6501 +14758 +12611 +27669 +22367 +19792 +27819 +5393 +21250 +13620 +5534 +12948 +13304 +7075 +10954 +27097 +297 +23119 +14316 +20256 +4070 +26217 +16279 +29939 +29530 +18942 +25412 +24219 +30766 +9875 +30107 +29149 +30844 +32000 +25345 +17402 +5111 +13962 +7266 +24038 +6232 +11076 +28736 +21447 +9739 +8616 +32253 +19377 +23834 +881 +12133 +20385 +7771 +17339 +25727 +1719 +11478 +12894 +15765 +12728 +15225 +14471 +12161 +1732 +13055 +15000 +20027 +18516 +15389 +6979 +31136 +13175 +23023 +7138 +22661 +8525 +8355 +5657 +19964 +30660 +21605 +19118 +21733 +17810 +31882 +16808 +28089 +9587 +14080 +30631 +2707 +17573 +22517 +21635 +9599 +10401 +8646 +10024 +27912 +4123 +8491 +8881 +13052 +2876 +31137 +6340 +2434 +10014 +11800 +27950 +14943 +18569 +12767 +32447 +1157 +4588 +19916 +359 +19421 +28831 +9647 +1425 +10070 +11608 +27129 +10431 +31022 +7147 +425 +11112 +32128 +17990 +14456 +26639 +31503 +11948 +15685 +26532 +594 +1329 +31939 +3871 +26304 +27767 +9313 +8795 +24157 +10663 +22905 +6192 +29572 +23475 +28861 +31701 +13559 +5578 +12767 +22388 +20518 +31003 +29568 +25614 +445 +10703 +7004 +31378 +2160 +15169 +20147 +569 +1547 +28544 +24314 +22565 +31412 +26119 +16067 +27706 +18052 +5563 +2794 +3900 +23878 +11814 +29697 +11817 +6286 +15346 +5118 +30425 +21502 +11433 +31780 +8660 +16340 +3500 +1839 +23924 +5560 +8817 +15299 +5692 +7109 +11777 +19223 +6263 +8662 +2993 +30685 +18197 +25874 +29472 +29045 +25538 +1466 +881 +28499 +9288 +31538 +29130 +6318 +4391 +12879 +30477 +1131 +26994 +16864 +22742 +23881 +2028 +24959 +10677 +30285 +1380 +3737 +7341 +23408 +5198 +3004 +2029 +10888 +20899 +9760 +29389 +16500 +1786 +28025 +19212 +1676 +6631 +18940 +7496 +27719 +9364 +7344 +27839 +22830 +29598 +22007 +1605 +8962 +25907 +11868 +27269 +21545 +25961 +28063 +11132 +20063 +993 +27646 +22834 +5530 +24220 +14790 +22971 +20286 +24093 +6426 +18543 +16770 +32448 +13827 +14438 +24354 +9050 +18617 +30262 +11078 +11538 +3633 +9456 +434 +21631 +17128 +21080 +3888 +4 +3054 +24165 +1594 +4968 +31285 +20986 +23533 +29881 +5147 +226 +6442 +16994 +4406 +4881 +3086 +30346 +13408 +20762 +26005 +29616 +28676 +20459 +3977 +13958 +16551 +22481 +18097 +10507 +27066 +8872 +17720 +21227 +158 +19810 +2395 +25371 +29177 +6331 +1111 +20144 +27960 +21818 +15762 +257 +25189 +5740 +13832 +22782 +32299 +2396 +6137 +28623 +20519 +2647 +32465 +25776 +1905 +21982 +25431 +10764 +29034 +28907 +30746 +4056 +9929 +9321 +537 +1843 +4833 +10222 +31154 +23356 +16693 +22459 +32717 +23347 +7486 +4598 +29513 +12755 +4219 +5926 +12966 +26094 +10938 +2543 +22005 +16458 +16550 +27152 +27901 +4796 +11410 +9882 +3503 +7299 +7556 +9075 +16076 +2023 +8325 +19979 +2772 +15634 +20520 +7516 +18227 +1582 +22105 +6440 +23463 +16577 +11368 +17518 +5621 +6213 +17750 +1838 +21964 +1547 +3679 +29535 +7417 +4690 +29128 +301 +20429 +4771 +18410 +7800 +12748 +24943 +25215 +11657 +27287 +19180 +7724 +20247 +7964 +11053 +9808 +4986 +27388 +31104 +22284 +28462 +17980 +15629 +27027 +3723 +9008 +9900 +22195 +25794 +20645 +19462 +7076 +4636 +27726 +16368 +19729 +32111 +29041 +1028 +9317 +15586 +12242 +3969 +29527 +10722 +14048 +26469 +10680 +15459 +286 +969 +22908 +2396 +27605 +32380 +25864 +125 +18168 +18147 +17339 +17715 +2391 +22289 +2239 +16095 +29960 +9762 +6161 +15442 +14355 +21469 +13775 +18060 +21853 +18826 +23490 +32438 +25047 +19472 +300 +9053 +25063 +15187 +16595 +6384 +21270 +31437 +2381 +4477 +11772 +16235 +17294 +12200 +27753 +16042 +7089 +16621 +24533 +31474 +22531 +27415 +25610 +10546 +27222 +26880 +14864 +27581 +10116 +12938 +5977 +24165 +20801 +11230 +13613 +12246 +24103 +14308 +27737 +17461 +11260 +18947 +10516 +7417 +2117 +21274 +17201 +521 +15121 +9663 +1676 +10263 +32767 +11703 +30638 +20540 +6545 +5814 +8387 +7380 +27318 +15960 +29374 +6044 +17042 +3423 +1738 +9483 +18064 +5167 +19444 +24814 +9898 +1671 +27928 +8263 +2040 +29313 +31497 +5223 +20856 +20173 +9988 +19273 +18204 +15402 +6487 +2354 +7962 +5669 +12366 +14215 +32111 +12054 +13150 +25838 +437 +21336 +18069 +4777 +21287 +28616 +10817 +19247 +22258 +30592 +4832 +15884 +31934 +25813 +9544 +23802 +19837 +29071 +25367 +13889 +10355 +25192 +4957 +2124 +23174 +455 +29577 +19085 +31688 +9661 +15505 +10130 +16194 +23873 +18534 +9320 +8451 +8360 +25495 +28976 +7786 +8552 +5956 +7936 +25776 +5390 +30534 +14077 +8633 +6012 +16540 +28342 +25371 +104 +21529 +30147 +12143 +18450 +22860 +6302 +17880 +22341 +5552 +13505 +12242 +24209 +17429 +14849 +4414 +4295 +30798 +13610 +25258 +23733 +23324 +8156 +485 +547 +19035 +29093 +17603 +7694 +10603 +11872 +31277 +2595 +28129 +28109 +1389 +11135 +13423 +6258 +32696 +3238 +27153 +21937 +3069 +24257 +21882 +26411 +18669 +15901 +3262 +27988 +3403 +21984 +9024 +20823 +23158 +16141 +7135 +20524 +12596 +14011 +27484 +25336 +13505 +1938 +5903 +165 +18455 +17030 +15306 +29890 +4480 +8920 +2318 +18332 +4186 +14666 +31853 +29598 +12586 +15009 +26943 +25574 +3045 +3425 +6281 +30761 +14458 +29380 +3370 +2505 +26019 +26364 +14407 +11828 +7662 +5291 +10745 +12928 +26374 +30623 +2614 +3141 +10055 +2770 +26109 +15290 +32130 +7585 +7366 +23314 +30477 +11341 +31273 +22297 +20495 +22448 +18381 +3339 +10762 +22592 +25492 +18869 +25769 +2121 +9732 +26063 +1228 +24934 +9465 +31640 +21970 +2370 +7817 +29107 +12582 +18829 +6200 +22337 +6156 +3905 +32349 +19776 +2990 +19735 +20436 +31012 +20322 +23876 +8677 +15540 +318 +15993 +2165 +12070 +13534 +18458 +11884 +4990 +31860 +12733 +10853 +18468 +3090 +2534 +23453 +27588 +25396 +30721 +23318 +13163 +10385 +26017 +19722 +11743 +9252 +27384 +7832 +28735 +885 +6806 +31658 +26588 +21549 +2150 +2341 +19799 +24793 +10214 +12117 +29947 +23550 +23974 +151 +30812 +1374 +24580 +2120 +30001 +13706 +17190 +3566 +23919 +31657 +19512 +6310 +5288 +14727 +26599 +16077 +22179 +27105 +24606 +3571 +9020 +31983 +11520 +5884 +11133 +30515 +32038 +27288 +31741 +16001 +20762 +4582 +24697 +16720 +17940 +20324 +15538 +25663 +27636 +13338 +22150 +25067 +17023 +21767 +19794 +2288 +14814 +11468 +14983 +1085 +21076 +30103 +14218 +6558 +14143 +1875 +17618 +2691 +29010 +1550 +20029 +790 +3089 +27818 +18610 +17277 +19086 +16328 +9469 +28524 +18274 +29937 +5095 +12272 +7150 +23047 +22421 +4983 +27348 +2283 +7715 +22562 +27056 +13168 +8577 +3151 +17947 +21376 +2189 +12642 +482 +2957 +17777 +19669 +8835 +17211 +27968 +4992 +20457 +19531 +17612 +6953 +15977 +7115 +32458 +15951 +32765 +25468 +26409 +7731 +6336 +6020 +30639 +28456 +29353 +11349 +4566 +31517 +3212 +6364 +23014 +1640 +78 +26863 +28499 +725 +15464 +27633 +32345 +15598 +3231 +19399 +26326 +28557 +19970 +6144 +29800 +27040 +27172 +4416 +25543 +12861 +30107 +16621 +12644 +22246 +3513 +10525 +27971 +20509 +20873 +6336 +4118 +10284 +4622 +28682 +3483 +20526 +5559 +24868 +8247 +20322 +2854 +30995 +2515 +14513 +1826 +31976 +17911 +4733 +10714 +26409 +26918 +7340 +18269 +4480 +10617 +8437 +12118 +22178 +19583 +14698 +28684 +14467 +30292 +14662 +12441 +22200 +5631 +9209 +32362 +16684 +27409 +24178 +10743 +29447 +24700 +1708 +3780 +475 +14514 +7548 +25241 +19729 +18174 +28313 +26621 +14739 +12839 +25324 +8185 +17851 +31810 +10522 +22283 +380 +19416 +24655 +10600 +14031 +12857 +12622 +23159 +20065 +27424 +438 +7050 +15483 +20872 +11671 +7647 +561 +1486 +29493 +3031 +3791 +264 +32027 +17781 +3456 +4517 +13924 +31770 +27456 +32069 +21829 +2431 +8453 +17371 +18399 +7667 +3625 +16385 +28484 +8663 +28443 +8347 +21703 +26199 +15431 +30640 +17801 +362 +32066 +23173 +65 +28940 +23610 +20219 +24907 +25019 +1438 +555 +14580 +13360 +8201 +1087 +14341 +7776 +26741 +1427 +7821 +946 +16029 +20749 +6388 +24705 +11699 +32698 +30525 +25813 +15683 +8618 +10907 +6750 +5735 +22542 +13623 +12722 +18732 +7311 +30785 +21192 +15941 +12785 +3125 +3253 +8431 +31209 +3951 +16549 +19747 +11323 +5874 +9244 +3587 +11031 +11637 +13935 +14463 +28854 +3247 +17789 +28231 +21040 +31972 +23987 +5366 +5025 +1713 +16704 +19836 +2429 +25364 +17044 +30668 +17200 +21951 +7711 +3784 +31481 +23965 +12103 +26729 +18184 +26534 +7339 +9779 +18391 +28640 +22423 +25048 +20422 +15542 +2760 +25131 +16378 +8317 +21601 +25672 +5751 +27972 +26413 +17666 +27004 +1756 +28439 +5773 +19487 +16169 +21735 +28269 +22569 +26791 +15679 +30622 +22836 +19264 +24277 +5381 +21763 +26444 +3058 +8215 +27938 +13033 +2860 +4040 +21950 +15742 +7008 +5046 +24007 +25994 +16114 +28566 +17476 +3251 +10824 +8927 +22262 +30219 +29061 +10422 +5681 +15013 +20867 +23578 +23030 +88 +12307 +19537 +13397 +24274 +12152 +3474 +3330 +7905 +28961 +20980 +12854 +16382 +25511 +22166 +23241 +28699 +14343 +28944 +21901 +25006 +23073 +18714 +25070 +11262 +2160 +2684 +28103 +8622 +26379 +6965 +13447 +18823 +10717 +8687 +31620 +25994 +12833 +26787 +26527 +13366 +15137 +26504 +10266 +22550 +29231 +1090 +29366 +4495 +5604 +20809 +3344 +14056 +30872 +22935 +24382 +5786 +546 +17557 +19365 +12250 +3281 +24136 +18461 +28005 +14763 +20407 +29769 +20107 +6117 +5025 +10544 +10879 +15266 +29533 +15904 +31197 +8176 +6161 +32453 +21116 +28672 +31767 +3717 +375 +5030 +18604 +13598 +28534 +6929 +27611 +20610 +15170 +26059 +29353 +26611 +13961 +8436 +29570 +7259 +12526 +30907 +5347 +29166 +15700 +6429 +31817 +12034 +23916 +23010 +12635 +19502 +16253 +12757 +16723 +12706 +31347 +19779 +11954 +15814 +29739 +25526 +31012 +20759 +24062 +10483 +18865 +23358 +29580 +30001 +3878 +9586 +26570 +156 +5827 +22031 +11342 +19978 +27942 +26999 +32474 +8445 +4983 +7210 +26920 +6873 +21717 +545 +7925 +23398 +18433 +18287 +26193 +16521 +18762 +22043 +30245 +8511 +30904 +23864 +30469 +8154 +2172 +30022 +4664 +28544 +26520 +24013 +15109 +10465 +5323 +4152 +7744 +2616 +9663 +9199 +25622 +16005 +20086 +16313 +12309 +2057 +29938 +5201 +2943 +27138 +7460 +7238 +9680 +11688 +14615 +7448 +6029 +24167 +10589 +9616 +4943 +6495 +31162 +1376 +12560 +19482 +9743 +31228 +16310 +16012 +29578 +3256 +18654 +1105 +10764 +24098 +13034 +12578 +14811 +23202 +11597 +27800 +6537 +5200 +21270 +16677 +26660 +15894 +12219 +16976 +8095 +1031 +4648 +26161 +25473 +15614 +23048 +11820 +14284 +12667 +11091 +31473 +11312 +29626 +13336 +10164 +18289 +1301 +28813 +18602 +16150 +17564 +6484 +10437 +18259 +25330 +10256 +25264 +1849 +22379 +7720 +12557 +32028 +4707 +31195 +20973 +24389 +26849 +1413 +6544 +17625 +30061 +27952 +4191 +8969 +27183 +18014 +14376 +27260 +4169 +30229 +21657 +20729 +28790 +8492 +21247 +4953 +24803 +4821 +11583 +15276 +29774 +17772 +25621 +14251 +1629 +31103 +27788 +19294 +24897 +1822 +11454 +11278 +14475 +21860 +25550 +20333 +30030 +9286 +6435 +15108 +3958 +5275 +28390 +24542 +28776 +6764 +29631 +20083 +6876 +17790 +20427 +20183 +5111 +3102 +26849 +10531 +18860 +1068 +23046 +10788 +29268 +13931 +23086 +12355 +8588 +30728 +28214 +19636 +3663 +30312 +542 +17635 +18005 +24886 +17803 +28 +19115 +24237 +26492 +11641 +20883 +13859 +3404 +11793 +10655 +23767 +8425 +3934 +31240 +20732 +21075 +8687 +23636 +28421 +26712 +30800 +2857 +11571 +15502 +23095 +8811 +26973 +32401 +30704 +11421 +13567 +6782 +27146 +31094 +19334 +24240 +18755 +31171 +7899 +15546 +27313 +7292 +9774 +16805 +3123 +26922 +23300 +8555 +32024 +21368 +4228 +29107 +3853 +1048 +4350 +28623 +23372 +4825 +11709 +28148 +10243 +28166 +11534 +17336 +31234 +27394 +17040 +24017 +7849 +15393 +32191 +18701 +14865 +18377 +23228 +21644 +9594 +7369 +24927 +10053 +10741 +32761 +32383 +25785 +25426 +20243 +896 +15601 +22348 +13522 +30751 +958 +3316 +27209 +10874 +11057 +12379 +389 +10595 +15705 +3715 +30055 +5350 +12604 +30088 +31419 +28952 +14104 +17675 +20125 +26403 +22491 +15071 +32270 +8335 +992 +18423 +25298 +10450 +27884 +31120 +20876 +283 +18281 +17051 +13597 +21084 +20193 +12653 +4921 +27030 +10686 +23978 +13900 +27241 +2112 +6766 +30860 +25563 +6847 +14526 +27743 +13160 +15139 +26159 +24047 +25163 +26017 +29653 +27147 +26892 +23735 +4462 +9793 +1355 +5227 +18640 +5690 +3531 +16576 +17808 +27222 +28866 +9080 +13556 +17288 +18527 +29969 +18971 +30835 +12701 +1274 +12907 +6086 +20807 +27926 +1595 +9173 +13132 +29812 +450 +17272 +28741 +32076 +4672 +25641 +17732 +6717 +875 +2393 +2528 +9925 +22812 +17682 +12414 +32513 +8506 +5588 +15585 +12967 +18919 +9641 +23797 +20289 +18410 +9866 +4056 +7596 +6493 +18422 +1834 +28368 +28824 +465 +11926 +21409 +4956 +12410 +1441 +23638 +14916 +15920 +14258 +15081 +31849 +21927 +7778 +25808 +4949 +23014 +6663 +4089 +810 +8036 +27771 +9996 +29459 +8803 +562 +4316 +16876 +13964 +21884 +26414 +9005 +27596 +22550 +30895 +20508 +9326 +3832 +12848 +6451 +6266 +19546 +19236 +25551 +16973 +13320 +20828 +24603 +28793 +30184 +28673 +829 +30943 +27336 +3538 +4543 +18698 +32622 +7840 +17983 +20431 +6618 +17415 +24667 +31779 +25822 +6510 +10199 +19772 +11745 +18241 +12305 +12268 +16623 +14702 +26535 +9530 +28422 +5406 +16486 +28226 +10908 +18869 +31606 +14671 +26228 +22796 +26052 +3126 +8867 +13038 +4272 +26614 +21469 +16337 +21240 +24973 +4357 +30422 +7653 +11293 +13045 +6914 +29364 +20544 +21130 +31678 +1095 +3240 +20724 +21646 +20748 +7163 +22076 +10254 +16686 +23534 +29207 +12851 +5371 +4512 +19178 +19903 +12182 +18233 +1821 +26884 +2526 +32451 +23716 +26078 +22941 +13896 +29388 +235 +14581 +31021 +579 +7182 +23048 +31438 +24427 +2084 +4839 +30299 +23264 +10756 +19902 +20467 +9287 +5820 +10557 +13055 +7002 +779 +21833 +10704 +15153 +8730 +30692 +27260 +3027 +20351 +9817 +21749 +17917 +8308 +16045 +24171 +5425 +14420 +11587 +26085 +9219 +31831 +27342 +11803 +24223 +655 +15996 +30870 +6047 +22562 +4192 +32267 +31500 +31433 +22561 +16372 +31666 +8585 +29665 +28528 +9897 +12465 +29552 +25949 +2337 +29973 +9138 +26547 +5229 +649 +26190 +14372 +11347 +20896 +8601 +10226 +19346 +30886 +21697 +11536 +27317 +7132 +7230 +13436 +5399 +28915 +12918 +11740 +22583 +29131 +14511 +3159 +31039 +6764 +21562 +14518 +7375 +20037 +27614 +12476 +19726 +16549 +4483 +20419 +2547 +31864 +25632 +31896 +20433 +26435 +30182 +14488 +16417 +23393 +686 +19467 +22677 +13695 +672 +3008 +25689 +29014 +25893 +29674 +5036 +12712 +16 +5179 +26016 +20350 +32520 +2367 +20525 +19616 +24376 +32506 +21117 +17748 +17211 +30917 +23923 +15708 +11074 +23142 +15997 +25642 +23943 +28271 +30875 +11366 +2807 +26073 +14256 +21155 +31771 +3296 +18953 +12125 +21064 +12577 +19499 +28726 +10503 +29938 +29410 +5233 +9159 +3074 +8070 +18607 +13250 +7474 +10896 +32234 +8748 +17843 +4190 +22447 +10915 +31072 +27715 +19872 +12755 +15453 +28115 +7209 +25705 +29169 +13421 +24706 +19003 +15522 +15625 +31718 +6581 +11151 +20036 +6673 +22407 +12562 +3753 +30464 +3725 +7830 +12609 +16356 +11262 +8629 +25695 +11112 +19417 +32407 +28325 +9509 +397 +903 +9819 +10338 +26855 +29142 +12017 +9744 +2881 +22517 +10450 +4613 +25833 +6349 +16235 +29561 +5840 +7266 +16764 +5310 +4212 +26025 +12190 +11844 +15887 +2471 +27925 +10445 +1793 +17355 +32472 +21228 +10363 +9100 +1247 +9668 +14445 +3910 +22956 +29951 +23731 +6226 +1053 +9741 +635 +23653 +26480 +19102 +8697 +28715 +23959 +14946 +23119 +3876 +10174 +2048 +29111 +3262 +24859 +27989 +1523 +17076 +24565 +2798 +30966 +30886 +12536 +5832 +26068 +250 +6327 +22087 +10727 +1778 +18306 +32628 +20035 +18958 +11115 +23931 +23900 +17060 +3219 +21604 +28918 +27582 +24506 +8209 +1102 +11828 +31495 +27257 +22151 +10506 +6420 +5412 +26967 +21260 +22077 +20966 +26610 +12712 +5162 +26335 +566 +8460 +28571 +14771 +2073 +27008 +13427 +32263 +20816 +7686 +31752 +9020 +15682 +47 +25002 +23919 +22316 +25920 +31089 +26033 +27285 +22662 +30028 +19844 +5108 +30455 +9287 +406 +6560 +16394 +14364 +22465 +6393 +22488 +31997 +17474 +21461 +30324 +28577 +4665 +10797 +135 +23949 +15202 +3081 +1328 +31653 +15122 +28585 +7451 +7922 +30837 +6133 +26335 +949 +9222 +14119 +7326 +20141 +9295 +14775 +32471 +13478 +28131 +17799 +4239 +29763 +25241 +14671 +24737 +3596 +5130 +14412 +23649 +26299 +1357 +3620 +26488 +16323 +18418 +30493 +13563 +12834 +4157 +6271 +7630 +5993 +7332 +13639 +28729 +3336 +3211 +27405 +29896 +32223 +574 +823 +9320 +24067 +11311 +9312 +19391 +1229 +4466 +28675 +6091 +20777 +15735 +22636 +18367 +1053 +9990 +15072 +27 +32152 +28288 +2571 +31498 +18301 +20308 +5291 +4608 +6896 +24768 +13436 +23700 +19424 +458 +29027 +24731 +18133 +3198 +25822 +3974 +3324 +11369 +27051 +3326 +23152 +29782 +25527 +31422 +25291 +3912 +11339 +17840 +20461 +10423 +28274 +12363 +28427 +26639 +32685 +5676 +14332 +7015 +218 +9459 +6848 +28031 +21346 +1633 +16210 +17148 +11938 +14255 +9136 +6887 +24988 +2609 +17447 +3683 +3295 +2347 +14820 +19374 +24756 +16628 +31672 +10331 +11146 +9033 +11563 +9933 +17572 +1268 +10181 +2808 +7937 +28830 +10904 +23124 +4236 +19184 +23570 +25378 +6533 +1009 +2561 +9955 +14383 +20892 +21479 +17429 +5307 +12225 +11137 +15153 +4468 +8478 +22418 +10977 +2861 +28093 +25845 +24454 +21992 +23184 +12770 +20970 +16840 +5707 +32640 +28994 +13369 +22403 +13740 +21608 +8541 +26629 +17672 +11862 +29114 +6520 +21320 +8678 +8227 +24373 +7609 +20680 +7140 +2406 +15890 +16836 +15153 +23902 +15744 +31282 +18897 +1849 +8684 +26295 +6 +8373 +24975 +28481 +28097 +18767 +26809 +21061 +9732 +2977 +7645 +9016 +13975 +3067 +4065 +2124 +14318 +15425 +15013 +4973 +346 +4357 +3537 +21115 +19824 +29669 +8676 +29384 +23223 +28454 +18298 +5077 +21653 +20113 +23774 +9545 +4220 +12686 +5584 +27699 +27472 +19071 +8600 +2945 +21276 +18272 +23371 +11200 +18678 +8092 +28764 +7702 +26416 +17202 +10599 +5757 +14272 +26376 +16698 +22850 +26354 +27279 +30245 +30653 +7756 +4761 +16772 +30802 +5058 +5495 +24970 +1448 +6427 +13399 +8527 +297 +14243 +24028 +2845 +5306 +9234 +5630 +28919 +8124 +5820 +7973 +30571 +6979 +21499 +8321 +3738 +20886 +28890 +17837 +1413 +1255 +8195 +4996 +9114 +24915 +4843 +28226 +29822 +22045 +15164 +3295 +12829 +12839 +30851 +21929 +30960 +8114 +32282 +24608 +12942 +23383 +32088 +6167 +25206 +16965 +24568 +15880 +16667 +5053 +7879 +16567 +20785 +459 +146 +11274 +23351 +27974 +19791 +10536 +31557 +26890 +16779 +19409 +11544 +24693 +19987 +10494 +603 +32032 +28646 +29369 +28472 +10207 +11355 +5438 +22815 +16635 +32143 +4435 +21462 +27566 +15122 +4069 +14530 +2272 +19153 +27364 +1140 +15649 +9798 +10080 +9847 +7655 +32735 +7397 +12120 +25097 +5293 +17939 +2295 +12667 +30286 +30338 +9486 +28747 +22813 +29141 +19967 +8413 +12952 +8220 +1506 +14691 +13329 +23408 +8143 +2207 +28057 +4809 +32616 +1501 +9513 +15907 +10923 +10283 +11794 +24529 +6646 +8412 +19624 +3873 +29276 +5436 +29227 +18481 +5671 +13205 +23798 +32017 +14253 +16226 +26859 +9242 +23128 +28882 +7197 +16270 +28145 +17281 +15296 +6769 +28716 +4210 +30030 +13991 +16505 +3920 +26619 +10319 +4618 +6885 +6748 +23135 +10273 +21723 +10323 +30848 +18588 +1203 +13630 +31276 +4290 +19971 +28256 +2822 +6224 +6644 +10639 +19578 +3775 +20475 +27679 +11413 +16088 +14807 +26127 +20006 +9339 +11980 +11634 +15894 +171 +25118 +17953 +29189 +6110 +28880 +16799 +19495 +1668 +2718 +845 +8285 +22486 +21048 +29903 +30359 +19169 +20673 +14013 +1641 +29138 +6280 +6542 +10220 +6019 +29446 +27330 +13784 +5958 +13848 +25168 +7391 +4850 +7293 +15439 +5196 +13100 +15763 +19176 +15324 +24056 +78 +3195 +6877 +3968 +9593 +4624 +15493 +16675 +17713 +16897 +26005 +2753 +23455 +17126 +7982 +27206 +16629 +6849 +4851 +23925 +10411 +20075 +29793 +14838 +1019 +3390 +29547 +28579 +25499 +13572 +29785 +8463 +13498 +14880 +2274 +15960 +30014 +16379 +26249 +3631 +15164 +28082 +22069 +20773 +11191 +19197 +22804 +27448 +15517 +12643 +32433 +16286 +24063 +7580 +10324 +10960 +26256 +27974 +13722 +18138 +24417 +21709 +22101 +26083 +2780 +6548 +32167 +28408 +17150 +23656 +12889 +2333 +2777 +39 +14465 +16534 +28489 +30893 +20565 +4722 +4854 +3583 +1609 +2649 +394 +24507 +20592 +24216 +9780 +13504 +29970 +13930 +350 +25369 +30345 +1673 +31146 +23599 +97 +12277 +25651 +10544 +4528 +19716 +8193 +25530 +24754 +22699 +24781 +30412 +13225 +7179 +1271 +13295 +10996 +3647 +4806 +2209 +14446 +4709 +14559 +24578 +16394 +16363 +28167 +31938 +7596 +8475 +3101 +22346 +3146 +5098 +595 +19497 +10819 +14589 +31404 +9922 +5887 +7421 +3771 +21556 +26057 +2076 +26522 +19082 +25065 +8168 +25897 +28708 +24581 +18256 +10376 +3941 +6330 +26868 +7639 +8862 +18550 +6065 +24877 +1083 +4249 +12653 +6871 +20269 +21964 +28703 +11986 +31639 +6048 +5411 +23435 +956 +32107 +6845 +9173 +7464 +5216 +6123 +8235 +21022 +31470 +17008 +4904 +1858 +30042 +15133 +23877 +14727 +10144 +4194 +11218 +92 +28806 +8982 +32566 +8210 +8706 +22915 +25707 +14481 +4814 +19638 +32180 +23612 +17737 +23557 +13985 +6945 +8082 +21217 +16198 +20069 +28895 +3293 +10935 +12271 +16419 +17407 +19656 +2644 +8160 +30023 +13059 +3331 +842 +1918 +21738 +4274 +20637 +8257 +22382 +22536 +11456 +21325 +32687 +6283 +15387 +6157 +12534 +22477 +21685 +12641 +4592 +26835 +23954 +29617 +13613 +5574 +22348 +5426 +24793 +16861 +18928 +29816 +20921 +3978 +5148 +317 +5481 +22243 +22358 +13168 +22484 +30804 +32174 +15489 +16372 +22403 +5272 +24300 +14284 +2692 +30980 +6148 +15267 +2366 +4287 +2050 +3202 +26909 +3342 +17485 +25072 +28922 +29320 +12 +30445 +4423 +25140 +14058 +3628 +3199 +24548 +17961 +18837 +23501 +4561 +8170 +28923 +7163 +13688 +1211 +1050 +3742 +17844 +28513 +13269 +31616 +3612 +7912 +7853 +32334 +10143 +27369 +27781 +3203 +6751 +19995 +9620 +16276 +8395 +21277 +24747 +12125 +18431 +20355 +9385 +26827 +26976 +6431 +6460 +19659 +14707 +8593 +25306 +25459 +26623 +9233 +17919 +28528 +3427 +20860 +28072 +19888 +24890 +9885 +28943 +27984 +30253 +22718 +29865 +27592 +30487 +1136 +606 +8533 +8544 +2711 +29960 +10663 +30867 +18360 +4910 +13516 +28482 +4487 +13570 +11356 +284 +9900 +4504 +30950 +31308 +31958 +3945 +29595 +26644 +6402 +13320 +20537 +28330 +24077 +3875 +2875 +83 +32121 +15549 +10303 +12734 +30332 +23210 +19639 +10147 +20303 +3403 +724 +22940 +29876 +28555 +12463 +9795 +27593 +2586 +4026 +29837 +16909 +11753 +12391 +24167 +26544 +19942 +22038 +8335 +24607 +13305 +14148 +19380 +29904 +11583 +28147 +29393 +22091 +2438 +9300 +21191 +22393 +2569 +18876 +12089 +12081 +7021 +23494 +24749 +27649 +30459 +4036 +20448 +1593 +1824 +26731 +23146 +15422 +11042 +960 +23699 +9485 +13860 +11581 +23668 +9486 +17757 +73 +4690 +12571 +18837 +9943 +18999 +3025 +24545 +92 +23250 +26902 +21919 +15607 +11665 +9195 +29620 +14556 +5116 +29300 +27909 +9217 +26197 +17477 +3124 +16909 +10094 +14063 +31900 +20093 +10698 +19658 +19087 +20761 +29176 +20997 +30415 +28310 +21035 +7149 +14666 +397 +31518 +3706 +20251 +1948 +32295 +5152 +28605 +11994 +31898 +29651 +17809 +3969 +97 +12636 +1428 +24022 +14809 +25563 +601 +8285 +7919 +11933 +22093 +13883 +10107 +18465 +300 +14827 +8924 +15205 +5310 +3109 +25301 +20342 +19671 +4875 +14248 +16695 +11918 +31126 +31089 +15217 +2749 +31553 +6853 +14619 +32697 +2036 +139 +15852 +22099 +19507 +6937 +4383 +22031 +27015 +31891 +26246 +27811 +27437 +26753 +8658 +17587 +17149 +6320 +8225 +10188 +23198 +13131 +13257 +18335 +1256 +11833 +15972 +19071 +23450 +7097 +5404 +14108 +21821 +7228 +6968 +7041 +8024 +29059 +16103 +2892 +2261 +28409 +17485 +20782 +2227 +17235 +2764 +28579 +11502 +22374 +14484 +19698 +32172 +15944 +30829 +9831 +8361 +29354 +13764 +9935 +18660 +23925 +757 +15413 +16011 +24996 +5592 +2268 +2852 +26978 +1678 +2942 +5630 +12388 +15501 +23235 +15575 +18312 +13802 +4100 +13519 +3503 +5350 +15680 +16268 +6615 +8124 +2655 +175 +21117 +7850 +21927 +32631 +11826 +17470 +29564 +8372 +22908 +3043 +26973 +9455 +15856 +15019 +16411 +30424 +9869 +28255 +18779 +22000 +32090 +26308 +29774 +10615 +24131 +30000 +3504 +1944 +31537 +15950 +1791 +15572 +3433 +14894 +8445 +24492 +20520 +7824 +5481 +15506 +16507 +8050 +7161 +9746 +7780 +12759 +26268 +30012 +27434 +15578 +28910 +18006 +24833 +25844 +16123 +15808 +8155 +23946 +26424 +24871 +2958 +27834 +959 +20718 +5927 +3431 +26315 +28121 +31117 +23427 +11891 +14076 +1882 +13980 +5035 +27619 +11766 +18090 +4216 +16131 +19445 +20247 +14707 +9313 +25267 +31760 +26241 +2177 +23854 +5643 +1745 +31633 +26660 +18329 +15383 +7383 +5997 +24942 +6407 +21080 +21659 +18606 +7956 +6346 +21200 +31610 +22378 +30652 +991 +22459 +9001 +26116 +19110 +4142 +7908 +10857 +26282 +31664 +13658 +1170 +21749 +10956 +15731 +10798 +8749 +28546 +16254 +25701 +27126 +17242 +15786 +22911 +32649 +14249 +7106 +20180 +31637 +23587 +557 +28403 +11094 +18338 +22565 +24598 +7412 +12086 +12599 +14022 +17694 +14189 +18940 +4299 +31207 +27620 +28694 +25686 +16096 +2318 +29037 +20338 +7799 +1092 +28331 +29608 +3215 +32270 +11510 +10738 +3681 +2736 +17133 +6882 +9107 +31992 +15589 +1811 +11415 +8007 +5221 +19408 +19013 +1758 +5856 +28676 +29372 +28012 +6065 +17762 +14197 +15572 +2396 +27093 +30890 +14659 +23044 +13610 +486 +30066 +12072 +24316 +19437 +32057 +23714 +26848 +24527 +25173 +13025 +6354 +5959 +6011 +102 +4063 +13913 +17821 +25213 +18709 +6700 +1915 +16702 +3240 +31013 +14189 +4803 +9061 +28742 +15216 +16811 +22108 +22981 +31600 +21199 +1738 +10480 +28117 +9796 +27205 +18240 +26192 +28561 +14123 +11964 +4839 +16690 +19788 +15761 +21311 +18253 +9942 +32496 +22058 +3507 +7553 +25895 +10609 +27930 +20476 +12547 +10211 +31641 +13208 +613 +29086 +7269 +7732 +20002 +23197 +2762 +21608 +13601 +31618 +31853 +26613 +30895 +20646 +14016 +29293 +2086 +4958 +13254 +30751 +25535 +14736 +12809 +32581 +20660 +18295 +19416 +10097 +6809 +24499 +29126 +19765 +24060 +15764 +25696 +1554 +6204 +1448 +2350 +163 +30887 +6274 +14060 +5386 +11992 +21453 +21770 +4507 +12879 +28050 +27233 +4040 +16209 +21958 +30520 +23885 +1282 +18968 +13943 +17820 +16577 +2041 +8746 +18315 +17092 +18667 +22329 +828 +6133 +29967 +13414 +27725 +21772 +14313 +20615 +3137 +16109 +25463 +9222 +24879 +19524 +19827 +406 +9385 +15455 +4836 +14903 +1775 +16203 +28139 +2157 +10837 +27443 +2508 +7868 +27378 +31477 +315 +30056 +16011 +4613 +29417 +13163 +14526 +391 +22607 +20150 +32627 +19112 +2746 +16301 +15231 +23102 +8855 +25565 +20891 +14752 +7425 +27648 +28549 +12487 +29577 +28979 +14708 +5541 +4677 +3446 +9154 +17605 +22555 +4964 +17621 +32549 +3407 +16693 +11086 +10577 +31819 +2801 +1142 +10176 +6319 +22518 +7909 +21619 +24729 +20397 +5492 +18892 +25654 +4489 +11877 +32428 +8073 +29761 +15058 +28625 +4731 +10318 +595 +21102 +17188 +22951 +1779 +3084 +5720 +11451 +11605 +27552 +10870 +12976 +5411 +24558 +8301 +12507 +11704 +10013 +32527 +22400 +21262 +13212 +7322 +17355 +32489 +16948 +14980 +26894 +23109 +23918 +16263 +15677 +15101 +18984 +15341 +17575 +22974 +6514 +9245 +22775 +19500 +23471 +28007 +18282 +3922 +12521 +30988 +8786 +11855 +12916 +31121 +25036 +20799 +29127 +15942 +12222 +16488 +2198 +4369 +31508 +10150 +30261 +4736 +11835 +9753 +17961 +16399 +9437 +30220 +15376 +4278 +15583 +14633 +179 +21431 +7833 +13532 +3177 +15782 +6229 +2820 +19119 +20409 +10506 +15073 +13061 +1361 +5721 +30266 +21259 +29641 +10697 +5837 +1500 +18559 +28991 +16381 +21675 +20769 +7873 +30903 +15517 +31290 +25452 +18853 +21990 +28669 +25011 +11159 +6182 +19792 +4826 +21038 +14342 +1308 +15282 +7882 +23054 +29140 +19606 +18359 +5834 +14148 +18598 +32659 +3101 +25244 +4163 +10498 +30693 +29884 +10955 +25238 +6097 +17090 +27542 +30457 +19071 +22738 +3633 +32092 +11737 +19237 +9689 +13861 +14001 +8533 +31803 +28628 +32155 +18407 +15211 +54 +15627 +13337 +32547 +7630 +15536 +9710 +10557 +9601 +9744 +13432 +5490 +6273 +32356 +4197 +2132 +24187 +16822 +10445 +30090 +6148 +23353 +7739 +31052 +3393 +30441 +12281 +8479 +1238 +26723 +4001 +24529 +3857 +8967 +18145 +18615 +4440 +32588 +7054 +28198 +7632 +18787 +7660 +32560 +25423 +21775 +19772 +160 +16773 +4804 +32391 +15672 +19814 +25086 +29098 +18729 +20954 +7397 +16547 +13524 +6312 +6431 +5402 +19136 +1951 +6644 +20531 +29916 +24072 +28585 +4243 +9462 +7753 +16406 +17073 +23675 +28634 +13449 +10079 +12144 +1389 +2272 +31896 +24241 +21337 +14305 +13451 +25962 +8776 +16605 +26345 +5587 +18978 +17029 +26732 +8496 +8505 +26380 +13480 +9992 +27573 +23935 +5654 +10148 +22338 +23649 +14430 +30156 +20217 +27019 +4325 +957 +13197 +25410 +18839 +10094 +17335 +1689 +6646 +12805 +16611 +28426 +14947 +30356 +7196 +19280 +23980 +7192 +14133 +17287 +23767 +22196 +1593 +19591 +302 +25642 +7445 +25725 +6284 +26522 +30084 +29899 +16358 +127 +31036 +21795 +4125 +14567 +7255 +11230 +6402 +9971 +5123 +10146 +22186 +23951 +30062 +20021 +3317 +2162 +18668 +23708 +13657 +20312 +23915 +29816 +27380 +23678 +26649 +4769 +210 +8799 +15443 +2819 +11899 +15534 +10193 +1465 +32449 +2196 +16144 +14697 +27848 +20523 +9729 +24288 +23382 +9531 +8432 +6638 +21085 +18228 +31158 +21379 +11974 +12395 +1315 +16650 +12416 +9881 +21670 +5381 +4809 +27281 +24638 +5355 +6844 +25410 +13478 +4159 +18460 +24557 +29116 +29937 +5215 +19879 +9523 +31993 +27646 +31761 +19834 +12594 +19964 +19799 +4332 +15732 +15797 +28007 +30009 +20982 +29417 +27763 +8980 +3554 +29705 +22698 +542 +12089 +1728 +13106 +14610 +1002 +8901 +23657 +24114 +22574 +21216 +21341 +25586 +24103 +12347 +25737 +3556 +19129 +25579 +9171 +31204 +9128 +23231 +19906 +2437 +31474 +5960 +27652 +14266 +4975 +20009 +22816 +9929 +10919 +14496 +32631 +29293 +25588 +18773 +28545 +4682 +4313 +12131 +10566 +22679 +21153 +21412 +13595 +22791 +20796 +15426 +26527 +17400 +854 +635 +27893 +479 +17337 +18100 +30531 +6899 +12260 +20161 +11371 +14104 +3053 +14963 +12041 +16911 +10132 +31332 +24237 +32732 +169 +29951 +11098 +7544 +7840 +1490 +6207 +2489 +25458 +17176 +18869 +8830 +19894 +13698 +14968 +543 +26624 +28230 +29738 +30996 +24954 +10090 +26373 +32740 +3009 +23122 +15584 +11600 +14851 +30857 +17253 +31937 +15702 +13004 +18833 +28911 +31323 +31325 +3181 +24275 +21523 +10374 +3851 +27856 +26625 +30827 +31171 +4637 +22401 +16149 +23727 +8822 +6760 +3516 +29029 +12803 +5853 +10837 +14324 +23944 +31351 +2652 +2849 +17103 +4248 +15331 +2019 +13651 +4618 +26844 +25628 +31534 +10711 +24739 +4250 +7748 +11118 +21455 +16974 +7601 +13811 +11834 +16075 +2929 +16614 +15182 +2050 +25167 +19961 +147 +17212 +8207 +15403 +31350 +30552 +28639 +30760 +10076 +32327 +28923 +1509 +3303 +17861 +26016 +8055 +9096 +15194 +22068 +25909 +21573 +32656 +29876 +23311 +29901 +15478 +19549 +12077 +28089 +15189 +2462 +1483 +30501 +5553 +26174 +18004 +5999 +7556 +1481 +9661 +20558 +22710 +20033 +27173 +9751 +11232 +2307 +9131 +27980 +4162 +22519 +22158 +2663 +28930 +19196 +21131 +4069 +2983 +8594 +13172 +26261 +28630 +1226 +18189 +27682 +31307 +17771 +21548 +13278 +26395 +27238 +32528 +21970 +22312 +7036 +18177 +30724 +25829 +13358 +22825 +32264 +9292 +2789 +13490 +2762 +10780 +14434 +23586 +16538 +30296 +27497 +4083 +27513 +24061 +5289 +20086 +418 +20482 +30447 +5354 +9820 +4502 +26508 +7640 +6912 +19861 +19204 +6321 +19013 +4940 +6648 +5803 +22996 +8302 +31318 +10457 +28168 +4694 +14527 +27529 +3077 +23167 +11832 +31459 +17917 +4673 +24085 +3263 +7615 +2510 +22563 +11206 +18817 +11884 +11029 +20429 +18158 +9205 +29489 +20334 +26739 +11660 +20795 +26344 +18631 +16801 +21922 +20537 +20665 +25896 +11241 +10362 +15166 +10773 +4697 +7802 +17338 +27931 +27109 +9886 +27279 +11942 +27229 +12281 +31716 +8983 +18135 +5799 +17591 +22079 +20059 +20335 +8742 +32286 +21710 +2201 +22265 +22749 +28705 +15372 +21364 +12809 +21946 +28332 +23388 +27410 +25634 +6386 +13896 +8964 +9457 +29902 +22058 +22916 +21239 +11450 +8221 +10509 +12460 +10271 +17265 +29804 +15066 +28908 +19189 +9082 +905 +28276 +21636 +19226 +16683 +29065 +6866 +23666 +24073 +19927 +15736 +14190 +5101 +31875 +29502 +15474 +24593 +1028 +4777 +14686 +23368 +8513 +7366 +19911 +17003 +28140 +13877 +8820 +15110 +30 +14968 +4120 +8260 +16179 +21885 +4431 +25624 +27112 +20331 +7131 +20653 +2484 +30378 +15648 +13841 +20324 +21557 +5597 +20509 +5370 +5668 +4397 +28839 +199 +23668 +29373 +14828 +1478 +21530 +6223 +30007 +15676 +19528 +2672 +20951 +21902 +12799 +14454 +6208 +4706 +7638 +31676 +7552 +6650 +24585 +15905 +741 +3021 +14020 +24511 +3565 +7271 +6834 +14313 +9326 +12930 +19905 +19815 +14598 +16742 +6201 +8693 +13254 +23678 +24573 +11513 +8986 +16444 +1568 +24965 +16636 +19502 +13995 +23437 +6233 +10849 +5805 +4201 +22211 +8182 +31876 +7822 +5721 +17155 +7787 +6281 +11252 +4525 +25413 +26429 +17811 +9859 +16809 +8030 +25865 +1564 +22830 +26157 +741 +16885 +12792 +16757 +26018 +27781 +20099 +28358 +30992 +6818 +31663 +7664 +12802 +28184 +2829 +10947 +19001 +25991 +25449 +12806 +24721 +28029 +5016 +7606 +18794 +28373 +21379 +1153 +7001 +22095 +8052 +30850 +17424 +20849 +22944 +8509 +12683 +15517 +7670 +15582 +23421 +32372 +13351 +25774 +14586 +19562 +19446 +12502 +28262 +5290 +28610 +5977 +16285 +2348 +22865 +8779 +4707 +2068 +5342 +22871 +3343 +23887 +7782 +31345 +7540 +6505 +25904 +24023 +29712 +31152 +24987 +8526 +16248 +7567 +10540 +30363 +13315 +1316 +11480 +12607 +11190 +5412 +3470 +28536 +27248 +7153 +13064 +31348 +21078 +5113 +4307 +14808 +5249 +8018 +17821 +22129 +10727 +30867 +191 +26681 +8327 +21750 +23051 +19342 +2265 +29611 +2007 +31150 +3957 +22143 +8010 +118 +3842 +24494 +19174 +30043 +9826 +20741 +9046 +32681 +7964 +26684 +5754 +22012 +12297 +5266 +2225 +19196 +26690 +426 +7270 +17757 +20042 +29605 +19421 +16150 +32632 +12417 +16703 +10208 +23464 +29362 +6372 +18162 +2339 +8447 +31201 +30716 +23755 +18334 +12499 +24418 +29323 +3731 +14570 +29114 +510 +10566 +24377 +27272 +15198 +31587 +27708 +3641 +14512 +28407 +32682 +21341 +20270 +14280 +2685 +20265 +19700 +32757 +4928 +301 +28399 +14799 +12440 +23121 +6915 +4854 +26134 +6934 +10876 +17592 +20284 +25868 +20663 +15782 +17613 +7054 +27153 +24696 +26714 +28614 +16144 +21539 +16906 +13277 +2001 +8505 +23721 +20865 +15282 +6273 +3060 +32669 +31040 +16086 +18723 +4948 +4706 +14917 +20920 +2111 +2247 +31842 +29831 +7144 +1678 +9707 +14598 +6278 +7989 +24480 +19671 +11003 +25796 +9314 +25492 +24588 +7482 +14475 +29914 +9440 +9272 +19085 +1176 +26299 +17644 +30925 +24985 +11771 +6209 +14530 +1616 +20563 +13125 +23369 +2020 +5703 +12762 +10828 +16252 +28648 +27041 +23444 +6604 +5330 +20771 +21739 +14560 +11107 +26434 +32118 +21544 +21309 +9951 +6225 +709 +12030 +21197 +25707 +23571 +18751 +9718 +32165 +6775 +28875 +13260 +15142 +11370 +26657 +1267 +1793 +24518 +1068 +15404 +27403 +4945 +5697 +20357 +20214 +6791 +15706 +8639 +9138 +16301 +31377 +2048 +30725 +4115 +9440 +1978 +12905 +24232 +6167 +22747 +27686 +10436 +15134 +30774 +10672 +18738 +14701 +22065 +27715 +9597 +3017 +28080 +22717 +16765 +11329 +20290 +28604 +25889 +4456 +27787 +4856 +16510 +19668 +12273 +21474 +14873 +26839 +11403 +18302 +21361 +24957 +29254 +23422 +20432 +21702 +21081 +26784 +2388 +17957 +8172 +32329 +8248 +4409 +14596 +9058 +28776 +26570 +25522 +2163 +31045 +30471 +19324 +26367 +9142 +4094 +11020 +2591 +4719 +28508 +28184 +15458 +26758 +103 +22417 +5860 +12851 +14137 +30735 +28076 +23527 +24127 +124 +21835 +25488 +29426 +15616 +32179 +12332 +28116 +17453 +24149 +15244 +4525 +9836 +28543 +31338 +7687 +10663 +27893 +11951 +231 +23864 +24013 +4094 +25550 +4626 +23952 +30340 +12273 +815 +25230 +29699 +26036 +14905 +32130 +1821 +25452 +31868 +20071 +21726 +30550 +19467 +10906 +5262 +22739 +18738 +12337 +6581 +25830 +28 +17050 +10350 +14832 +28357 +11384 +32753 +3754 +20259 +25274 +18268 +24675 +29072 +9470 +18626 +21628 +13179 +30501 +9846 +26913 +24144 +12343 +30361 +20809 +31397 +6777 +28898 +6129 +25510 +24780 +6829 +26261 +9922 +17737 +7495 +2799 +31639 +23834 +12920 +6131 +24603 +19867 +21330 +15882 +9484 +18098 +5433 +13967 +30363 +13932 +24884 +24200 +11604 +29145 +29043 +23718 +29521 +20266 +16672 +28287 +2463 +27912 +23146 +14602 +14833 +9015 +11984 +14427 +16516 +22635 +26027 +10913 +14930 +14699 +19711 +4701 +25466 +3428 +22659 +11236 +12783 +9104 +23278 +29208 +6240 +5639 +25988 +3683 +32104 +24037 +31201 +20468 +13047 +29854 +31237 +1598 +31233 +32414 +673 +23213 +24165 +15140 +7073 +1451 +30496 +13664 +27386 +31443 +22194 +29388 +21942 +26741 +14288 +6856 +15165 +9802 +12877 +21369 +14053 +28536 +1091 +20451 +5053 +969 +15237 +19269 +24214 +3112 +19274 +28085 +16979 +24157 +23058 +22012 +6771 +31754 +21469 +17588 +26588 +26854 +3212 +9376 +5098 +13368 +32407 +27724 +11704 +20886 +29169 +5349 +3502 +7391 +5944 +8795 +2891 +9591 +25377 +30901 +12596 +7362 +13860 +31412 +7038 +995 +7267 +11691 +27704 +29878 +12769 +24222 +573 +8716 +30432 +1178 +24120 +27430 +8346 +23636 +25080 +7796 +12837 +30981 +22006 +18318 +27041 +18053 +24868 +9331 +19876 +14502 +24312 +7682 +26343 +9172 +16313 +24503 +29233 +31466 +24329 +27303 +5764 +28247 +31924 +16317 +27526 +10353 +17336 +32054 +23603 +8985 +2964 +2907 +12738 +21137 +16342 +13439 +21204 +8602 +6623 +17464 +740 +31441 +6394 +2529 +11755 +23372 +25757 +23120 +3154 +10864 +1278 +27860 +11038 +21269 +7641 +12147 +9303 +23006 +6017 +28258 +5049 +27858 +25125 +27333 +5022 +10303 +16229 +15528 +20011 +3281 +15893 +7229 +28346 +25325 +21584 +28247 +32648 +1876 +17345 +12327 +32672 +23797 +13358 +7735 +15623 +24594 +12358 +12965 +16169 +5784 +28843 +22176 +19843 +22968 +8515 +25384 +24211 +13513 +3260 +19713 +31485 +21858 +23134 +6137 +24830 +18611 +18965 +27996 +29718 +548 +6846 +29109 +17649 +26418 +1713 +13766 +15767 +23686 +656 +24266 +15829 +4183 +10832 +25066 +13291 +32257 +2181 +28413 +32119 +26342 +9202 +26244 +7330 +15493 +32593 +30437 +3465 +14298 +30559 +15592 +18413 +6645 +11051 +879 +14623 +20958 +23201 +32378 +16935 +936 +26450 +7515 +1588 +11475 +25478 +20534 +5448 +25063 +23428 +23740 +16164 +24911 +17696 +7720 +6769 +30579 +16774 +19577 +3121 +28698 +7495 +9970 +23398 +4350 +15009 +7632 +7425 +22961 +21011 +22347 +1037 +1200 +13602 +11216 +25116 +1477 +32613 +30076 +25586 +418 +25047 +20188 +22129 +31419 +29790 +7396 +32708 +12132 +14742 +45 +22736 +25899 +16612 +2419 +13015 +7544 +4792 +19791 +5486 +28515 +21282 +13105 +24738 +726 +18072 +7073 +32615 +26852 +9478 +14774 +13889 +19816 +26391 +15319 +23093 +15842 +31171 +8113 +31730 +398 +1049 +19833 +21308 +16070 +11086 +22115 +30362 +27034 +263 +29283 +11072 +14253 +2020 +6435 +22847 +5459 +31309 +21061 +28651 +22504 +16256 +6362 +18061 +10611 +15067 +28195 +17738 +27004 +24935 +30599 +25171 +32555 +16806 +17364 +16207 +22690 +27039 +5050 +29445 +5020 +22311 +16773 +19278 +2886 +24177 +9243 +4922 +18270 +13017 +2357 +10626 +2186 +32237 +8930 +29486 +28155 +12476 +1081 +30343 +28738 +31588 +2398 +10815 +11634 +5846 +18104 +17631 +17015 +19693 +23408 +6258 +11702 +27311 +17197 +18032 +30439 +2274 +783 +22509 +6191 +22227 +19946 +1539 +25729 +21346 +31684 +15996 +26422 +8274 +28817 +12484 +30955 +23503 +20013 +28431 +1435 +11329 +3483 +28614 +16382 +27216 +23420 +31544 +15905 +5432 +21459 +20862 +15174 +32079 +30968 +5295 +31486 +20691 +474 +17221 +2437 +30457 +23417 +20175 +21854 +25908 +31138 +6873 +24112 +23235 +21229 +28697 +29919 +11902 +9205 +12251 +18670 +6881 +21976 +21422 +16148 +13401 +9198 +1360 +19741 +30159 +23757 +23256 +22276 +3955 +23165 +802 +18767 +25546 +3576 +28288 +27818 +24315 +14822 +16286 +11975 +5206 +14487 +4278 +23669 +20005 +26944 +22774 +2303 +31672 +8314 +32302 +7880 +10667 +14328 +24254 +21796 +28794 +6536 +24511 +1913 +1352 +24909 +19313 +10646 +22764 +29499 +3045 +21843 +28990 +8147 +3563 +11626 +26784 +13345 +22590 +4502 +16335 +4339 +8943 +24554 +28140 +9563 +31503 +16243 +23238 +26727 +16033 +12306 +12138 +11807 +31934 +23443 +10477 +29632 +1546 +25618 +22904 +32568 +14679 +11152 +918 +28130 +22681 +20689 +31674 +3715 +29194 +23928 +15380 +8837 +10654 +24934 +5781 +25202 +28329 +30543 +12609 +25012 +27087 +28319 +14516 +11659 +12076 +5772 +29944 +17232 +197 +26236 +11398 +14824 +11567 +32665 +410 +14987 +22142 +17330 +13756 +9399 +11632 +32085 +32651 +31087 +27867 +21803 +24269 +27065 +8532 +4244 +6836 +9303 +2337 +21891 +22131 +16068 +6241 +28571 +26625 +21875 +28026 +21131 +23853 +16195 +16835 +21926 +23267 +28742 +8819 +25799 +17085 +26547 +32202 +8805 +19149 +17705 +20606 +14066 +29609 +24870 +32616 +18808 +2232 +1224 +10608 +23926 +5821 +7362 +32181 +4601 +1185 +929 +25089 +32247 +14981 +16193 +30061 +9712 +776 +19851 +15185 +18119 +4822 +23665 +31343 +29150 +25201 +2347 +7263 +13937 +17988 +691 +6461 +21557 +28901 +11134 +15250 +13105 +19370 +5757 +18561 +7388 +20848 +31572 +22579 +29304 +22439 +32218 +27268 +23726 +29090 +25809 +1006 +12395 +23070 +7143 +24246 +1274 +3856 +7404 +31830 +14179 +2996 +7253 +9003 +22275 +19666 +5362 +5216 +14188 +2899 +3820 +1563 +9086 +22789 +15875 +11750 +28103 +2987 +21253 +26463 +23065 +8777 +7313 +17188 +7274 +4270 +21261 +2553 +26864 +7490 +11238 +60 +20861 +15633 +4103 +30091 +27672 +6680 +4508 +27827 +32477 +12240 +32009 +26588 +11543 +10745 +8485 +9459 +24987 +29096 +10939 +22104 +29288 +5268 +12099 +9161 +14716 +29341 +17117 +32655 +7929 +23966 +13711 +7143 +20601 +6004 +21440 +3251 +8622 +23119 +17908 +24930 +21054 +22328 +27594 +17180 +13534 +22243 +20019 +25395 +29613 +26807 +1268 +17862 +28115 +19484 +11103 +13495 +27226 +4 +16461 +26320 +7244 +9404 +3424 +10032 +13326 +7157 +29047 +2300 +31228 +4878 +10866 +29508 +11846 +25508 +31272 +4404 +10763 +30300 +17061 +29308 +32179 +5104 +30120 +26625 +2194 +20600 +29532 +26821 +17851 +31995 +13399 +2836 +18977 +19254 +23249 +24048 +12276 +4011 +1830 +11967 +27451 +19949 +2957 +1843 +17326 +31531 +23322 +28538 +28630 +8956 +20467 +16552 +3432 +23146 +9423 +4961 +29406 +11585 +15796 +5835 +5719 +29081 +7153 +23475 +1457 +11681 +6489 +24574 +11236 +31663 +18115 +26194 +24482 +6277 +2495 +26118 +30509 +2022 +21914 +8008 +23928 +31578 +7060 +8077 +25729 +26429 +20064 +16958 +20718 +29198 +5341 +31136 +23270 +10742 +2068 +27653 +8242 +11416 +6258 +12593 +17301 +11544 +30278 +15375 +13673 +1134 +6526 +15509 +24955 +14316 +17566 +1524 +15912 +8718 +7937 +17669 +30904 +10626 +16980 +4848 +15098 +12920 +22352 +12318 +17953 +13868 +7607 +29538 +24286 +11440 +31634 +14691 +18111 +13567 +28585 +24653 +16072 +10047 +835 +7096 +20304 +32086 +5919 +11480 +20766 +15793 +10163 +19174 +29636 +21585 +25763 +18383 +15675 +1559 +14213 +15644 +16063 +27216 +5588 +19746 +31469 +5764 +14898 +17515 +14619 +26747 +8419 +10083 +16888 +6801 +25478 +30791 +16741 +3644 +20501 +16715 +18834 +30939 +22304 +12042 +13149 +24257 +11589 +18227 +22503 +2178 +15348 +1906 +24440 +24189 +15713 +30877 +8598 +22186 +8138 +544 +21088 +24741 +3051 +2475 +31024 +31739 +10942 +11034 +27761 +25781 +1656 +5284 +20157 +547 +8896 +21320 +18748 +1003 +10290 +7029 +32569 +22865 +16148 +23032 +30469 +28361 +30039 +6443 +29713 +23994 +19410 +1628 +32326 +31381 +18106 +9084 +4776 +27926 +7525 +28937 +14636 +16090 +25919 +7229 +31703 +3106 +21517 +32120 +31512 +17126 +30050 +29419 +7014 +7198 +28511 +25479 +2077 +15180 +12974 +30245 +1942 +8269 +12737 +18678 +23686 +22370 +31560 +13614 +12441 +4986 +21489 +27372 +17487 +7874 +11108 +29037 +24598 +19823 +2173 +22386 +17065 +24267 +18636 +8174 +2216 +30846 +20299 +14069 +18808 +10271 +32350 +31457 +25950 +5883 +6417 +9670 +16599 +23589 +26509 +8985 +26938 +6334 +15067 +7579 +24209 +19078 +11229 +20876 +32436 +163 +12682 +28430 +19879 +24241 +27241 +6359 +5942 +6668 +13649 +19227 +9679 +23898 +30047 +14009 +2720 +15963 +7480 +23716 +13041 +12789 +23936 +30101 +18115 +10875 +4763 +29167 +3242 +19517 +19875 +7666 +20200 +25686 +5290 +13860 +32203 +3505 +13873 +30716 +2889 +12382 +19432 +31441 +15321 +18196 +18600 +23811 +26772 +5894 +11695 +4456 +28301 +17899 +17179 +22778 +18285 +31304 +28584 +13502 +1875 +29184 +2990 +23543 +15339 +15135 +19285 +652 +26828 +31459 +7196 +31671 +7448 +28428 +4490 +1264 +24142 +5478 +15666 +17689 +25715 +9619 +3565 +19435 +25442 +18718 +4692 +7584 +23919 +15805 +14972 +5858 +15171 +19943 +29941 +13555 +9459 +19351 +17157 +3614 +22627 +31070 +8225 +1631 +30939 +3503 +22701 +3150 +5095 +15463 +11253 +27218 +22388 +29339 +21868 +30723 +13608 +12455 +22820 +14303 +28417 +11892 +12173 +11569 +18738 +13833 +11378 +30270 +23866 +24661 +15665 +30387 +19015 +8251 +23098 +7755 +16074 +18399 +18378 +6085 +5979 +29744 +489 +27653 +3791 +2742 +28578 +25993 +15255 +13725 +14722 +16399 +22108 +2563 +24404 +28805 +1497 +17534 +26907 +4401 +11256 +18418 +20304 +15905 +28720 +19089 +30301 +28117 +798 +23859 +22873 +4651 +22370 +14552 +16390 +3468 +19388 +32379 +7176 +18517 +616 +21785 +26984 +29321 +25015 +4610 +11849 +15796 +31214 +22368 +30185 +6946 +19556 +21765 +25307 +19009 +12246 +6009 +13443 +17236 +19982 +4420 +23506 +19034 +30389 +19064 +31555 +13886 +17268 +25218 +28182 +14400 +18770 +20531 +13004 +12195 +21322 +3082 +21732 +21912 +25132 +4292 +12756 +19818 +28086 +24103 +13642 +25836 +8946 +27146 +26788 +4384 +7122 +11177 +29101 +29481 +19466 +11560 +23706 +29043 +7983 +20325 +19780 +12576 +1037 +11266 +29608 +31670 +24909 +16819 +24476 +23816 +12104 +22213 +4052 +1378 +13094 +15855 +22549 +15352 +5947 +26973 +31415 +28049 +23715 +30715 +4449 +9072 +25116 +10495 +8449 +28291 +31779 +25017 +29962 +4815 +23122 +12703 +7666 +32539 +13817 +148 +12011 +23772 +1532 +21369 +5856 +17504 +13293 +21238 +12467 +24895 +3690 +138 +26294 +4863 +29880 +17873 +1383 +22023 +30624 +18965 +6513 +198 +27530 +14873 +29919 +8484 +10200 +28193 +14243 +1576 +28549 +6725 +30535 +16875 +16127 +29944 +25073 +12222 +31554 +32724 +30878 +19096 +15925 +24232 +15511 +24514 +15433 +26820 +27704 +27077 +32592 +24708 +10977 +8084 +29339 +32026 +12349 +1014 +31832 +12961 +23218 +311 +8234 +25696 +16681 +23823 +26377 +27995 +8192 +4307 +2141 +11040 +15692 +20954 +4182 +30416 +8275 +22066 +32655 +14443 +14409 +8580 +8163 +97 +20043 +26181 +2702 +21335 +24218 +18207 +7048 +5174 +13593 +1183 +19999 +14458 +26888 +25375 +16083 +12986 +5123 +21750 +20086 +16243 +24630 +13535 +8837 +25 +18914 +7335 +32449 +4192 +12309 +9243 +13329 +455 +4261 +5169 +8348 +26982 +2927 +23158 +32034 +27641 +2254 +18615 +29596 +29742 +8030 +27892 +15124 +32556 +5362 +3457 +13510 +11108 +5843 +5502 +18040 +30108 +1340 +32122 +28183 +20536 +28179 +31843 +19091 +204 +4840 +3249 +5628 +28639 +5683 +4563 +19678 +22274 +11210 +10713 +32473 +30994 +26785 +30564 +1157 +20681 +3527 +28619 +5765 +24972 +27293 +31119 +489 +5744 +12888 +26369 +30153 +23437 +24762 +6450 +9760 +23944 +2572 +22299 +16359 +7003 +12896 +9486 +27250 +13928 +2053 +10332 +21007 +11454 +7499 +25416 +30684 +27051 +32120 +21804 +17129 +22658 +14602 +19178 +3727 +26030 +17712 +27542 +12816 +6647 +19075 +19809 +15728 +15380 +16137 +7880 +26515 +9330 +26476 +12287 +27032 +12100 +7031 +26776 +17269 +30923 +27090 +30072 +9683 +20455 +30462 +15100 +32044 +2783 +13204 +22375 +23075 +10861 +17850 +16783 +13091 +30478 +16870 +20424 +15164 +1160 +3799 +13073 +19002 +18363 +4304 +12926 +4615 +10925 +30743 +13029 +7491 +19153 +20143 +22220 +21282 +19864 +8529 +17043 +31877 +30522 +24497 +20702 +1628 +28614 +20463 +17222 +32059 +25192 +12635 +15168 +32315 +25339 +27245 +1869 +6420 +17871 +24068 +4195 +24440 +21948 +17375 +29595 +7602 +5223 +8281 +5149 +30847 +28884 +14185 +12617 +27693 +8237 +5850 +19751 +26866 +1233 +5062 +28433 +2191 +20384 +22361 +3743 +6437 +18309 +22212 +13011 +31063 +25414 +21120 +4486 +418 +8584 +14533 +15122 +30457 +19238 +1866 +7745 +17060 +2995 +2110 +28790 +27482 +3149 +1670 +17946 +2974 +31909 +21817 +26442 +16727 +13900 +18010 +11454 +21171 +26176 +27860 +28925 +1085 +26806 +17851 +25023 +23613 +17194 +9410 +15778 +20304 +26789 +32760 +18962 +4680 +13390 +30407 +3442 +3398 +17972 +12335 +6544 +11286 +11867 +27710 +29255 +1995 +4612 +25812 +23670 +9628 +14146 +22933 +8482 +18173 +8890 +25391 +4326 +1793 +13242 +27086 +21412 +16624 +27261 +23260 +20582 +31780 +17597 +31229 +14742 +22825 +23674 +26955 +2399 +15381 +13578 +17615 +31330 +12324 +25186 +27968 +18590 +16536 +30371 +24063 +18073 +17104 +25064 +10834 +4820 +19879 +12367 +32224 +31086 +23056 +21061 +15470 +19991 +18671 +23319 +7385 +19000 +19002 +25014 +23379 +15200 +24912 +28619 +24290 +3570 +665 +11003 +28181 +13 +1631 +9340 +20233 +2236 +27885 +31449 +28317 +16223 +12262 +14849 +27378 +20313 +7400 +9622 +7462 +17404 +30049 +22901 +32336 +14513 +20401 +27777 +959 +14700 +30081 +437 +20079 +24399 +15202 +29546 +18893 +30109 +3498 +1253 +5549 +13026 +11916 +17956 +22408 +21089 +24951 +5609 +20218 +6590 +32688 +28168 +18811 +5868 +12850 +26094 +20829 +8794 +19654 +6003 +13319 +29017 +1631 +20961 +15216 +17617 +2744 +18244 +14047 +37 +8496 +8181 +12001 +13411 +25830 +8289 +24714 +27568 +18960 +19743 +23537 +16627 +27809 +14642 +25062 +4033 +25627 +27291 +23799 +18569 +6322 +291 +4514 +13569 +21922 +2919 +25052 +14544 +5330 +13860 +16322 +23165 +16298 +16836 +11166 +8343 +24881 +27178 +22813 +3878 +1387 +11450 +22479 +20818 +16882 +6317 +23264 +23378 +9171 +5523 +31765 +4248 +32428 +19497 +5642 +14907 +22787 +7518 +4522 +22948 +29160 +21408 +17135 +9085 +7119 +31339 +12507 +11990 +26791 +2069 +25783 +9370 +25408 +17875 +7307 +31538 +20956 +8720 +31967 +2679 +15891 +22767 +7600 +989 +15852 +7966 +3765 +6878 +14905 +15070 +11987 +27045 +11827 +14160 +29406 +24061 +7255 +7682 +30610 +14968 +13440 +25274 +31441 +30691 +26437 +28034 +6175 +4842 +25237 +28404 +25691 +4616 +13202 +27335 +17600 +20402 +2474 +9370 +7452 +21700 +22268 +23296 +12623 +20268 +18922 +31949 +22022 +28885 +23546 +17569 +19641 +17110 +29171 +26290 +26339 +14555 +18740 +15582 +19585 +4308 +11863 +7408 +462 +19165 +14600 +17714 +2109 +17774 +2335 +2868 +14006 +18884 +16645 +14556 +9493 +5263 +14661 +17327 +18145 +9949 +10609 +19038 +4425 +27462 +16952 +1172 +18533 +31577 +29893 +4351 +20394 +4423 +25434 +19869 +6574 +29134 +14125 +9801 +4894 +23145 +22403 +1413 +9469 +16310 +15883 +21386 +10783 +26663 +25725 +12173 +29669 +12013 +1907 +20308 +14906 +31521 +14983 +12538 +4814 +14133 +2478 +2814 +19346 +21659 +9173 +9875 +17524 +10163 +19130 +4131 +9309 +10235 +1036 +18981 +1383 +24690 +18374 +28192 +29795 +7245 +10185 +26624 +24459 +7133 +11448 +14233 +20612 +24000 +25625 +25721 +3480 +18503 +23465 +4083 +32305 +16168 +1536 +20841 +28312 +29029 +17510 +18649 +3824 +27516 +4596 +5035 +18798 +14800 +3055 +4025 +19418 +10071 +21345 +6303 +24651 +25733 +1017 +11078 +28959 +8825 +15397 +7083 +21561 +28263 +29293 +18677 +14719 +22854 +5139 +31671 +22674 +14266 +10473 +23170 +14800 +1604 +30834 +8367 +13960 +15784 +27708 +875 +3196 +9119 +11133 +28931 +8349 +25534 +11245 +5746 +19714 +31910 +13283 +22312 +22058 +19821 +2483 +8989 +25459 +20301 +19527 +22294 +5850 +18315 +12540 +4919 +8181 +32171 +8895 +13258 +26158 +16850 +32360 +22606 +9793 +20347 +26710 +9412 +7928 +22622 +30540 +10549 +10534 +17309 +12428 +7048 +22242 +27953 +4402 +20354 +30214 +29077 +8403 +6430 +4583 +20913 +18773 +1296 +20566 +31497 +28689 +5012 +17879 +38 +3112 +24956 +7457 +3397 +13859 +27513 +11734 +25919 +27855 +22441 +24195 +29368 +2903 +29026 +28123 +14732 +11426 +17213 +32560 +13430 +30703 +31590 +1587 +27394 +4783 +1572 +28141 +19382 +13218 +2724 +5885 +5756 +4918 +13834 +2323 +25428 +13597 +186 +29613 +4407 +18221 +23012 +23057 +10574 +4476 +25934 +1675 +596 +13243 +14182 +8425 +12360 +11219 +15239 +1076 +3160 +25023 +12427 +12208 +24842 +13482 +26515 +28438 +1709 +17737 +12563 +5648 +31743 +31098 +9248 +27382 +18208 +29982 +11262 +7368 +10935 +1075 +2021 +24684 +31586 +12854 +10516 +4392 +8548 +2744 +6937 +28771 +4746 +16191 +25183 +24728 +20574 +11872 +31992 +14235 +13967 +2074 +29100 +1040 +9632 +2932 +6467 +25129 +21968 +6490 +3600 +15263 +24138 +6325 +28095 +3828 +15503 +26570 +22879 +6631 +26656 +22229 +24499 +823 +15983 +26598 +15797 +24477 +21256 +20476 +8556 +11780 +28668 +30047 +23280 +9995 +21134 +26435 +10170 +31677 +28705 +2714 +1073 +24464 +20321 +30777 +12147 +31131 +16817 +18480 +19809 +6428 +2261 +18019 +21229 +18730 +13537 +19565 +10408 +8119 +18017 +15542 +12166 +25545 +24778 +23250 +5109 +26361 +6433 +32029 +6942 +11820 +11498 +21397 +22139 +17809 +11603 +16376 +27034 +23515 +27298 +31518 +20015 +192 +11228 +921 +16992 +8882 +32439 +4491 +19789 +10205 +11202 +3015 +1503 +15969 +6867 +14891 +2003 +16337 +13233 +12604 +17159 +17388 +1795 +13060 +4355 +16027 +19320 +297 +15563 +17706 +31544 +23630 +26852 +22219 +7563 +11439 +32676 +17480 +2249 +4088 +6591 +4872 +10370 +18534 +1807 +30534 +5101 +18720 +26019 +16780 +150 +23512 +29452 +23414 +23876 +7070 +995 +12197 +8489 +16644 +19871 +6402 +6989 +31608 +28309 +13621 +20028 +21469 +24656 +13924 +9199 +21612 +16404 +4144 +1528 +29131 +6573 +7150 +9714 +29035 +8317 +4131 +552 +18727 +709 +26434 +29317 +13339 +17203 +4521 +18876 +30913 +17581 +3801 +22200 +7250 +29789 +18933 +21062 +32604 +15869 +21886 +1281 +8096 +13924 +25165 +12670 +31534 +10322 +3538 +3769 +20676 +28536 +25483 +24256 +14691 +19915 +11720 +28062 +22323 +9995 +29085 +1162 +5529 +20110 +12840 +7505 +13974 +21330 +22276 +25089 +10595 +30274 +21006 +17623 +26187 +14025 +24663 +15467 +19400 +8597 +618 +28698 +14561 +19885 +1983 +24756 +24771 +13238 +18815 +22887 +5023 +19329 +28794 +13547 +30915 +7130 +25190 +17135 +30204 +10380 +12891 +22980 +16427 +27320 +12427 +24649 +20773 +16216 +30022 +23575 +16081 +30735 +813 +20461 +12156 +31283 +23734 +30301 +26496 +6173 +10464 +9400 +11286 +4272 +17208 +25144 +30584 +24872 +21261 +32620 +14906 +21797 +17903 +14825 +9706 +247 +18798 +14383 +15591 +4651 +8209 +27097 +9087 +8791 +28053 +6154 +28237 +30755 +22119 +12820 +27089 +25241 +3684 +8809 +5968 +6830 +13007 +14279 +23278 +22288 +2963 +28319 +5898 +32306 +4027 +9927 +12506 +8854 +18735 +4449 +14920 +13658 +29617 +25355 +15628 +6918 +29464 +5705 +25354 +3733 +31947 +18991 +30702 +32449 +4224 +2387 +6 +20884 +7223 +1266 +24671 +14892 +26481 +4192 +21539 +3277 +8630 +26806 +11059 +15662 +12358 +5304 +3584 +29437 +5918 +26884 +17071 +24756 +6447 +31874 +12141 +18592 +27610 +6408 +5647 +23598 +6575 +29772 +17647 +24953 +28775 +15631 +14595 +19217 +5663 +18568 +27966 +11790 +8663 +27662 +21291 +16982 +21291 +20234 +12488 +22827 +17744 +16668 +24481 +30200 +14674 +24717 +10541 +30044 +21388 +7413 +15469 +28280 +26728 +25133 +30915 +14965 +13400 +30584 +2576 +20058 +6933 +24301 +4626 +21261 +18967 +16679 +23292 +10150 +23125 +12593 +20311 +14844 +19775 +21676 +13080 +24938 +248 +15426 +23043 +10210 +30680 +30800 +22335 +11574 +3874 +13775 +25147 +4258 +258 +28547 +27840 +3229 +19915 +32616 +9815 +12512 +26734 +7258 +26846 +26296 +16957 +4099 +19045 +11145 +4578 +12554 +20558 +11684 +29083 +28025 +32678 +14154 +12472 +29040 +18110 +5120 +29782 +13832 +31757 +23574 +861 +1162 +28234 +21106 +22968 +14801 +16838 +16546 +24276 +22013 +5895 +32034 +23388 +9306 +13995 +2026 +2610 +1935 +15995 +26939 +24753 +13835 +3022 +16043 +27170 +29356 +24353 +8815 +21116 +3506 +29940 +22761 +31841 +14820 +4071 +28786 +15957 +513 +12309 +16233 +9025 +27241 +29617 +27772 +18983 +2828 +23776 +27958 +16679 +11667 +30934 +9930 +30643 +15310 +9267 +7454 +9231 +2654 +26784 +23579 +14348 +19364 +12197 +1844 +16645 +14057 +18126 +15157 +20250 +12238 +28926 +11854 +16300 +31222 +275 +14943 +1817 +17651 +14780 +15750 +21945 +7279 +28311 +31974 +13337 +2204 +8846 +30139 +29303 +27357 +8051 +18587 +1918 +25269 +17114 +11022 +14914 +18161 +31799 +2898 +13183 +32530 +14393 +21096 +21006 +18685 +13670 +28771 +24233 +14054 +32247 +7921 +31456 +29049 +758 +1578 +26459 +2635 +5270 +12184 +32081 +27265 +13267 +29576 +30537 +10687 +31050 +19601 +25873 +22868 +3418 +15714 +26364 +4003 +28029 +13520 +3167 +16340 +31457 +7199 +29006 +10685 +3658 +31632 +30611 +28171 +3372 +24876 +14064 +4789 +15363 +30160 +151 +930 +18935 +27770 +4582 +23449 +20910 +14290 +21095 +362 +19312 +12796 +14600 +25947 +11394 +8861 +13463 +27349 +12220 +20267 +13185 +19023 +876 +378 +9932 +30587 +22640 +12420 +7250 +22448 +3726 +14201 +19519 +21656 +31255 +18183 +13773 +5915 +32444 +31979 +10047 +30347 +31664 +19897 +19740 +26640 +17664 +11496 +9390 +31319 +9775 +7969 +28090 +10614 +10774 +8904 +30593 +5923 +9210 +6860 +25847 +29462 +13806 +10156 +17474 +8123 +20587 +6858 +5494 +24349 +26414 +28660 +7312 +5135 +22355 +31024 +6832 +25500 +15024 +10440 +19099 +17073 +9331 +9622 +15473 +15369 +766 +5522 +27819 +31322 +8962 +19097 +12888 +25278 +4059 +15744 +24728 +19300 +19756 +857 +14169 +6775 +9660 +10501 +32593 +22862 +2960 +8442 +27964 +2006 +17737 +12118 +10328 +15421 +25791 +37 +4125 +23264 +17118 +21487 +7490 +29303 +31937 +28294 +31213 +2176 +11790 +13326 +11577 +25065 +25746 +8269 +30189 +5121 +2333 +1076 +12411 +27041 +14751 +13743 +25656 +26774 +20611 +7594 +21467 +850 +5451 +20580 +11576 +17108 +21102 +7160 +13373 +29908 +19567 +14632 +1325 +10804 +22078 +2669 +18972 +4515 +32467 +5437 +32684 +31379 +5129 +8604 +9478 +3166 +30392 +11238 +29467 +32180 +31766 +5339 +30493 +22600 +22608 +15339 +11320 +5307 +20068 +28612 +28821 +6856 +8514 +24858 +29074 +29106 +547 +950 +27451 +11499 +30761 +2498 +22284 +24837 +32056 +25939 +26090 +11486 +19476 +31799 +24927 +8968 +7099 +31233 +20501 +8055 +17413 +27731 +31126 +21870 +1914 +5484 +9539 +8619 +32372 +8434 +12434 +27858 +24438 +9984 +22668 +10775 +8395 +10611 +21126 +15920 +12131 +30577 +4127 +23162 +14058 +9020 +19066 +6250 +14122 +30262 +12477 +24887 +25250 +3892 +21962 +28101 +616 +5895 +14653 +27349 +23356 +14152 +1958 +3436 +20462 +16228 +28168 +9089 +15602 +9193 +7314 +27882 +18753 +17424 +21660 +18568 +10354 +8586 +7653 +434 +2585 +30351 +32523 +18912 +12896 +22053 +21836 +10905 +30692 +17070 +10107 +31646 +8915 +26293 +4166 +10584 +26947 +23546 +7078 +22399 +1236 +11451 +13223 +11276 +7562 +31557 +30810 +20066 +1509 +31676 +7960 +26296 +1090 +11303 +13560 +10698 +9590 +30399 +24723 +15552 +21672 +10873 +32503 +32094 +13423 +30161 +14313 +31342 +29997 +20441 +25952 +10347 +9388 +31618 +27198 +7791 +13046 +4395 +21585 +26463 +10362 +14952 +25994 +13140 +18780 +3092 +24700 +30029 +8732 +10905 +13336 +14612 +14699 +9343 +25256 +15726 +25418 +12083 +16393 +7814 +29029 +12826 +25388 +7324 +15535 +19414 +26320 +19177 +17470 +15831 +21881 +13014 +23913 +27174 +23733 +14175 +12576 +20334 +9103 +17601 +651 +12108 +24659 +6251 +31462 +19160 +2437 +11556 +30364 +24948 +15900 +6009 +4002 +24020 +16644 +24169 +24855 +23886 +9171 +7252 +16410 +32100 +31946 +29729 +26090 +7055 +17423 +9903 +18244 +29518 +13353 +21631 +5370 +18031 +18876 +14239 +8656 +31645 +16007 +25049 +10652 +24363 +7067 +19229 +13725 +29216 +16094 +15404 +6683 +29571 +28607 +24967 +18752 +4072 +24379 +4759 +30518 +25403 +12049 +6429 +19331 +14540 +23617 +1245 +7073 +13723 +10443 +22407 +27361 +22758 +24742 +5350 +11138 +32497 +5630 +843 +32013 +21013 +12466 +10300 +25587 +22028 +27918 +19801 +13930 +31099 +9669 +6544 +14980 +22977 +1331 +2690 +12690 +9471 +31184 +23092 +19640 +18024 +2552 +7418 +18130 +18634 +25305 +9121 +8070 +7006 +16061 +28124 +13226 +9420 +32378 +14577 +11992 +20610 +4662 +30372 +4687 +566 +3425 +14436 +19725 +7098 +492 +23221 +8491 +256 +32462 +31965 +21112 +18029 +19898 +4306 +23129 +30050 +19482 +3940 +7393 +4873 +31567 +7335 +23340 +21853 +9261 +10403 +24321 +12924 +10673 +22591 +7079 +13873 +26372 +17003 +16392 +18877 +13494 +19853 +30213 +23014 +28979 +14639 +19224 +1859 +10378 +8166 +32304 +19654 +14175 +32133 +11978 +18570 +1326 +1411 +10572 +4831 +12738 +21930 +19622 +20371 +20981 +20738 +17707 +25987 +6057 +12029 +6317 +2147 +263 +2788 +16344 +202 +27383 +32641 +18641 +24193 +8928 +6926 +16143 +269 +21409 +14174 +21625 +8826 +27088 +586 +1985 +20586 +19250 +16990 +17408 +32607 +32123 +9157 +13714 +9285 +6215 +6514 +20532 +67 +7768 +7825 +16989 +2755 +6673 +25645 +20954 +9664 +6452 +14114 +23981 +2127 +25560 +10821 +294 +2929 +2734 +20691 +5187 +17688 +10357 +5400 +1350 +7543 +29370 +30560 +18325 +19086 +30165 +16674 +21462 +24054 +6177 +30827 +30027 +20714 +16507 +8074 +24683 +14999 +15357 +3322 +20162 +7333 +16124 +26516 +7178 +29190 +7488 +4854 +8331 +27646 +5506 +6190 +17584 +2420 +19500 +22187 +2538 +29815 +20812 +2406 +1226 +21012 +19929 +27724 +1114 +28759 +13355 +3567 +25276 +32415 +4021 +6510 +15110 +15399 +20485 +9378 +93 +18642 +11005 +20106 +12880 +1079 +29267 +14841 +10870 +9965 +30791 +12414 +16203 +536 +24484 +31124 +14409 +4404 +29434 +12811 +20291 +18977 +24346 +12214 +15110 +22384 +27858 +15702 +32562 +10476 +5610 +15047 +32085 +1644 +4447 +28009 +842 +4313 +13022 +3282 +21201 +23931 +14724 +22450 +24176 +6024 +27093 +15622 +14217 +21487 +3834 +25984 +27068 +865 +16192 +10550 +16256 +11937 +32717 +15755 +11261 +26893 +9124 +10075 +22060 +9581 +476 +15722 +305 +22780 +24348 +18191 +19960 +6325 +9819 +797 +4623 +7391 +19670 +8978 +16324 +22236 +32082 +1667 +7040 +1326 +26260 +17095 +14946 +29130 +18718 +17123 +1567 +18082 +8235 +2998 +16921 +9325 +493 +28774 +19902 +26553 +4869 +17162 +8228 +18484 +10564 +19864 +14562 +15927 +31137 +7954 +562 +23188 +28026 +30956 +24644 +31905 +31503 +26817 +27109 +4740 +7484 +23095 +1617 +20418 +18039 +11568 +27733 +1539 +27402 +7219 +16041 +3112 +32401 +32537 +16780 +24463 +182 +13820 +26017 +27557 +29996 +18524 +9225 +9134 +25322 +1172 +26562 +23249 +13994 +11132 +64 +1639 +9377 +29792 +22858 +22149 +25984 +29985 +29718 +20679 +27306 +15018 +23976 +22880 +26040 +7574 +7784 +22111 +16171 +7967 +24322 +22852 +22640 +23114 +16003 +31427 +13594 +21841 +5553 +21719 +26459 +16209 +9131 +18186 +23491 +26164 +24514 +28932 +24637 +28897 +27798 +3923 +583 +10659 +26741 +9849 +8305 +25816 +5872 +10300 +19225 +20443 +8127 +32553 +20581 +13363 +24279 +11370 +3969 +31484 +458 +25546 +28442 +31894 +28255 +20998 +4891 +26765 +11889 +31063 +11687 +20937 +23821 +20540 +1879 +10999 +20679 +3725 +6837 +16182 +32605 +21693 +24313 +29446 +22159 +6511 +7683 +22894 +1598 +2364 +29080 +26989 +30660 +17603 +17377 +24484 +28306 +10483 +28449 +6210 +3600 +3477 +22710 +27951 +16562 +9757 +9043 +25724 +15446 +28850 +21628 +15114 +8166 +24443 +2371 +6010 +26155 +10284 +5697 +29013 +10735 +26065 +11991 +30845 +30551 +30938 +28582 +2260 +9855 +20840 +26701 +30250 +31574 +4055 +98 +15468 +1725 +10124 +21427 +24587 +1243 +28672 +25022 +2731 +13507 +20493 +11374 +12302 +25930 +28536 +8728 +18239 +13090 +6848 +28342 +25602 +13371 +17702 +4195 +15484 +3163 +21757 +19222 +26399 +9980 +9780 +22435 +23769 +4710 +28449 +27119 +2941 +14349 +29584 +27251 +1137 +28205 +12812 +32500 +5017 +7844 +30572 +16000 +19076 +32527 +1186 +11437 +19414 +5673 +12992 +22542 +25333 +2656 +16715 +14326 +13304 +30137 +15045 +9584 +4044 +15078 +7029 +2942 +14504 +6053 +9849 +10898 +8884 +28763 +5391 +2891 +31989 +4337 +3104 +31857 +3708 +24303 +1038 +14387 +13264 +14552 +3775 +3232 +2200 +32453 +10218 +9059 +2445 +69 +31649 +17603 +15007 +19316 +20256 +12762 +7526 +6489 +30676 +29204 +972 +21381 +3247 +12268 +2809 +28394 +15787 +227 +19071 +6137 +32157 +13505 +967 +27648 +27196 +2064 +23996 +15299 +7793 +21974 +30902 +4952 +23265 +9362 +26281 +840 +12473 +10873 +21390 +26339 +6841 +9458 +27153 +9188 +12420 +8015 +16509 +8006 +24614 +1230 +23014 +25446 +23014 +6607 +1941 +13146 +6735 +14424 +14008 +1936 +15993 +27591 +30283 +12203 +3741 +18390 +16705 +5530 +27352 +5844 +22776 +24059 +1599 +15137 +15324 +25007 +7205 +24556 +1113 +15550 +2984 +21801 +15367 +28269 +1410 +13013 +28433 +18077 +14351 +8046 +3046 +7270 +9625 +21933 +23332 +2549 +4332 +17798 +7105 +10659 +11287 +27747 +3963 +4183 +30079 +16540 +899 +286 +28458 +19514 +8549 +5640 +7242 +21229 +5179 +23110 +28937 +8011 +19987 +4481 +8340 +21323 +31133 +10365 +30058 +22529 +25625 +2798 +8167 +18588 +27520 +23195 +9996 +29853 +15601 +17329 +26512 +21850 +28511 +27242 +19757 +4786 +18041 +11742 +12836 +29458 +10714 +15401 +4370 +21161 +7283 +13247 +29943 +32231 +16437 +19980 +21380 +2876 +12802 +20303 +15781 +4110 +18902 +14264 +4687 +19708 +2865 +29120 +8075 +11602 +20937 +31178 +24003 +13772 +1646 +15096 +12621 +16016 +26685 +7503 +24118 +5222 +13833 +270 +6736 +23866 +17414 +9035 +27006 +23508 +18871 +10191 +12351 +28374 +29723 +17460 +10361 +26358 +2067 +18493 +9352 +4221 +8471 +32630 +19591 +3072 +22554 +10252 +16861 +21086 +24250 +31471 +21772 +32763 +23213 +294 +14774 +17211 +3432 +12914 +25841 +2626 +5137 +6438 +460 +19434 +19367 +30534 +10273 +2052 +9583 +10463 +16798 +23251 +30627 +16294 +18703 +16326 +5718 +5076 +20462 +24438 +16555 +17985 +30253 +1248 +11831 +28607 +16450 +5604 +18611 +31162 +30580 +11005 +24038 +23565 +101 +8770 +21970 +15399 +21472 +18846 +14622 +10590 +1509 +31820 +5059 +29331 +1779 +20374 +32763 +20744 +2965 +10958 +25958 +25726 +17968 +26253 +14463 +15506 +24331 +20267 +17983 +27481 +22175 +9855 +22543 +23867 +15905 +216 +15348 +29197 +29262 +6459 +31990 +4979 +17526 +30943 +22481 +17524 +15820 +3559 +14303 +26206 +26861 +3423 +18501 +11997 +19886 +15481 +25949 +2902 +2858 +32009 +31332 +28042 +15372 +14654 +5989 +15720 +4378 +2722 +19301 +27698 +19970 +14421 +3792 +25812 +5225 +26758 +18980 +21890 +10546 +8498 +17628 +3728 +8203 +29729 +2207 +29334 +6462 +29214 +1193 +13252 +32183 +16758 +32122 +23170 +25937 +29619 +5311 +20813 +4965 +30362 +30077 +29134 +13717 +15458 +28804 +20284 +20693 +30519 +5395 +14835 +2236 +1007 +4552 +14421 +11530 +24588 +27084 +28897 +14713 +18162 +19004 +16787 +13257 +21097 +3034 +123 +5126 +14934 +11508 +8609 +8988 +4022 +20373 +15896 +31646 +3803 +2027 +14432 +6355 +25835 +1784 +31233 +8195 +1174 +28029 +1638 +20480 +26135 +21284 +24311 +17143 +20078 +19948 +29819 +28280 +31196 +1498 +8620 +3524 +17823 +8414 +27420 +25175 +13551 +4867 +72 +30390 +27960 +7899 +14842 +20347 +1434 +4650 +4580 +13982 +17823 +2770 +20346 +3333 +12091 +20478 +26127 +20047 +28682 +2963 +16436 +13021 +5573 +28627 +29774 +7203 +8709 +5460 +7798 +14125 +22844 +7457 +23446 +373 +26865 +25390 +8641 +7140 +16699 +19713 +29138 +6182 +15745 +159 +7753 +11314 +30832 +4020 +9058 +30746 +26429 +25351 +19575 +18960 +6173 +29214 +8856 +3258 +12289 +4909 +24680 +19383 +919 +28485 +26427 +31346 +26494 +26298 +29037 +26918 +5064 +29141 +32261 +5170 +14005 +18875 +12683 +14751 +4782 +26014 +10279 +24815 +17281 +6178 +29947 +16680 +1756 +22802 +19138 +12577 +9228 +1859 +2473 +3597 +20214 +11977 +11886 +17477 +8790 +8025 +24247 +26202 +3383 +24318 +3765 +32347 +20403 +17664 +31737 +1379 +25325 +18706 +31126 +11623 +26700 +21179 +18808 +26942 +31737 +5382 +32516 +24306 +1692 +17005 +9970 +12358 +27218 +9475 +12391 +17799 +9970 +26338 +21334 +1688 +20865 +5844 +28696 +11832 +31475 +13637 +9290 +9111 +25125 +21865 +4327 +1561 +3351 +7849 +3495 +22378 +9582 +14932 +17815 +28610 +13353 +31107 +30969 +10362 +6307 +16205 +24670 +26832 +22218 +31533 +27906 +247 +6302 +16304 +25192 +32611 +32493 +16738 +1334 +27730 +7501 +18939 +23379 +6046 +15706 +27590 +14655 +25795 +17713 +339 +6322 +16684 +23853 +17757 +29816 +12482 +12513 +3838 +9612 +7351 +26454 +32273 +32116 +20624 +11910 +9192 +6620 +20849 +30232 +29743 +11638 +31661 +13662 +2592 +14865 +4750 +22669 +3561 +30712 +11873 +12603 +18010 +26254 +13510 +1566 +8916 +16935 +18230 +7683 +18798 +23337 +21461 +25101 +30056 +2659 +13434 +29488 +12757 +16045 +2044 +20206 +15493 +24513 +12736 +24400 +7473 +602 +11136 +4647 +15594 +10635 +5469 +21380 +2499 +4449 +12328 +1909 +29374 +16060 +11757 +24323 +18421 +20587 +1218 +9321 +19209 +19847 +12238 +23190 +31696 +27922 +2716 +19429 +27962 +4816 +12962 +25627 +11908 +32100 +6925 +29089 +5281 +25007 +16079 +10756 +28645 +28517 +7403 +3499 +31220 +31473 +27392 +1751 +2026 +18572 +10772 +24544 +19660 +13465 +2467 +27822 +14383 +13635 +17641 +886 +15655 +29017 +26219 +8374 +3443 +26729 +7628 +21108 +5350 +26652 +5070 +18098 +16664 +19154 +26791 +6453 +24910 +15230 +18567 +15480 +10919 +31427 +16998 +6635 +11401 +24912 +19730 +17777 +16716 +7032 +9849 +24600 +18212 +23062 +31029 +1563 +11604 +29857 +29782 +25621 +8593 +14474 +16755 +20360 +27060 +25054 +1267 +32398 +13733 +31001 +21656 +15070 +30084 +4681 +20558 +11266 +24 +10596 +18739 +5335 +5501 +6122 +8935 +8261 +2570 +24510 +23317 +6464 +9601 +18242 +25410 +10751 +634 +690 +14549 +32380 +31249 +26307 +26472 +26156 +26575 +24700 +24910 +20736 +20951 +11860 +23141 +17309 +16722 +5773 +4381 +7895 +22300 +5840 +12745 +22131 +26799 +18698 +16422 +29470 +12624 +31110 +13097 +31657 +25466 +10827 +12045 +8583 +9864 +32696 +2461 +19593 +19622 +21087 +1215 +25048 +19705 +25118 +27458 +25139 +19981 +26244 +31721 +15210 +19584 +30819 +20151 +26908 +10733 +4273 +8317 +16557 +12315 +6308 +12450 +1162 +21607 +18190 +7475 +6817 +18287 +18166 +26923 +539 +7424 +25464 +6404 +25692 +6210 +13535 +4478 +23869 +26658 +2816 +9390 +22153 +24576 +4313 +31051 +4790 +30875 +25963 +14389 +17124 +9529 +9685 +11334 +17435 +18714 +9394 +16478 +24513 +22815 +19124 +1961 +11099 +30135 +23681 +15412 +25477 +2315 +8654 +24496 +24115 +13674 +10682 +27269 +28714 +8182 +10349 +13594 +25017 +25488 +10737 +1892 +20157 +14338 +5712 +31405 +3540 +6508 +17135 +6566 +31457 +31729 +3370 +27312 +16576 +22434 +14897 +20584 +32331 +6314 +6179 +27761 +25229 +16315 +7272 +28805 +7238 +16057 +31572 +2495 +14495 +23974 +29945 +21026 +19758 +13262 +21325 +29806 +2349 +307 +21885 +28197 +2551 +29755 +1169 +7128 +3780 +10136 +11585 +31671 +26534 +25720 +31510 +21080 +15299 +29935 +28868 +7623 +724 +4769 +14792 +719 +19934 +15796 +4414 +8328 +15152 +2037 +14852 +30242 +12702 +8265 +17429 +18160 +16124 +10839 +6944 +10424 +13789 +11891 +6759 +10298 +26253 +11726 +8672 +12286 +3917 +9948 +26758 +7523 +24526 +5638 +2048 +12261 +11248 +16018 +32117 +16046 +10683 +18383 +7086 +24672 +22174 +31364 +10862 +28962 +24552 +10907 +12047 +8937 +10884 +6410 +6750 +1032 +22009 +23042 +22456 +10235 +22178 +2908 +31077 +24176 +810 +26432 +32308 +9367 +12619 +32535 +27736 +15531 +15815 +10932 +15746 +6081 +7079 +30654 +22592 +32209 +18099 +9569 +4758 +8194 +13617 +30773 +31195 +314 +9443 +29294 +23510 +24806 +24379 +15430 +19737 +5127 +20705 +18599 +10396 +30845 +4200 +541 +17566 +28312 +12363 +3068 +22713 +1244 +30767 +25550 +20804 +16917 +24916 +28415 +3054 +14748 +29276 +16588 +14744 +21992 +22081 +9321 +24946 +1368 +19088 +14193 +16730 +13631 +16619 +8340 +1905 +18224 +20414 +11900 +8447 +27788 +20033 +27391 +6794 +5194 +14254 +28300 +19761 +22279 +12740 +32719 +21838 +3406 +21117 +19367 +3660 +31785 +267 +16715 +4037 +17384 +3609 +24247 +26593 +32049 +24384 +31069 +3819 +12360 +18887 +20234 +20532 +4768 +30879 +27414 +9261 +13987 +31134 +11215 +14271 +6590 +19963 +29736 +7406 +15537 +6667 +21918 +24751 +12822 +20539 +15979 +519 +20271 +29517 +30703 +1636 +27380 +19415 +347 +10048 +22364 +11513 +4768 +21748 +236 +9310 +21399 +2778 +24702 +12662 +4977 +12455 +11092 +24561 +3170 +1287 +27997 +24959 +32649 +19834 +31174 +711 +13603 +18286 +24004 +6054 +11505 +5790 +16801 +15017 +2791 +11434 +25605 +31693 +3094 +26103 +7047 +23158 +4059 +22474 +2676 +9901 +329 +2976 +28894 +9630 +11477 +9168 +18665 +5457 +20033 +9572 +6482 +27560 +25290 +25396 +10816 +27802 +2965 +17988 +2127 +29614 +3159 +28512 +474 +3259 +12868 +28150 +2697 +14302 +12091 +2100 +12572 +29884 +13615 +20578 +4982 +28922 +24025 +897 +31981 +30201 +10908 +27941 +6865 +29142 +10424 +19600 +29499 +14242 +1459 +30480 +2583 +21214 +8197 +13211 +24692 +2619 +24579 +2984 +14859 +28048 +25869 +3408 +21775 +2843 +21244 +15014 +52 +10236 +19398 +8787 +15106 +6127 +24947 +23926 +19548 +4169 +3141 +28347 +31564 +4662 +28963 +16057 +22033 +18481 +1095 +12689 +13163 +29380 +21545 +4549 +23077 +16514 +2219 +19543 +31460 +11586 +25222 +14882 +26672 +17565 +18164 +29309 +14528 +25514 +9119 +25358 +16394 +22009 +14025 +10475 +2315 +27086 +1982 +26360 +16212 +22431 +7031 +5501 +12886 +6352 +12688 +1798 +24302 +2477 +5484 +7808 +11060 +29352 +20390 +29329 +16513 +21717 +17339 +23095 +12222 +5540 +1526 +7845 +19444 +26077 +30109 +20058 +26385 +32737 +26458 +28036 +23801 +6431 +27628 +32660 +6349 +8917 +32526 +9762 +127 +13833 +10919 +20739 +29335 +18119 +27188 +15272 +16959 +31388 +23155 +13242 +23957 +15955 +338 +25843 +2610 +30446 +14871 +9792 +25590 +27112 +4560 +1045 +2583 +14506 +8189 +1040 +9833 +2892 +10109 +24017 +15088 +18061 +2998 +9496 +24996 +26901 +26121 +8481 +27267 +27625 +18293 +19773 +989 +16943 +29322 +16049 +22747 +21541 +6544 +27604 +21074 +4443 +27897 +4195 +26055 +30264 +1540 +11048 +7874 +8365 +31155 +20684 +20056 +20531 +8176 +20472 +3315 +27915 +23291 +25267 +31333 +29366 +27415 +26872 +26669 +22962 +6773 +26775 +23048 +23671 +19809 +20046 +2235 +13234 +17067 +11303 +21280 +9665 +4184 +28948 +18799 +1391 +10378 +21961 +16079 +31729 +29357 +31450 +3357 +14881 +17636 +29718 +30460 +27897 +18867 +15651 +21533 +4435 +7661 +21339 +29648 +735 +13024 +28902 +25036 +25189 +16576 +9496 +31035 +12093 +21841 +17933 +29193 +12300 +19161 +30595 +21614 +1728 +13125 +17143 +32442 +3022 +922 +32003 +10593 +19627 +2975 +29687 +5446 +18825 +1481 +9143 +20556 +20052 +19303 +27349 +15387 +748 +30990 +31982 +17200 +3747 +3911 +3658 +26664 +27386 +23416 +29871 +6989 +16792 +13584 +14726 +609 +29068 +23287 +22833 +7851 +6084 +32053 +11179 +32064 +14029 +16097 +12898 +23956 +22989 +15436 +18258 +31296 +20158 +24943 +26978 +24598 +21485 +7314 +8707 +32611 +21682 +14655 +16391 +25475 +4465 +28518 +25535 +15531 +20177 +29393 +6233 +10227 +26684 +3787 +30328 +24994 +24983 +6669 +3092 +19903 +21571 +20201 +1429 +725 +21332 +21434 +21547 +17157 +8977 +32650 +19825 +3922 +24492 +9990 +66 +16681 +28482 +32159 +15066 +22064 +23318 +22274 +32305 +23120 +27658 +21691 +23189 +7173 +9823 +19493 +29062 +5861 +174 +28821 +6358 +16495 +29222 +3526 +23297 +8982 +13319 +24200 +20683 +29582 +21087 +19365 +4120 +3158 +26629 +7956 +11280 +31623 +8659 +30561 +627 +3803 +25895 +1884 +21050 +2561 +13725 +28161 +22383 +29471 +13830 +12967 +26702 +8616 +24748 +12653 +20381 +31585 +21193 +994 +24649 +2991 +18245 +12788 +32322 +24867 +7344 +14107 +6296 +23880 +640 +10182 +20694 +25260 +10636 +773 +19359 +3372 +5064 +31865 +26248 +24709 +24386 +19065 +20277 +6424 +10333 +17542 +14262 +2814 +24398 +24049 +9251 +15180 +11476 +18635 +3447 +8104 +16956 +19725 +21931 +12300 +12436 +8201 +18707 +14042 +9007 +18448 +10493 +2849 +6489 +22629 +31623 +8494 +31580 +4450 +7361 +7511 +9907 +12521 +19716 +21763 +19853 +32526 +14482 +27134 +17797 +25346 +13423 +27644 +8609 +3139 +11391 +11371 +13193 +31746 +32481 +12413 +20488 +31444 +16523 +28022 +29384 +18077 +10022 +15155 +7498 +1210 +5164 +10492 +3364 +17518 +32064 +8331 +9599 +7567 +11725 +860 +10192 +14193 +7651 +11831 +6102 +17427 +23118 +3836 +26325 +15241 +14840 +14511 +16913 +25513 +23681 +8644 +8333 +28666 +11805 +30891 +27653 +17881 +27821 +15007 +24873 +12525 +27169 +30892 +796 +5070 +2061 +30463 +15917 +24817 +10378 +4722 +5589 +26583 +4176 +6232 +31217 +17014 +30225 +31877 +8000 +28391 +15128 +6562 +30496 +24914 +2338 +26543 +8837 +6679 +20861 +21721 +31802 +3134 +26975 +11390 +5724 +24609 +16265 +14463 +18196 +24152 +26396 +2245 +8340 +3813 +29627 +3350 +28756 +22689 +25315 +27930 +8590 +11494 +3719 +19113 +7928 +2942 +25839 +23127 +4033 +27340 +25042 +32322 +3023 +20537 +1202 +20251 +9014 +9442 +16505 +16243 +21756 +4736 +8274 +17735 +20748 +29847 +7625 +13775 +8568 +10722 +25638 +16260 +5875 +20991 +32006 +11888 +5262 +17239 +8763 +26298 +5811 +17744 +12518 +16753 +4447 +23223 +31187 +14232 +420 +10344 +27413 +1907 +20062 +17471 +20195 +16401 +21557 +30788 +7089 +24347 +14547 +17938 +4498 +27867 +24935 +13960 +8398 +17040 +10330 +16820 +21951 +26353 +11857 +23292 +17905 +11519 +25187 +28046 +14969 +272 +7580 +21770 +5014 +4120 +28082 +7791 +8583 +13627 +27398 +7492 +28332 +22929 +13790 +8455 +14048 +12856 +30434 +22234 +2069 +2208 +32468 +9068 +18482 +30995 +24980 +294 +7210 +21379 +10323 +11928 +27741 +2712 +30487 +14626 +563 +23802 +16752 +12262 +31478 +9436 +27257 +2798 +3057 +31177 +27665 +4762 +21447 +4275 +24923 +21326 +13590 +1593 +4212 +26969 +30284 +32568 +20340 +12583 +8905 +19350 +24743 +10155 +26934 +30539 +8717 +1799 +29476 +30128 +11280 +27518 +29161 +21260 +15236 +3228 +23736 +6236 +740 +22180 +7168 +19811 +16075 +28730 +7686 +17651 +10674 +30802 +4293 +8058 +10985 +2136 +15622 +12239 +23767 +18080 +16060 +11839 +18037 +5393 +5794 +26067 +25609 +10254 +20759 +18404 +23328 +4517 +15929 +4578 +30159 +3324 +30529 +29025 +16682 +5624 +11551 +21093 +27397 +6446 +31830 +17391 +15082 +18447 +16922 +7879 +16987 +23888 +11943 +23180 +8265 +23960 +4324 +15611 +29652 +8302 +5945 +20348 +23109 +11617 +429 +18162 +5193 +14713 +324 +18884 +11888 +20702 +16536 +16423 +18662 +30919 +20918 +6831 +23152 +21926 +32060 +15126 +2730 +8594 +11952 +27467 +32639 +32500 +31266 +3774 +14825 +29558 +30470 +31211 +24043 +5928 +27723 +7205 +460 +17397 +2497 +26533 +24725 +20806 +10922 +9171 +3021 +10228 +23966 +5587 +30835 +14964 +11684 +11091 +829 +11581 +26766 +5012 +18448 +15229 +24213 +29367 +26816 +9214 +22326 +6986 +7945 +10835 +14156 +31251 +13774 +30791 +5230 +8219 +17808 +27526 +12683 +5886 +20530 +7053 +8388 +27507 +6123 +9168 +1674 +6679 +19852 +32299 +14841 +19070 +29172 +31116 +15988 +1148 +1745 +6366 +21121 +19376 +27289 +26168 +4071 +19795 +31688 +1606 +22789 +3135 +24411 +6136 +3957 +14147 +1676 +11370 +20451 +5542 +20432 +25364 +12071 +13817 +24335 +30259 +13482 +19234 +2339 +17271 +3575 +25510 +28307 +7406 +14240 +26422 +8593 +28208 +5972 +1661 +29489 +460 +17214 +2345 +17388 +29427 +29344 +9784 +29525 +5987 +21424 +21124 +19226 +28055 +17075 +12690 +318 +23341 +7768 +5271 +11668 +18327 +13655 +13260 +20096 +24326 +2378 +3572 +14570 +2452 +25291 +6698 +3971 +25264 +29391 +14320 +7484 +15567 +32067 +2421 +12035 +32081 +18661 +9255 +18624 +23729 +20580 +17273 +20880 +22257 +28859 +27126 +4929 +22597 +4298 +7303 +10510 +29182 +32311 +9217 +14748 +9146 +31621 +242 +6196 +1226 +15218 +32173 +10562 +23012 +17814 +2707 +9743 +25354 +57 +20645 +7099 +28090 +23412 +9799 +16766 +30551 +22924 +21079 +544 +27607 +28811 +18798 +21686 +19631 +288 +20853 +16542 +19451 +24249 +14188 +10429 +10226 +9438 +887 +14840 +21130 +21969 +22314 +6385 +12647 +32356 +25110 +11011 +522 +23322 +6292 +5760 +11831 +14977 +6353 +22058 +7335 +6351 +27162 +31727 +18927 +12476 +617 +32490 +13744 +32159 +15921 +12438 +28672 +27340 +13927 +13652 +21273 +11309 +8401 +7200 +13633 +31774 +9875 +29072 +7929 +14991 +23799 +27150 +20841 +10581 +19580 +32599 +10507 +16848 +12834 +7475 +10391 +24515 +26357 +14710 +14384 +15728 +6616 +29495 +25805 +31987 +18324 +5455 +11241 +15072 +7457 +6166 +8046 +26144 +12339 +32346 +28127 +22793 +14856 +10656 +6853 +28605 +16497 +414 +29533 +6085 +22815 +2808 +2944 +5358 +29488 +18747 +20178 +30563 +21242 +2071 +29231 +32523 +11287 +26593 +20818 +26661 +1457 +18761 +1224 +23842 +21775 +29784 +15380 +2498 +31329 +5805 +10276 +2931 +3016 +29945 +500 +15078 +6825 +27575 +31104 +2804 +24371 +6961 +6384 +30896 +30255 +23216 +26623 +18636 +7431 +20226 +23468 +3633 +6170 +16434 +24101 +13786 +12095 +2691 +31473 +5106 +27799 +18094 +31580 +11822 +2456 +1374 +32551 +16236 +13911 +14824 +23921 +12429 +10006 +12367 +23009 +655 +5134 +10872 +31253 +26095 +6014 +170 +1872 +31550 +5619 +24905 +2143 +30978 +7386 +3027 +16332 +13008 +25413 +8988 +31302 +15783 +22778 +29382 +14672 +11662 +28610 +17411 +1578 +10353 +2800 +7567 +30973 +19001 +16687 +2792 +16458 +5675 +23697 +18128 +13460 +29059 +17621 +25862 +17484 +25425 +16377 +22336 +17406 +5524 +13569 +26988 +28347 +21396 +23813 +4393 +8902 +389 +3713 +11392 +9858 +18777 +3801 +3047 +412 +30949 +5675 +25464 +13940 +19769 +29018 +32622 +26578 +10041 +28248 +22496 +14022 +25984 +32435 +24514 +25824 +24438 +15459 +11033 +1681 +15791 +15570 +18558 +20961 +11143 +24109 +27094 +21843 +7676 +31466 +14416 +8982 +11212 +12186 +28575 +15469 +13007 +7921 +7290 +18784 +18071 +24595 +6737 +26788 +9286 +801 +11344 +9160 +10159 +22532 +19866 +21410 +32176 +25465 +5311 +249 +4046 +11869 +18047 +3444 +25875 +23355 +29634 +12483 +29733 +11795 +16087 +5644 +8871 +29293 +9196 +9624 +28117 +27551 +24783 +18110 +30811 +15195 +22500 +9744 +31094 +27260 +2662 +19397 +18765 +17 +1506 +3686 +1682 +21162 +24817 +11709 +4436 +32739 +9013 +8699 +22312 +13871 +13462 +27432 +11385 +15591 +12222 +27856 +12075 +26259 +13267 +8684 +28279 +22904 +4468 +13582 +21507 +23138 +28406 +18641 +2624 +1459 +16352 +31872 +23561 +8876 +11172 +30982 +18810 +31995 +16288 +4630 +19981 +28806 +2133 +18331 +5115 +4983 +28135 +13154 +4306 +10888 +28629 +12038 +18259 +21392 +7161 +15900 +10894 +4686 +23746 +2208 +24129 +11126 +31409 +29088 +20589 +31226 +27922 +5671 +26682 +10906 +22013 +16492 +17933 +2479 +17804 +6972 +20711 +20276 +8286 +12709 +3329 +5397 +17740 +1764 +30630 +25532 +20075 +21137 +25680 +218 +2370 +11529 +5894 +27763 +589 +14364 +6133 +14381 +16306 +4088 +31822 +9433 +1858 +4181 +8287 +12866 +19379 +14819 +3829 +3382 +7452 +17393 +4593 +2003 +14514 +9822 +10280 +2068 +5057 +10181 +23681 +6299 +32238 +15332 +14921 +1985 +13995 +15949 +23258 +16604 +4603 +21841 +18541 +19408 +2152 +2346 +12859 +7896 +20033 +23400 +11739 +11926 +19993 +27293 +472 +26714 +8829 +28236 +13714 +687 +27380 +5904 +25175 +20524 +6205 +7945 +450 +121 +3012 +5772 +13651 +31648 +9830 +14602 +17231 +17302 +8806 +22081 +17626 +2057 +21680 +7075 +16723 +22636 +12621 +18947 +13040 +8257 +12070 +9095 +12443 +22950 +26365 +7626 +14604 +8739 +2472 +9296 +23335 +7602 +2449 +30511 +14232 +21520 +4971 +29180 +6061 +29763 +12854 +18164 +5491 +10860 +14966 +31340 +4372 +29647 +22703 +10874 +28529 +7456 +24357 +28389 +24059 +22288 +11986 +23883 +6103 +3352 +22439 +32145 +26674 +27269 +19463 +14992 +26081 +14789 +17282 +6909 +9278 +2544 +10446 +20121 +21822 +18074 +12044 +23451 +6359 +11736 +27192 +30810 +30097 +20624 +1777 +23871 +13931 +2310 +32107 +6891 +10737 +5028 +23474 +16548 +32410 +13834 +801 +24325 +14439 +8278 +29986 +13031 +31674 +29877 +2856 +1162 +10612 +8490 +13801 +1800 +2131 +30622 +8161 +17404 +30602 +12329 +20228 +24430 +26274 +16800 +8642 +16386 +3728 +15455 +17217 +26465 +10264 +4952 +29398 +1768 +7009 +32604 +15045 +7312 +25817 +26793 +29242 +9246 +11084 +693 +9863 +10379 +17216 +1594 +18336 +16822 +7059 +13698 +13268 +19016 +20312 +5877 +32462 +23016 +22766 +4576 +4043 +20385 +8803 +22920 +29469 +30864 +28424 +21103 +31457 +7890 +23124 +24037 +2813 +3244 +26622 +14291 +11356 +20476 +24918 +21188 +17261 +18913 +31717 +24116 +1498 +22183 +1350 +25373 +2950 +6645 +4163 +8896 +5834 +15162 +24371 +9137 +28655 +7765 +1938 +6438 +28655 +25731 +2787 +4225 +5736 +16782 +24771 +4379 +18146 +28980 +11854 +6739 +2370 +22741 +9911 +11223 +27022 +8545 +20770 +17458 +21219 +21890 +12230 +406 +436 +20485 +1088 +20716 +26948 +1678 +11577 +22298 +10343 +31869 +22844 +148 +26997 +27163 +2770 +25381 +18831 +25609 +10719 +24063 +8981 +3819 +7745 +9218 +22376 +11088 +12199 +7241 +29661 +1509 +9903 +17659 +19970 +6107 +27459 +1104 +29460 +25493 +7221 +5090 +1728 +22935 +23577 +29238 +27930 +20907 +20323 +1675 +23515 +25685 +1986 +25313 +12000 +12409 +22716 +20557 +7135 +22859 +20874 +4477 +8555 +18551 +22582 +1927 +19755 +146 +8691 +9462 +13655 +3009 +1213 +23319 +16756 +21160 +24113 +28032 +7760 +26518 +2990 +22498 +31040 +4590 +12205 +12817 +24217 +9689 +16478 +15953 +22380 +29738 +7045 +3556 +8839 +24209 +7060 +26577 +9385 +23556 +27144 +24054 +27652 +31082 +2825 +15440 +25337 +8842 +24125 +16010 +3599 +16180 +4332 +14277 +28980 +28846 +15707 +6311 +30777 +31585 +13154 +32678 +32392 +10437 +9807 +16278 +21031 +11658 +15360 +2161 +19954 +24584 +14651 +7783 +26389 +19176 +18257 +19238 +18888 +26644 +3827 +30059 +24911 +4061 +9300 +2761 +26417 +26732 +129 +10169 +21943 +24939 +1021 +10723 +22953 +2036 +16032 +6316 +8004 +16057 +30898 +4096 +5759 +9845 +14659 +6497 +2688 +17044 +17869 +7985 +10329 +9758 +22285 +26172 +20743 +13545 +32543 +14729 +21165 +17663 +31961 +13410 +25869 +11341 +30825 +22177 +1351 +1679 +25905 +20286 +3286 +16248 +1250 +10518 +8136 +11557 +18392 +17918 +20030 +18116 +1718 +21512 +1315 +17280 +20803 +10516 +10800 +11696 +20100 +12443 +32545 +13889 +27162 +22456 +10289 +21601 +19165 +9080 +29148 +32110 +20153 +23907 +12757 +286 +1993 +586 +24389 +21999 +30387 +24403 +15942 +25041 +32324 +2371 +15008 +2834 +19532 +6668 +19907 +7563 +13243 +24727 +3076 +20489 +13308 +28371 +13596 +30206 +10641 +12798 +25566 +10601 +25585 +307 +14649 +30978 +7327 +20021 +7790 +26283 +2955 +25723 +31378 +16915 +5293 +25212 +30534 +11180 +19168 +22844 +12470 +19408 +17404 +15894 +27856 +2607 +31287 +6860 +13766 +20860 +14014 +10190 +29639 +11096 +16783 +15560 +25081 +16510 +21146 +17262 +31418 +2353 +24 +6284 +14104 +14819 +9771 +1864 +15758 +14375 +951 +19131 +23553 +9176 +2176 +16816 +26875 +16523 +4228 +16571 +26663 +19251 +2203 +11902 +3597 +2067 +14413 +22071 +32526 +5353 +11508 +7310 +26018 +19289 +531 +670 +15313 +16279 +757 +9026 +25584 +10073 +24970 +5793 +27806 +13564 +32382 +26620 +7166 +13045 +32411 +2487 +7734 +27515 +10592 +29607 +29480 +10355 +19683 +22427 +30576 +22427 +8932 +6189 +9374 +7931 +29491 +28106 +25781 +28041 +28484 +26112 +5348 +21531 +783 +10503 +4995 +12947 +5934 +12691 +30033 +1349 +50 +25305 +15853 +24236 +5958 +10464 +14226 +22862 +14343 +3850 +17943 +3564 +8099 +30946 +20774 +23023 +26928 +26920 +8636 +527 +9038 +794 +20194 +32070 +15105 +12805 +5546 +29684 +14281 +8972 +14444 +16211 +1283 +32056 +16706 +29982 +17540 +962 +17345 +19325 +26227 +3740 +31227 +24885 +615 +1350 +22706 +13837 +11714 +18383 +30429 +24451 +19278 +12841 +25697 +17840 +4117 +9650 +19465 +29817 +14726 +17664 +31943 +19704 +12485 +19949 +13870 +9001 +5970 +15844 +21551 +5081 +30942 +11370 +13843 +7884 +7786 +2032 +31929 +20781 +16034 +8407 +31762 +3132 +1913 +11973 +31706 +13363 +15621 +15399 +9112 +21369 +27037 +9223 +11737 +32266 +23345 +3600 +16041 +294 +27113 +5343 +31058 +11064 +17409 +652 +12632 +14346 +15076 +20345 +21173 +11560 +19847 +20314 +23889 +12946 +27657 +14469 +4037 +13221 +12424 +29052 +7505 +21579 +2374 +20664 +2843 +1634 +4093 +15032 +4266 +19307 +2688 +19018 +6051 +28276 +20627 +28441 +14018 +16967 +4876 +11896 +17436 +12244 +16426 +29294 +23187 +8412 +309 +4866 +28314 +4832 +3415 +1480 +20011 +24137 +19898 +24491 +10245 +32217 +3811 +5374 +30251 +25169 +15183 +9150 +26521 +7780 +23372 +5162 +9545 +30428 +22042 +31622 +3687 +8971 +12353 +27947 +18384 +18804 +17205 +1491 +15056 +1211 +10793 +32035 +24349 +31946 +24624 +27002 +27663 +24645 +19355 +8697 +19746 +18993 +12942 +27347 +30126 +24544 +21732 +22486 +28645 +13087 +10054 +4410 +17165 +13475 +27527 +26282 +3328 +17073 +8770 +23697 +27361 +8205 +4534 +8102 +3360 +24358 +24033 +2746 +4785 +3456 +28124 +10945 +1928 +11105 +6774 +27936 +8792 +15295 +25108 +25654 +7565 +30826 +7625 +20013 +18312 +30326 +29617 +18946 +9754 +18155 +659 +26323 +18755 +24496 +694 +31081 +10540 +22709 +22532 +25606 +11106 +18784 +20830 +15472 +11093 +21051 +4414 +31805 +8720 +7899 +23443 +10081 +18747 +27667 +17626 +5367 +21838 +24154 +32377 +17996 +8983 +13434 +15456 +30770 +29807 +8827 +28642 +23171 +6201 +24783 +21457 +6644 +6555 +15295 +1497 +10268 +21120 +12053 +10527 +28100 +32078 +23051 +19994 +21360 +8677 +22388 +7089 +19503 +31192 +17961 +30102 +20128 +10223 +3511 +7138 +26694 +24285 +11078 +32753 +22285 +21310 +4812 +19072 +21788 +5332 +28788 +20230 +733 +11011 +22089 +26704 +6986 +4234 +8743 +31328 +24187 +27268 +10212 +5510 +24174 +5790 +27578 +30400 +6677 +27802 +30968 +24912 +4774 +20229 +8425 +3484 +18206 +26420 +11781 +10570 +16919 +10373 +22359 +9372 +9676 +30420 +46 +18697 +25194 +3132 +4103 +21789 +665 +31247 +28346 +6546 +14923 +24856 +28901 +21424 +9156 +15632 +16534 +16610 +22250 +24414 +3644 +10137 +18127 +29972 +5584 +20838 +4476 +13350 +17471 +12883 +11777 +3052 +2332 +14722 +9402 +29915 +8323 +1801 +15843 +15232 +24912 +781 +21087 +25278 +23426 +4637 +10948 +31048 +21225 +25296 +6315 +32353 +25112 +4258 +13880 +12756 +20870 +6156 +30693 +27438 +28422 +22500 +31891 +21571 +29034 +7156 +18386 +8928 +13428 +27869 +21104 +11725 +22781 +8493 +7489 +30983 +5481 +27583 +12846 +5436 +16970 +25427 +16257 +28295 +28499 +16239 +14704 +26220 +3200 +18037 +11751 +21783 +29571 +10501 +13978 +19921 +23922 +18070 +13643 +17091 +4272 +5968 +18009 +25584 +21273 +14124 +5514 +21868 +27762 +20046 +282 +6370 +17679 +21154 +14084 +17990 +27846 +24246 +14479 +28630 +5652 +6616 +28700 +19799 +20878 +28017 +17712 +2701 +5515 +928 +23229 +21756 +24080 +19226 +25525 +1247 +28924 +31809 +14801 +32101 +4725 +23427 +8863 +8243 +13714 +13558 +28362 +28694 +30025 +19761 +24494 +16136 +24988 +17261 +32540 +871 +27904 +8413 +21866 +12401 +1549 +4427 +10687 +11779 +10605 +244 +14493 +19346 +30718 +7077 +3248 +19050 +7498 +26901 +26069 +23335 +4649 +646 +23150 +10865 +1973 +7576 +7909 +22780 +1646 +26733 +8063 +31423 +3503 +29443 +22627 +31091 +16209 +8654 +6122 +30287 +25501 +26005 +5929 +1795 +20855 +13454 +5308 +27123 +1737 +189 +24021 +3509 +32046 +10122 +29062 +1997 +1760 +5793 +10827 +22184 +16356 +8719 +6619 +2774 +24436 +18330 +817 +13196 +30125 +23393 +7893 +10842 +24954 +22965 +5488 +6696 +2752 +23094 +23695 +23927 +11466 +24626 +25015 +4055 +15608 +1082 +12203 +28323 +14756 +13062 +31225 +25860 +27989 +32139 +15051 +24358 +29223 +13915 +20204 +16564 +378 +22589 +15385 +6810 +23514 +29196 +3466 +31739 +21807 +5077 +29377 +31344 +20774 +31020 +3218 +19843 +15327 +27855 +5236 +6507 +19159 +8574 +18951 +17674 +4633 +31770 +21221 +30501 +14753 +2812 +30893 +5858 +24336 +9880 +29005 +27528 +28567 +30547 +7569 +14194 +1565 +23713 +27113 +27220 +6579 +29027 +15743 +18098 +2106 +10624 +9081 +5789 +18771 +17602 +6796 +19377 +21895 +4851 +14018 +9804 +3512 +17720 +396 +16400 +11976 +18605 +17418 +5531 +7559 +26177 +10138 +27526 +5859 +9173 +22688 +10908 +4171 +8848 +6038 +3932 +21603 +30341 +25684 +18609 +10223 +13193 +12192 +25072 +761 +11086 +16121 +5139 +10822 +6340 +11936 +23092 +13560 +13489 +15848 +25933 +19076 +28559 +20928 +19246 +9431 +19622 +22910 +3263 +8900 +6762 +494 +20344 +30385 +1047 +25242 +26142 +15747 +14475 +4444 +1216 +2502 +8803 +18466 +15345 +12065 +27994 +2306 +5959 +23034 +21726 +27774 +31508 +16229 +30708 +1561 +7524 +29011 +11854 +2842 +13879 +8952 +6826 +10143 +17152 +27004 +30317 +11750 +31069 +17638 +21120 +3032 +17689 +32070 +18795 +13015 +28000 +8227 +24241 +24009 +15681 +10788 +1899 +24933 +19305 +10498 +6184 +29373 +15646 +25005 +5123 +4108 +8314 +18109 +6406 +30658 +14826 +19228 +26047 +22990 +24806 +23794 +13345 +12075 +18418 +5330 +26013 +25518 +19414 +25890 +15489 +15886 +9754 +21968 +7825 +12852 +7876 +6195 +7395 +2501 +6485 +32575 +15616 +3821 +6401 +10221 +16184 +9583 +6191 +24042 +24134 +32234 +20273 +2174 +17445 +20334 +17989 +11200 +12338 +17215 +20172 +18936 +2691 +32488 +16329 +12629 +24710 +30852 +4509 +464 +1758 +328 +13569 +30559 +23674 +12885 +16708 +17503 +27384 +10173 +21959 +2108 +24633 +13779 +19126 +11874 +7493 +1208 +3336 +16745 +22113 +15907 +16826 +32380 +110 +14704 +3143 +13578 +1924 +20972 +5228 +16049 +2768 +21344 +10010 +7015 +6571 +10459 +3771 +32235 +11772 +14789 +32426 +21611 +24528 +8481 +11757 +6518 +3639 +11042 +32053 +31013 +31074 +17650 +17431 +5766 +2554 +19134 +8588 +32073 +16835 +24581 +27560 +2990 +4465 +15906 +6807 +24750 +4042 +9496 +19166 +6761 +19966 +23198 +13007 +28879 +17732 +25451 +10061 +30867 +6581 +25283 +3009 +6733 +11885 +19523 +18781 +2542 +18144 +21481 +10640 +19049 +12665 +18535 +12234 +2463 +14202 +17321 +20082 +24716 +19984 +23972 +4900 +17329 +17589 +19809 +9775 +12225 +27851 +9290 +14671 +24207 +30327 +4021 +16807 +4151 +32443 +19630 +6402 +13452 +2775 +14858 +25163 +194 +27873 +13481 +19786 +15709 +19874 +10762 +5537 +22617 +22452 +3350 +22790 +1947 +16346 +6437 +8387 +1943 +9888 +3925 +14955 +16963 +3891 +23053 +15326 +27197 +26499 +17101 +20095 +22072 +23959 +9784 +7605 +10412 +32304 +21091 +1184 +4030 +22689 +31584 +22301 +10605 +9198 +29190 +25084 +22527 +8484 +2307 +32385 +4779 +14072 +21541 +21785 +32392 +675 +11749 +11101 +23477 +23037 +12085 +22860 +4810 +31448 +1420 +16837 +28287 +25503 +21294 +27204 +19867 +4400 +1473 +3550 +22816 +7670 +20237 +18302 +2741 +32331 +11283 +12129 +3923 +22029 +9810 +2000 +21044 +9087 +15189 +21789 +15353 +15202 +5761 +31969 +29210 +21075 +2333 +18548 +8851 +3943 +27810 +26285 +10189 +25606 +23365 +18651 +4298 +9477 +27331 +30468 +22933 +8456 +21868 +14173 +24553 +12310 +15731 +9481 +24608 +30845 +30324 +4630 +1631 +25833 +327 +20662 +24576 +1983 +9732 +16314 +14656 +26560 +22614 +13908 +13098 +29147 +20997 +11022 +7619 +3154 +4031 +12805 +25207 +1809 +7207 +11883 +2756 +25931 +21792 +21309 +12069 +15447 +5979 +20288 +23105 +9162 +31775 +16450 +11349 +29397 +5464 +18831 +19167 +18144 +21475 +27057 +26764 +3944 +1049 +27501 +29028 +6934 +3226 +3579 +10036 +25121 +23387 +16516 +14908 +2533 +11506 +3298 +10778 +24004 +6689 +3475 +31478 +14653 +6050 +2814 +2799 +8012 +21554 +7147 +5062 +31489 +8417 +25916 +9417 +17764 +20376 +21745 +8451 +3207 +13291 +29788 +3490 +6125 +12833 +11680 +15528 +9755 +2177 +8304 +8150 +32637 +16095 +25094 +20438 +23163 +26728 +17506 +5031 +19676 +9130 +197 +29774 +18010 +1255 +24941 +10427 +20615 +22171 +18066 +26105 +4064 +23627 +8865 +24474 +16943 +912 +18871 +1122 +13862 +12132 +12385 +17203 +30777 +2477 +30099 +25657 +12475 +1800 +21478 +16982 +28477 +2263 +22038 +28880 +24356 +18829 +27324 +6457 +8585 +32569 +13128 +7583 +18518 +24657 +10817 +19189 +11934 +30401 +31937 +10177 +10812 +27956 +13099 +11016 +21168 +17058 +1328 +26487 +22838 +4123 +29954 +30419 +11816 +19666 +3542 +12706 +28566 +15468 +24992 +32539 +23843 +29579 +8714 +18763 +19747 +7830 +28854 +24970 +24306 +30412 +17077 +24861 +26263 +4489 +29512 +21037 +19866 +30167 +25046 +11496 +25891 +9272 +14125 +29941 +25940 +31922 +11773 +798 +5608 +12060 +31378 +18233 +23564 +8616 +11729 +3671 +10621 +31154 +12150 +6448 +2276 +13000 +11149 +3790 +17263 +28666 +3886 +6010 +23472 +29539 +28796 +11236 +22970 +26616 +32224 +25750 +9337 +27024 +20611 +21914 +25682 +30516 +15882 +17003 +11005 +15273 +1430 +13850 +23711 +22588 +29690 +19393 +5675 +7630 +23359 +13101 +3322 +24607 +31062 +15815 +9129 +20319 +10780 +32707 +12339 +1010 +147 +20877 +12112 +10371 +9055 +15728 +24845 +28237 +2176 +9609 +2732 +14246 +27727 +11755 +22974 +9421 +8122 +14100 +9343 +28405 +2500 +29840 +882 +15761 +30775 +27628 +61 +25058 +7084 +26589 +21959 +9407 +19134 +11185 +32144 +4772 +26763 +29431 +1616 +29183 +2667 +2411 +28627 +20406 +14580 +1828 +2068 +19964 +26670 +32001 +1433 +8533 +787 +7504 +23310 +26600 +9803 +11457 +37 +18181 +26149 +18315 +11181 +31479 +15321 +18140 +15089 +17675 +30205 +21127 +16980 +25568 +18501 +27369 +810 +498 +22143 +30492 +17112 +18018 +22222 +9055 +16176 +29704 +10022 +7109 +15367 +17083 +29192 +28446 +26136 +24287 +15999 +9763 +1821 +15153 +1884 +23269 +18220 +8399 +13742 +23672 +30543 +10635 +6788 +10971 +8551 +4209 +17382 +22315 +22851 +1174 +18705 +5128 +2812 +27172 +27123 +584 +17044 +13731 +7655 +1499 +10446 +19849 +28082 +12030 +12624 +7685 +13502 +932 +13816 +19209 +9621 +13601 +31611 +11414 +11681 +3609 +23364 +332 +5154 +9385 +3724 +817 +28784 +7379 +22198 +19137 +21363 +1839 +32493 +11319 +16480 +10192 +29440 +31515 +20662 +12661 +26493 +24589 +8056 +16625 +20237 +11472 +22444 +9436 +6416 +23194 +532 +15739 +30073 +7834 +28203 +238 +6635 +16587 +21091 +28569 +17428 +8440 +32670 +1236 +30026 +5648 +17387 +28630 +9061 +5036 +22658 +8414 +23260 +16862 +30466 +30372 +3619 +29501 +29161 +6145 +3652 +9518 +27732 +17882 +26812 +30324 +3321 +12626 +9880 +16379 +18530 +8752 +10449 +15329 +7788 +31117 +7652 +26310 +26367 +23747 +19637 +1877 +2575 +5267 +12454 +2067 +16084 +27798 +8947 +3943 +11845 +7910 +3409 +491 +5339 +6156 +25031 +23282 +16260 +7981 +21452 +1881 +32741 +11889 +3746 +11923 +29653 +1972 +25842 +5616 +15382 +20849 +13737 +2605 +32341 +18411 +530 +31554 +20069 +20125 +28980 +13927 +23224 +28132 +15470 +27240 +30751 +2283 +16721 +25131 +26819 +22487 +13502 +8575 +31331 +29236 +13121 +20519 +22480 +30112 +10925 +7974 +10662 +5302 +22776 +5197 +25164 +6717 +23640 +26627 +20783 +11410 +4255 +24917 +22842 +23891 +13780 +23614 +26265 +20813 +7187 +26167 +32687 +3240 +20647 +7426 +3414 +12113 +2149 +15284 +13910 +11689 +17227 +513 +27176 +20844 +25946 +25036 +30444 +3811 +16561 +7919 +18088 +31309 +19691 +19784 +8131 +27019 +1978 +22788 +1217 +3596 +15044 +1327 +3905 +4857 +8893 +3197 +25140 +2977 +13255 +20563 +3935 +15910 +30470 +16921 +3092 +5737 +15752 +29379 +4396 +19764 +9300 +29854 +585 +4007 +9680 +31576 +14410 +13029 +13400 +26195 +19215 +16383 +6684 +8491 +13934 +25632 +6715 +1670 +30326 +4346 +3869 +12571 +30435 +22897 +534 +26373 +29153 +22151 +30776 +2890 +6662 +8328 +28793 +16807 +11146 +10358 +20230 +12446 +16584 +32183 +12775 +3523 +1530 +19453 +27348 +24643 +10289 +7543 +6742 +9653 +7059 +11574 +10273 +17701 +5338 +21985 +5297 +31838 +21001 +26781 +24613 +13176 +3696 +30775 +600 +25251 +15842 +25748 +12358 +30258 +27445 +12891 +27293 +23787 +22012 +31456 +4514 +11405 +11137 +84 +31304 +2211 +30469 +12843 +16523 +14217 +9531 +11726 +21265 +4540 +14082 +1923 +29700 +14182 +32611 +26521 +11050 +14377 +2251 +18392 +25927 +6443 +32137 +23847 +15541 +25955 +12171 +31103 +10049 +13348 +6997 +29201 +1351 +20968 +578 +21939 +19985 +30558 +30719 +32656 +21870 +15029 +32581 +21009 +26255 +10027 +4566 +9734 +12326 +9938 +12219 +14873 +15809 +10914 +20924 +11893 +31332 +15557 +23328 +22706 +30822 +26910 +26278 +31748 +31374 +10267 +2755 +12709 +31341 +14268 +28958 +3456 +10238 +3812 +23882 +19231 +7805 +22240 +32451 +3798 +19077 +5941 +10795 +1841 +15725 +32687 +21957 +31388 +27108 +31910 +30003 +3409 +1483 +403 +4204 +19335 +3410 +13780 +12800 +17369 +9047 +28604 +2192 +15860 +19195 +10719 +22409 +22917 +13958 +24220 +4896 +8545 +10110 +30187 +17299 +24311 +7170 +12649 +2974 +14835 +17772 +17057 +28219 +28724 +1063 +30621 +12191 +12785 +25805 +10669 +28017 +28198 +23173 +23158 +19021 +6981 +12957 +11071 +18553 +18459 +32099 +6776 +12262 +256 +26697 +13196 +7019 +21827 +17720 +7400 +2365 +2260 +15156 +12364 +2738 +15923 +23602 +2385 +28470 +9370 +7222 +13883 +1678 +30310 +26033 +30466 +22092 +21451 +18202 +13979 +24211 +17849 +30155 +10891 +18957 +29961 +8734 +17583 +9514 +25069 +22728 +25413 +30875 +10134 +28021 +27455 +25358 +6183 +10917 +14537 +3627 +15577 +17094 +4633 +6862 +1648 +16019 +2166 +24711 +14815 +25772 +29580 +7248 +25911 +22134 +29422 +27277 +26838 +24118 +8684 +10313 +24781 +10857 +27032 +6063 +31377 +29286 +7443 +25544 +742 +16439 +19485 +24436 +14344 +23476 +30685 +7082 +11292 +4833 +5613 +12532 +17367 +23434 +3497 +22565 +7533 +2589 +7097 +11870 +27581 +6600 +18397 +16449 +4539 +16851 +22776 +14451 +2589 +21567 +29536 +19800 +26441 +8608 +19813 +18954 +30590 +24120 +9759 +20123 +22850 +17493 +27261 +9100 +3085 +28653 +13451 +15501 +18740 +12151 +4355 +18039 +12568 +17932 +14103 +23687 +6287 +23231 +7806 +16605 +658 +4409 +8125 +13365 +4649 +1945 +2744 +18661 +148 +13706 +24440 +19734 +25531 +26790 +5438 +10311 +20695 +23051 +7113 +18431 +10082 +6460 +741 +30673 +4157 +18491 +29749 +16534 +32033 +25827 +27457 +10983 +13384 +7051 +22467 +217 +13404 +24281 +5678 +27388 +31904 +16611 +27264 +1174 +1373 +18829 +26954 +17180 +29839 +17951 +31484 +19698 +23249 +20005 +25974 +7012 +1158 +31116 +1997 +997 +11081 +1018 +13402 +1159 +5015 +22893 +21769 +28602 +25275 +18456 +17888 +21321 +14587 +21370 +4558 +13969 +23553 +25793 +32182 +3077 +32140 +21598 +3516 +29151 +27223 +2281 +28879 +7720 +11594 +10039 +32375 +4587 +29407 +4025 +13025 +28597 +14552 +9496 +21800 +4433 +5663 +6158 +13286 +14530 +9981 +13448 +9211 +30849 +27007 +27642 +11677 +12024 +5670 +6402 +5024 +12606 +16590 +14400 +8455 +277 +19936 +4724 +26828 +10785 +1980 +5082 +25581 +8811 +24673 +19651 +6583 +18966 +11103 +22388 +15959 +26208 +23550 +8003 +29598 +13276 +5040 +17648 +6164 +27630 +3252 +7234 +20545 +22919 +11533 +32482 +13879 +22818 +19874 +28796 +23396 +24575 +438 +20500 +2198 +26271 +27275 +4774 +26703 +21121 +25426 +17153 +1868 +15131 +4439 +17126 +22352 +9755 +9322 +2396 +8246 +5855 +21392 +23126 +2870 +3378 +25067 +13192 +13431 +20297 +14311 +27270 +28374 +6909 +23719 +14367 +9718 +6731 +23471 +11513 +2696 +14089 +25298 +19310 +29916 +10731 +9310 +17062 +10665 +24758 +18823 +1781 +27929 +6082 +273 +17271 +4120 +17078 +30274 +24809 +25566 +8320 +15367 +7627 +16315 +5779 +30821 +29620 +1314 +12133 +23587 +17909 +19961 +22567 +12982 +5490 +12576 +14791 +5741 +13757 +18752 +18724 +5341 +16243 +27093 +27281 +20367 +15324 +11902 +17548 +25833 +17854 +20613 +7616 +11610 +7042 +28330 +25144 +6346 +24202 +13109 +11237 +14401 +31697 +1083 +27220 +16342 +31173 +10799 +1448 +3290 +10081 +6317 +6366 +31814 +26767 +17795 +8002 +7522 +7101 +14849 +12588 +3256 +21694 +19075 +11264 +824 +26851 +8252 +24933 +26029 +2137 +324 +10693 +24671 +24774 +741 +30214 +23306 +1311 +4642 +15494 +20735 +5837 +32393 +23901 +22937 +27648 +29499 +22990 +27875 +12115 +2617 +31502 +12423 +13473 +26097 +17466 +22778 +32550 +32008 +19347 +27365 +13530 +1130 +22268 +26839 +31499 +9104 +22453 +14634 +30777 +24337 +8537 +20531 +30518 +25964 +30743 +27310 +26494 +10772 +21037 +25704 +14037 +31421 +26794 +30510 +16415 +31462 +29540 +28150 +19332 +12711 +11319 +6220 +23492 +5565 +30081 +2560 +17624 +17363 +16347 +29454 +18378 +19219 +2841 +7118 +12246 +15341 +7812 +20828 +11458 +25895 +21591 +20042 +26235 +27430 +5239 +27525 +1521 +9595 +23159 +9605 +12084 +28337 +25292 +16825 +10447 +21077 +23373 +8242 +11365 +17735 +13038 +1422 +7306 +21569 +25790 +26919 +7140 +29861 +23070 +4989 +16771 +25483 +16451 +6369 +26237 +16139 +27887 +31844 +18638 +17863 +11883 +1791 +32622 +26813 +8905 +7940 +31668 +6987 +29272 +11205 +5099 +3460 +2408 +20866 +21298 +15538 +11583 +4504 +2713 +1579 +2139 +6888 +24441 +10329 +2538 +22150 +21268 +24069 +13448 +31907 +32622 +32739 +14392 +15805 +1387 +22628 +29605 +19461 +26666 +5559 +14490 +20752 +20897 +1569 +28607 +7106 +31865 +2687 +30613 +4728 +16172 +27416 +23221 +13685 +29789 +31401 +14661 +15759 +15479 +13227 +443 +8987 +21642 +15335 +21718 +6421 +32354 +31293 +12505 +18580 +13801 +10928 +16394 +22637 +12223 +7350 +26219 +3367 +23831 +1983 +27320 +3359 +28885 +8708 +22178 +5372 +8678 +26002 +27210 +10326 +9951 +12182 +16127 +2722 +9945 +9706 +30012 +3169 +7051 +3809 +2525 +30857 +24746 +1871 +11938 +11828 +27774 +17116 +16870 +12935 +28101 +17035 +16800 +18149 +19148 +11654 +21914 +20309 +15820 +14380 +19697 +5425 +2691 +17757 +10958 +12817 +2323 +11781 +7779 +12023 +543 +23271 +553 +9148 +6180 +7340 +15960 +25275 +14869 +28203 +10918 +31932 +23354 +3323 +19269 +10530 +27722 +5175 +1303 +24153 +20935 +1424 +9524 +9850 +21403 +27801 +22430 +31809 +16881 +2127 +26947 +15409 +19285 +9960 +28980 +30214 +16399 +8157 +15653 +10843 +16060 +6202 +7461 +16540 +1582 +32038 +27294 +16687 +26758 +24750 +26256 +8158 +7056 +9430 +19209 +8840 +25183 +8418 +11241 +12296 +19498 +11489 +724 +4966 +1125 +16251 +632 +32573 +28707 +2557 +3329 +23916 +5291 +16034 +27097 +14081 +858 +27940 +5796 +16482 +18105 +8579 +20348 +21949 +3294 +12565 +10857 +29619 +2824 +25039 +25125 +30784 +22134 +22482 +11278 +14318 +11912 +30009 +13675 +13114 +29721 +6178 +9187 +30790 +18971 +25339 +13627 +31937 +7029 +31502 +23119 +31764 +537 +26960 +26964 +9679 +19306 +2406 +17228 +10322 +5581 +13049 +2250 +25536 +17293 +2363 +14824 +20769 +16117 +7354 +23942 +27094 +19368 +19301 +3013 +6978 +24900 +2780 +30658 +4790 +19255 +2300 +21655 +28062 +2528 +20139 +12688 +6634 +12523 +20704 +10666 +29375 +16102 +7159 +594 +25951 +10792 +1332 +5468 +10838 +7908 +3733 +8769 +24295 +10888 +26845 +25245 +2742 +20572 +16349 +32232 +23991 +17240 +15621 +14452 +12886 +16710 +27692 +31144 +8168 +19225 +28316 +1403 +10577 +13964 +10338 +1331 +21495 +21758 +21460 +15200 +13031 +11149 +10083 +32531 +12871 +30834 +31138 +23140 +12028 +413 +3991 +26659 +9884 +26769 +322 +19677 +2966 +32641 +24684 +26387 +2463 +23468 +3506 +4790 +18016 +8438 +26577 +7143 +27231 +17096 +16692 +15596 +32300 +13865 +18363 +17270 +26572 +20765 +19150 +14610 +5226 +21310 +2978 +10988 +6717 +21401 +971 +27852 +24244 +4043 +19971 +29514 +3305 +22621 +7481 +8533 +26692 +5724 +28125 +9444 +18287 +9789 +23915 +16122 +17275 +1007 +21558 +4832 +26448 +1090 +28023 +22686 +27482 +6008 +18837 +3771 +18801 +20777 +14007 +1847 +13578 +12636 +23432 +27590 +17309 +27363 +20554 +5454 +20822 +8951 +21022 +21155 +28159 +26133 +31890 +31361 +24109 +19992 +13675 +25802 +31914 +5527 +14005 +9986 +2083 +5249 +25353 +12296 +10514 +25079 +20510 +7959 +15343 +5994 +13204 +29181 +11154 +28918 +7676 +26266 +26604 +18174 +12331 +11163 +17639 +7432 +14016 +15480 +19866 +16859 +22515 +1196 +22450 +15574 +16289 +9780 +25372 +1171 +30102 +32587 +4600 +15037 +18969 +19300 +17594 +26927 +1214 +31591 +9890 +31823 +16744 +8496 +13919 +30377 +10140 +2630 +5887 +6607 +26638 +26072 +13594 +112 +11366 +4606 +3135 +26038 +25939 +27693 +6303 +5606 +8914 +16635 +16633 +17459 +25280 +14101 +17605 +16866 +415 +20862 +31396 +21157 +14757 +25866 +27400 +6705 +23563 +7450 +4895 +24353 +12435 +27545 +23558 +7951 +10075 +55 +4651 +12272 +18658 +8933 +26883 +27312 +4184 +3473 +22254 +6928 +7210 +8483 +21863 +12476 +24782 +4536 +20848 +28080 +18892 +26142 +22589 +3532 +29965 +26256 +19487 +9142 +29800 +22195 +11700 +9969 +16747 +5841 +17741 +28475 +20326 +2132 +14496 +6443 +26558 +20869 +22703 +4108 +15472 +23687 +13304 +14580 +23780 +11663 +14558 +31528 +30964 +27749 +29783 +8629 +7741 +15648 +14552 +21063 +23461 +17438 +14718 +5453 +30509 +28994 +25981 +11087 +8697 +28273 +4046 +11151 +22173 +19791 +12052 +10207 +19882 +20535 +16848 +20930 +13432 +27257 +8902 +23750 +4662 +21463 +22959 +6689 +1841 +19266 +13344 +2443 +21089 +25809 +12986 +23387 +18746 +32515 +5780 +8165 +11696 +15158 +6885 +8210 +3724 +5479 +9974 +6977 +7663 +30507 +1095 +26206 +10787 +25070 +25856 +10306 +9386 +3180 +18076 +12106 +25473 +3949 +31953 +7226 +2229 +32197 +28866 +24148 +15401 +907 +24680 +15540 +9126 +26777 +10813 +26862 +17700 +4676 +28971 +22251 +16215 +24669 +9397 +22017 +1149 +360 +14693 +10066 +871 +6684 +7541 +3431 +27334 +23579 +13761 +4365 +29368 +26610 +28396 +30574 +22675 +5716 +11986 +9588 +30961 +1171 +12846 +27739 +13308 +96 +8845 +31637 +2043 +11972 +28786 +29666 +3613 +2654 +15819 +22448 +17798 +5342 +25748 +21680 +22680 +22466 +26058 +8890 +18563 +4176 +19602 +29668 +11023 +8916 +20906 +12765 +26281 +12572 +19217 +1167 +6317 +28721 +13298 +24053 +4595 +6487 +22743 +1850 +5532 +4679 +29707 +27411 +17950 +10411 +18000 +6494 +27790 +31963 +30658 +16380 +1581 +30679 +19723 +5355 +17462 +26756 +31945 +28072 +27111 +9259 +12604 +32708 +13518 +17968 +564 +1733 +15190 +27407 +29498 +19263 +28049 +668 +16894 +18227 +9288 +5499 +4353 +25512 +27201 +6622 +14979 +2952 +27599 +13182 +22447 +4029 +14496 +31452 +18437 +6284 +17347 +10170 +17672 +8241 +19960 +15060 +20010 +12988 +9789 +740 +30964 +28459 +27797 +6357 +29050 +1481 +17179 +12102 +14078 +12231 +6472 +20802 +24804 +23576 +32129 +27710 +30678 +3473 +8420 +16724 +12088 +9794 +31060 +6591 +2766 +7183 +11715 +23191 +15531 +21139 +14527 +21453 +18270 +5686 +27968 +26218 +12377 +29836 +18864 +24068 +20129 +28145 +17724 +6529 +444 +15459 +858 +24336 +23768 +11168 +6555 +30564 +4664 +16000 +21427 +27699 +10980 +7573 +8646 +1519 +22161 +2816 +7413 +25796 +24526 +22422 +20009 +20690 +4209 +5429 +8991 +7596 +4673 +608 +15796 +15633 +6117 +27426 +2419 +23785 +23053 +31521 +17244 +11395 +13535 +15616 +24567 +9486 +29092 +17147 +31641 +29013 +2227 +13502 +16630 +20671 +26526 +16005 +29160 +4487 +1948 +7546 +32383 +32311 +24631 +17739 +22089 +23147 +566 +23307 +24547 +19140 +26317 +332 +17088 +17451 +16131 +12666 +28473 +24136 +20324 +7801 +4310 +9537 +9193 +23682 +22235 +18103 +10277 +19003 +16150 +13823 +28593 +30485 +20200 +9117 +15065 +747 +26259 +25607 +903 +13016 +6851 +8600 +7792 +14169 +16478 +30162 +15486 +24484 +5776 +17880 +22654 +13896 +15122 +32299 +23819 +17158 +21692 +2468 +3770 +28142 +8267 +8115 +1671 +16318 +19316 +17878 +18560 +31607 +18985 +8285 +17072 +19777 +4650 +28252 +16462 +2689 +26831 +19697 +7463 +16184 +12053 +7607 +17737 +1183 +22504 +11403 +19697 +23809 +29872 +28798 +11447 +4312 +1054 +1050 +28152 +18731 +28472 +12506 +21380 +25383 +24739 +10724 +19081 +14589 +25137 +21001 +12224 +23547 +27819 +10495 +13526 +31726 +21984 +15325 +29213 +30646 +18670 +13528 +28787 +21291 +13520 +26173 +14195 +3632 +23848 +27822 +11227 +6422 +31055 +17568 +19006 +25140 +3482 +28437 +2538 +14532 +27375 +407 +29724 +255 +137 +15734 +15203 +30076 +27656 +2626 +24402 +29126 +29628 +28555 +10346 +573 +22323 +27096 +2118 +13615 +8705 +14053 +10760 +26935 +27855 +29986 +16132 +5333 +14502 +12904 +21420 +17230 +20605 +17918 +14523 +17094 +23810 +4556 +19622 +16284 +5798 +1758 +12608 +18694 +16875 +2332 +14764 +31470 +25074 +3656 +7304 +18700 +19775 +5177 +13911 +10052 +4304 +19030 +26671 +2882 +19807 +2645 +24229 +852 +31475 +31797 +19702 +24199 +16045 +378 +26743 +8709 +16081 +17321 +12351 +18351 +8467 +515 +19730 +502 +7972 +31365 +5521 +255 +23933 +2592 +672 +29943 +28779 +24629 +8216 +18867 +15195 +24916 +17838 +22413 +5736 +5430 +9251 +1402 +26147 +15352 +29358 +6256 +4514 +26266 +18599 +11255 +715 +11960 +28532 +4110 +7394 +27015 +14521 +2112 +21841 +29203 +9403 +10247 +23224 +26295 +25878 +18529 +30261 +30173 +1952 +21169 +4853 +5623 +21916 +23768 +6139 +17598 +13091 +21140 +48 +10666 +2768 +10264 +23724 +14258 +4523 +20973 +11587 +10822 +28504 +32264 +15188 +31113 +5760 +18989 +25294 +8659 +22912 +29571 +30083 +23143 +1873 +15224 +9393 +6001 +7352 +32216 +7374 +29507 +21934 +13353 +16276 +23249 +11026 +25161 +10317 +6506 +2189 +10315 +26209 +8121 +18118 +30094 +6685 +8700 +13768 +6431 +24517 +27011 +17328 +11090 +13534 +30059 +2971 +3227 +17333 +18076 +22734 +30130 +16691 +29441 +27176 +21735 +18661 +23559 +453 +29891 +25415 +9304 +3316 +10209 +8785 +16601 +28763 +30219 +69 +16610 +17513 +1688 +27831 +10685 +3581 +17412 +13277 +353 +16212 +29906 +11288 +25712 +3384 +17823 +21955 +17262 +25703 +135 +22844 +9027 +2881 +28093 +3889 +31988 +15287 +6501 +32557 +6302 +16752 +31413 +99 +32692 +26684 +14413 +26810 +25210 +18111 +1491 +30232 +3265 +12630 +22227 +24051 +17892 +24909 +25302 +12054 +14339 +7236 +14016 +29105 +14975 +26591 +20335 +12708 +7094 +5549 +31122 +24333 +17920 +13147 +29382 +12560 +23530 +11034 +2040 +30438 +10162 +8269 +11511 +809 +31235 +21624 +18776 +7518 +21489 +8293 +13967 +9667 +30776 +19864 +11083 +22363 +16305 +23541 +4114 +21560 +19734 +32688 +31005 +26632 +31735 +25462 +16758 +11491 +9980 +31449 +848 +32340 +8540 +28929 +27046 +26277 +32670 +32657 +5912 +29296 +2959 +14808 +7682 +5731 +32644 +6202 +17886 +4947 +25810 +20445 +6620 +1156 +12683 +17047 +31936 +1079 +378 +4887 +15867 +4725 +1633 +10579 +27661 +10779 +2930 +13106 +24602 +12327 +10251 +28027 +16076 +10562 +32182 +16638 +27240 +24973 +7521 +1 +8755 +29360 +28634 +20461 +19208 +21537 +15758 +2874 +7474 +25010 +12675 +10136 +13199 +1118 +29587 +27743 +14312 +26964 +13802 +1337 +10379 +29509 +20930 +15629 +29482 +20971 +20318 +27951 +24824 +27610 +30021 +27847 +4098 +1675 +15041 +3199 +30155 +22694 +14743 +27249 +10027 +29328 +31496 +10831 +24938 +10549 +15368 +24020 +4248 +28439 +1213 +10604 +20271 +18327 +12091 +28959 +6892 +16516 +14719 +6595 +15083 +7650 +32425 +10851 +4865 +9211 +13182 +23018 +24671 +11180 +16926 +21780 +7012 +27881 +24834 +18582 +31426 +11155 +313 +31628 +21461 +12923 +28643 +1572 +21568 +18614 +18158 +28809 +20682 +3364 +2320 +17939 +9591 +25659 +1285 +26796 +25322 +25625 +23562 +12421 +17659 +27338 +18330 +9211 +11924 +19158 +31336 +21444 +9937 +14863 +14493 +10078 +4952 +28313 +852 +9657 +11254 +5690 +29522 +1571 +25466 +5092 +7946 +5493 +16855 +12160 +10193 +15228 +27509 +9213 +19038 +11434 +20951 +14233 +3717 +5118 +18804 +19055 +29236 +16689 +206 +1858 +11182 +10018 +5336 +8840 +24327 +13956 +16007 +21434 +25313 +24774 +21942 +29915 +28773 +20290 +9536 +29767 +23172 +6826 +19544 +1214 +10351 +3760 +10540 +14257 +12117 +17909 +2234 +28107 +1884 +10805 +6130 +18883 +30690 +9392 +21005 +4449 +14069 +2779 +26669 +10447 +6161 +4936 +24118 +5154 +1561 +24275 +22764 +11049 +25752 +25102 +22861 +27509 +13368 +15087 +24881 +5289 +5763 +16056 +15648 +31491 +3290 +19496 +28532 +15403 +3763 +11744 +30896 +16956 +21271 +6423 +31007 +16656 +26971 +5250 +26544 +6609 +32029 +21374 +23058 +20669 +24963 +20864 +6667 +313 +16304 +14783 +1054 +31769 +1159 +26400 +27486 +31791 +27044 +2146 +32396 +7442 +13719 +13450 +27256 +48 +3939 +31633 +13718 +19478 +310 +16204 +4318 +29183 +1643 +24733 +6634 +26012 +16574 +3288 +19019 +13091 +12494 +14200 +4140 +8090 +3544 +3075 +19498 +16229 +6322 +25659 +12402 +12047 +1543 +3718 +15645 +23125 +23505 +28832 +21960 +32121 +24092 +21119 +11384 +19653 +26361 +23942 +32173 +28253 +17856 +7151 +22980 +12874 +395 +1138 +30610 +13508 +6896 +24123 +19518 +22208 +10494 +2315 +25695 +14522 +28026 +30124 +14935 +9156 +15451 +23195 +1519 +3280 +21123 +28913 +16692 +7738 +30656 +17811 +24209 +29593 +2051 +27291 +27694 +29639 +16351 +5381 +8328 +29999 +26693 +29342 +3153 +6230 +15742 +17450 +28042 +1196 +11626 +2005 +24543 +29589 +18679 +16348 +26179 +13747 +1252 +8572 +2508 +7799 +9656 +14363 +2513 +488 +29437 +18613 +22849 +12466 +3522 +394 +25927 +7793 +1616 +16902 +24860 +7744 +3372 +1776 +4908 +24957 +23373 +18135 +24428 +9439 +11679 +19130 +2811 +14268 +28599 +20214 +29943 +18835 +29145 +30838 +16546 +10721 +17960 +27157 +11446 +26146 +8492 +1623 +5126 +29221 +22921 +10569 +21334 +18069 +25342 +26294 +4219 +8645 +24732 +6283 +7863 +22203 +10825 +18829 +31823 +22144 +24948 +18489 +9582 +24487 +28954 +28155 +14398 +28 +5370 +26260 +9796 +21807 +17428 +965 +28413 +13793 +6760 +26945 +8119 +13166 +7661 +7378 +5297 +7194 +31439 +18122 +14198 +27713 +4845 +11948 +13943 +22937 +31891 +16412 +29160 +25803 +19572 +9220 +6620 +7474 +18155 +14856 +14756 +754 +21619 +32301 +11364 +13117 +21860 +9925 +14071 +19170 +12528 +1693 +17158 +11031 +15198 +32618 +30563 +3208 +20357 +4209 +10668 +3231 +14219 +19831 +25885 +8470 +16607 +18920 +693 +7611 +6005 +17483 +3725 +14467 +17473 +7653 +30324 +14290 +27383 +27309 +15823 +14090 +8961 +9584 +12976 +11602 +1984 +21573 +24630 +8872 +23559 +10547 +14885 +16170 +23766 +27425 +15813 +8353 +8019 +13055 +1024 +8782 +5646 +18740 +183 +761 +6518 +12103 +27492 +5432 +3991 +8656 +3318 +26109 +3862 +7842 +28393 +1379 +6511 +15154 +10150 +23994 +18541 +22347 +16410 +17617 +2794 +30708 +28313 +13187 +19656 +22177 +8949 +20356 +9776 +28826 +8154 +13165 +28170 +8874 +7533 +8454 +19389 +7432 +12581 +2516 +9256 +15242 +30441 +6628 +32225 +3592 +14187 +12502 +14509 +7439 +1988 +29996 +13375 +14023 +7760 +28117 +16950 +20519 +22732 +19957 +32593 +18007 +12207 +24311 +28660 +3173 +4806 +13525 +31713 +4396 +27411 +6311 +9519 +27010 +15846 +21866 +5775 +2721 +11581 +21267 +25792 +8408 +20826 +11220 +8015 +20082 +10147 +10158 +3220 +24295 +4798 +19000 +11498 +14914 +10221 +24238 +24878 +9426 +17831 +11837 +20602 +5908 +12152 +19597 +26915 +14817 +11034 +9872 +6385 +21204 +23253 +16266 +6301 +11518 +20756 +18529 +26257 +18894 +6472 +32039 +19675 +26170 +12802 +29925 +3698 +8243 +13388 +20394 +6062 +18504 +9288 +28372 +19970 +11161 +9996 +9119 +23291 +25086 +6588 +32747 +3710 +27769 +17897 +13650 +13374 +12250 +12074 +11882 +30844 +6065 +13817 +20055 +14339 +28025 +3024 +661 +22371 +12290 +13444 +4868 +32109 +30495 +4322 +23605 +19695 +12177 +11912 +24564 +31153 +15155 +22789 +22550 +21680 +16744 +10292 +14212 +11161 +15298 +2005 +17800 +6025 +2804 +29806 +16215 +5892 +8186 +26977 +11232 +3891 +1415 +15438 +19924 +4194 +21935 +25004 +24566 +31162 +26581 +22179 +1957 +22587 +17111 +11308 +10663 +7421 +8057 +28523 +3383 +1703 +1807 +27468 +31058 +23088 +23151 +32605 +14399 +18133 +19734 +2028 +11613 +4443 +8346 +4962 +26929 +25223 +11344 +24798 +26544 +21723 +32061 +25621 +25801 +7570 +6722 +19049 +29494 +27870 +14468 +15688 +16772 +24928 +27674 +24008 +14689 +10985 +8443 +13696 +25894 +14448 +26662 +6313 +18341 +3411 +25875 +13686 +4660 +6610 +26458 +19633 +25850 +13001 +31906 +20375 +1401 +1198 +1740 +24308 +14172 +7627 +8801 +26498 +9091 +27580 +26938 +22400 +31053 +18475 +23918 +10639 +13861 +28875 +2177 +16593 +16207 +1683 +6858 +21060 +14836 +28732 +5925 +22364 +19821 +15358 +22234 +17887 +15308 +23686 +29134 +2310 +31921 +23867 +22248 +30674 +17995 +27059 +8390 +17580 +12461 +17520 +29345 +8768 +24403 +2271 +27006 +6555 +23796 +21651 +28055 +19843 +5514 +13245 +28681 +10007 +6816 +27888 +24767 +10152 +7643 +2068 +26782 +23510 +19916 +11432 +13298 +11247 +245 +13116 +22808 +1412 +23321 +1582 +10093 +6733 +22729 +11684 +27255 +12351 +27948 +8906 +27986 +16108 +7694 +17997 +19038 +22042 +18988 +5656 +21287 +2471 +1470 +32334 +7317 +24221 +14662 +24968 +31573 +30097 +28312 +13392 +31879 +28225 +30762 +18398 +9897 +16493 +24222 +8209 +3779 +1526 +16526 +28849 +3540 +29237 +4247 +7652 +8829 +29342 +23976 +23534 +19180 +13462 +4492 +18989 +25355 +3217 +20918 +9556 +21226 +31344 +28237 +27879 +6507 +18202 +2936 +6136 +32556 +30553 +28907 +13600 +32186 +4087 +11186 +4544 +9971 +26393 +28221 +17529 +6332 +32475 +23213 +14058 +18661 +9516 +9054 +2729 +13657 +21740 +11701 +30084 +17546 +5189 +9003 +28921 +25115 +19527 +7322 +22771 +9168 +21960 +21448 +21959 +692 +14202 +1841 +11631 +29833 +20813 +31770 +22533 +29044 +28935 +19155 +29571 +12777 +3106 +24907 +29370 +12501 +6886 +26586 +9104 +15883 +20679 +29771 +26750 +11505 +11777 +14121 +16713 +27500 +9842 +3916 +32511 +3337 +22967 +12195 +16182 +5740 +6283 +17219 +2689 +5374 +13148 +15281 +12851 +20178 +20015 +13676 +18775 +5849 +13749 +7870 +21743 +4423 +29102 +3269 +3949 +29764 +4223 +27325 +23408 +4312 +26639 +28559 +16832 +12305 +18407 +1439 +5772 +4214 +22666 +4307 +8674 +4016 +9233 +16095 +26480 +19575 +1035 +19929 +27001 +19643 +28819 +29945 +795 +29717 +27827 +23472 +13759 +22125 +3065 +19181 +1505 +13036 +19800 +1195 +17154 +8996 +18241 +28094 +22250 +19070 +24834 +30175 +30755 +4580 +5470 +27127 +23475 +15280 +31342 +7337 +16921 +23509 +2744 +4386 +31626 +76 +27533 +5156 +16236 +5570 +11432 +28497 +29460 +21632 +15620 +8885 +15292 +16794 +4350 +20632 +30664 +4187 +13740 +18306 +31547 +28657 +19836 +22159 +11123 +4437 +12817 +22516 +22061 +29054 +14170 +7634 +24501 +13254 +19445 +11579 +9324 +6300 +29379 +29570 +10624 +23660 +20939 +25032 +30952 +2763 +21076 +6852 +17566 +4583 +3647 +7890 +11553 +8750 +1698 +8767 +18218 +9790 +24491 +31187 +15533 +24333 +7603 +18848 +9492 +28762 +8097 +25098 +28855 +26963 +21122 +30488 +927 +5512 +23142 +7674 +23420 +8719 +11390 +15578 +23780 +25337 +22131 +22759 +9166 +17653 +28425 +28320 +29518 +14147 +27636 +16478 +8339 +6620 +22778 +18213 +5406 +31712 +11339 +12716 +17477 +13888 +13342 +7594 +12263 +11948 +22924 +30563 +22641 +20159 +13489 +11123 +13329 +31593 +11777 +5851 +2362 +6301 +10471 +24905 +18521 +25916 +29605 +11692 +16597 +15170 +30824 +19704 +19789 +48 +27562 +24375 +21261 +20921 +29645 +3793 +12497 +15024 +1526 +21020 +30911 +31793 +29735 +24359 +4511 +14095 +26783 +15811 +7005 +382 +19062 +9171 +12993 +13570 +18293 +2006 +28780 +151 +32564 +5554 +16151 +2850 +2935 +29123 +25864 +12823 +25034 +30244 +23765 +12396 +19034 +22077 +22877 +14783 +26647 +21645 +4356 +21955 +3592 +30393 +11310 +2032 +24046 +25558 +29438 +3947 +27676 +22771 +5712 +19251 +25750 +24555 +12277 +3726 +28009 +13417 +22062 +29107 +16970 +828 +24171 +27321 +17778 +28637 +11077 +15039 +441 +3134 +8633 +31581 +23025 +11989 +8614 +22603 +24965 +21225 +7562 +16720 +6739 +28444 +11641 +8302 +5062 +28218 +14687 +24652 +10040 +13889 +5751 +20196 +19847 +27056 +13323 +10349 +18933 +20245 +13165 +22155 +9798 +2769 +1846 +12213 +15380 +5935 +30142 +17127 +18293 +9893 +6876 +31626 +16081 +23657 +17631 +10656 +27645 +1847 +18636 +14900 +669 +19042 +10714 +11265 +12216 +24857 +12332 +3170 +24220 +26620 +19150 +2170 +12020 +22751 +22770 +24228 +22568 +9438 +13932 +15388 +30198 +6305 +10091 +21231 +31310 +30449 +32633 +13346 +16498 +30076 +8118 +14878 +32078 +2021 +10321 +3940 +2325 +9487 +31047 +7534 +15902 +29355 +24160 +28643 +26878 +768 +614 +22528 +1510 +4346 +1448 +23619 +18238 +26230 +21424 +16473 +8579 +22733 +5184 +12618 +22622 +1950 +21395 +25059 +18693 +18913 +15826 +9060 +28119 +29993 +2516 +18027 +22323 +27449 +28442 +20512 +5529 +6603 +17163 +20386 +20741 +22684 +6508 +24498 +2439 +20923 +1059 +8351 +15654 +24596 +20013 +13937 +28407 +4152 +19932 +5977 +19322 +12143 +10838 +13913 +26165 +5376 +12363 +22063 +19604 +4543 +4598 +4232 +27135 +12760 +11863 +23907 +31037 +15580 +15278 +9922 +32520 +8201 +28987 +13464 +2546 +11998 +3125 +31984 +13175 +26080 +19465 +9306 +7780 +7078 +16853 +15003 +28264 +19499 +3876 +32660 +29943 +27221 +28650 +15475 +3943 +25537 +11203 +32025 +29254 +17105 +19048 +13772 +24058 +6904 +10098 +8478 +30876 +11077 +16723 +25117 +18710 +25390 +24466 +14012 +3963 +13727 +27718 +18049 +30374 +26179 +7382 +22897 +23319 +15634 +17903 +825 +8970 +19483 +30406 +3742 +25561 +13204 +14224 +13606 +20628 +4127 +1854 +28424 +11742 +32607 +29822 +26449 +18186 +26299 +28142 +24665 +8311 +26737 +9635 +5222 +25385 +13023 +9178 +24222 +15785 +5646 +25853 +14386 +13855 +2945 +7898 +21960 +10669 +7228 +2335 +28970 +29966 +20759 +17688 +2862 +623 +6468 +16557 +12773 +14477 +21279 +12439 +5895 +1809 +25398 +32226 +671 +3112 +1432 +17064 +28147 +3943 +17763 +12812 +21174 +19934 +18056 +1909 +31345 +21370 +19938 +22796 +23087 +23968 +13175 +27000 +18024 +776 +11021 +21721 +2864 +7383 +3825 +13571 +13472 +11520 +6403 +6396 +4997 +15836 +13830 +27576 +19016 +30472 +24358 +9747 +28189 +25471 +9675 +26640 +2160 +9465 +23965 +21841 +1164 +4227 +4312 +20694 +21902 +28767 +10962 +29690 +24713 +26398 +1225 +23723 +30459 +12284 +16626 +12009 +28016 +14460 +8128 +25986 +6773 +20292 +15218 +19980 +18879 +25659 +21984 +19491 +28573 +5601 +9350 +16356 +10395 +2030 +18129 +11178 +20856 +16174 +21162 +29960 +17226 +32412 +9025 +23815 +32752 +25022 +22043 +2977 +23224 +12352 +8799 +19069 +26962 +9940 +30301 +19181 +18677 +12617 +1887 +4901 +975 +20970 +16309 +28350 +8883 +12825 +14075 +32363 +14078 +6189 +8365 +17146 +26826 +16008 +23791 +16270 +21847 +18429 +6037 +3867 +18870 +19809 +8570 +2339 +9655 +16495 +28671 +20911 +29461 +8161 +28385 +28816 +31968 +14541 +4161 +19415 +29484 +28989 +18158 +8594 +26360 +22546 +22261 +23754 +10849 +30235 +10347 +25018 +24840 +7281 +2169 +11601 +19648 +11286 +1194 +25578 +8828 +4813 +19569 +11082 +29560 +31036 +17662 +27610 +30375 +24129 +15170 +21799 +15966 +7057 +24641 +16791 +9790 +3991 +31640 +21870 +1383 +26764 +78 +29953 +28891 +19667 +28639 +28217 +6703 +23703 +14214 +29003 +5754 +18599 +29643 +13493 +6519 +31377 +17997 +24700 +28924 +2558 +10706 +7333 +19617 +31566 +28812 +24306 +7593 +884 +22702 +21471 +6964 +19731 +25391 +32476 +13992 +31449 +22750 +28108 +3164 +25372 +10663 +7101 +7303 +16564 +4644 +24298 +22633 +21784 +13159 +32238 +20408 +14268 +2310 +18507 +2637 +20138 +26984 +19995 +23055 +11359 +31824 +4885 +12576 +20200 +21415 +22723 +18503 +31806 +4750 +23553 +8606 +14302 +20132 +8634 +13180 +3500 +6037 +11999 +18341 +11786 +20707 +18344 +23217 +5940 +18937 +4623 +1978 +18399 +16493 +14217 +19530 +14098 +14485 +25095 +12419 +3396 +22606 +12333 +8080 +23223 +12297 +31954 +31820 +18196 +7702 +5560 +15922 +30280 +14389 +15757 +8837 +7838 +26458 +5410 +15808 +3101 +8641 +18410 +31040 +3364 +28467 +6070 +18736 +1092 +9110 +9135 +9909 +7006 +31675 +1684 +6747 +21502 +2148 +10293 +25280 +28919 +5013 +24112 +895 +30015 +27677 +14316 +18528 +13324 +17252 +4563 +2237 +11824 +2422 +19412 +14135 +14514 +29520 +16152 +2459 +10414 +5995 +20227 +17679 +111 +19591 +12654 +31361 +22986 +14010 +18980 +16209 +2493 +11960 +13722 +11837 +14665 +28516 +24307 +15501 +28557 +13720 +15668 +12161 +18724 +15921 +5060 +15864 +22720 +20063 +21032 +10849 +27911 +12843 +28412 +24807 +14253 +23881 +23092 +26072 +4564 +6688 +25237 +8279 +22944 +29464 +10862 +19779 +9503 +16931 +1948 +9830 +18008 +4750 +27325 +2530 +23729 +16650 +10676 +11737 +28550 +1526 +18781 +11356 +19975 +21999 +8850 +29590 +12370 +17562 +32350 +26170 +21970 +21937 +1408 +14378 +7384 +26700 +7972 +21352 +20343 +10354 +6877 +20802 +8613 +13024 +16870 +21434 +7311 +22296 +11162 +19251 +29501 +9133 +28977 +29795 +31847 +10446 +7357 +6773 +19862 +7442 +28516 +27005 +13182 +20611 +23263 +23842 +923 +6637 +18995 +6022 +780 +10856 +5551 +11385 +24236 +29475 +15911 +11487 +28791 +2420 +19311 +32351 +19995 +13597 +27162 +19278 +23773 +5345 +9332 +5850 +26287 +1352 +21181 +16763 +27792 +13742 +7848 +2455 +12835 +6034 +13844 +21620 +16019 +5149 +2314 +19299 +20134 +13298 +12023 +6443 +29728 +9525 +20267 +21427 +24155 +19422 +10385 +24052 +2083 +18496 +5296 +19999 +18135 +8148 +8675 +9226 +30398 +29771 +8405 +23521 +16552 +29908 +16704 +10506 +13510 +30123 +6630 +25944 +14026 +23010 +14287 +116 +30530 +15220 +4293 +31625 +30258 +32135 +29966 +15663 +19185 +13570 +23657 +18842 +11590 +4943 +10828 +11012 +31682 +16242 +17756 +5720 +15200 +18763 +7724 +6176 +19548 +8999 +314 +21936 +20561 +19854 +20519 +11924 +32150 +8520 +32311 +19000 +23514 +25521 +27657 +24022 +9726 +4415 +32407 +13989 +19762 +2641 +3441 +21568 +22868 +3642 +1078 +8020 +8837 +12430 +21331 +2190 +8205 +13484 +3072 +7108 +18545 +31628 +17271 +21346 +16083 +28618 +6519 +14360 +18826 +7156 +32250 +6337 +19970 +22288 +4658 +26263 +19925 +13169 +16586 +406 +8490 +7100 +26970 +301 +27214 +18997 +15148 +17708 +32402 +1616 +6958 +23274 +16485 +21620 +12599 +694 +9905 +1042 +30846 +24960 +28026 +18406 +28504 +10953 +11189 +17549 +16946 +20168 +19046 +16712 +3534 +30942 +6398 +26383 +5314 +27196 +31476 +14810 +1070 +31954 +27298 +14379 +9149 +23163 +19810 +19679 +3295 +13416 +21737 +32567 +17732 +1738 +27107 +3362 +22684 +13508 +23504 +23501 +19854 +2192 +21022 +27245 +4599 +25583 +14984 +13132 +14948 +11479 +12462 +10002 +12498 +16984 +6901 +11862 +11941 +1488 +30882 +23909 +7654 +17488 +7474 +18002 +15809 +3149 +21756 +5438 +9790 +15243 +12042 +25321 +1855 +20807 +26676 +27001 +16059 +20644 +13182 +1931 +8761 +16216 +23476 +15736 +6032 +3223 +31300 +4329 +22749 +27711 +16220 +669 +32709 +29254 +1860 +634 +13292 +31329 +14589 +3539 +6326 +10230 +10779 +25592 +22077 +2629 +992 +32004 +22931 +12498 +26010 +12003 +10297 +15381 +16447 +11426 +25312 +13925 +10054 +19451 +21343 +16674 +4808 +15648 +8692 +25122 +20183 +8392 +3519 +32094 +5151 +10360 +17532 +18142 +1468 +11539 +13696 +14562 +4186 +26533 +31735 +23122 +26259 +14444 +15452 +24936 +5765 +10280 +4409 +32411 +29875 +4005 +25377 +23503 +22559 +4485 +18411 +7100 +25508 +21075 +17712 +26012 +22681 +6854 +4615 +18713 +11940 +20562 +13312 +1654 +27867 +28661 +4958 +1788 +34 +30527 +25242 +4519 +2752 +26531 +29973 +2066 +26948 +20478 +24860 +14240 +26775 +2149 +2337 +2796 +26978 +3124 +26680 +10100 +27811 +7764 +15824 +17281 +17803 +9164 +29876 +16473 +27802 +24715 +24898 +21672 +12286 +628 +13034 +21292 +15656 +9899 +13546 +22944 +16304 +17695 +14920 +29676 +4459 +11864 +20752 +32651 +14282 +1922 +6351 +23356 +10870 +28859 +22607 +12012 +7977 +16793 +11925 +22499 +22224 +2048 +31513 +17711 +10207 +13602 +22853 +20558 +16884 +9431 +19249 +24095 +26287 +27423 +28572 +21515 +5072 +5109 +24366 +11631 +23187 +16726 +3308 +15693 +24649 +21394 +17916 +26676 +17463 +2003 +11419 +25197 +26291 +14571 +19036 +15975 +19837 +11874 +5539 +22373 +8540 +9664 +1634 +25702 +249 +535 +5650 +16212 +9472 +19925 +18164 +11377 +4469 +31432 +3721 +11775 +20564 +3186 +16207 +12336 +29036 +6287 +19902 +6477 +19325 +18917 +3203 +2601 +14993 +20811 +15356 +23241 +22424 +28925 +2292 +8012 +25927 +3615 +22176 +16673 +28210 +29839 +28634 +30826 +20520 +14575 +31644 +12715 +12495 +25843 +20672 +11191 +6017 +23016 +1270 +23005 +10342 +5509 +21254 +22094 +15570 +17654 +13384 +28882 +21729 +21031 +18785 +9643 +7760 +22350 +28223 +2249 +3231 +9403 +5463 +28977 +15973 +17636 +17950 +28839 +11251 +10924 +23238 +25507 +23341 +30196 +22842 +9587 +5284 +31332 +860 +13485 +22008 +29819 +31358 +21464 +32110 +6357 +4639 +29274 +27341 +27068 +11751 +27044 +4478 +32499 +18149 +23197 +14307 +11198 +29703 +14157 +24567 +12085 +4570 +17611 +5416 +23243 +25988 +8553 +7025 +23322 +22271 +6941 +15292 +3825 +7831 +25139 +10615 +6304 +423 +25649 +15733 +5507 +31376 +23307 +519 +10189 +26618 +23688 +19546 +16022 +8015 +30196 +24340 +18472 +32372 +8199 +21034 +14982 +22730 +5909 +15365 +7742 +23397 +25464 +22485 +1905 +17547 +7739 +9525 +10528 +2673 +15880 +15616 +28344 +19761 +30804 +22386 +18401 +12303 +713 +16259 +4740 +30189 +16627 +12160 +20251 +32012 +10799 +21228 +2877 +30213 +29649 +27030 +11881 +29191 +19349 +18427 +5394 +9298 +11848 +12510 +9708 +29428 +9911 +17446 +19830 +12996 +216 +32504 +3016 +10908 +15671 +2325 +159 +14810 +20644 +19318 +8614 +15897 +31771 +3109 +1799 +5165 +18676 +2910 +31282 +20573 +30028 +24039 +13037 +2532 +23730 +173 +28316 +21930 +10518 +24992 +19923 +19519 +22511 +22992 +9241 +14105 +24492 +21704 +9727 +16654 +350 +8491 +8546 +17941 +4771 +9869 +11260 +7737 +19414 +31892 +29746 +32734 +26228 +8016 +8217 +21817 +6098 +15575 +26313 +8457 +13309 +22565 +20455 +20123 +1266 +15666 +17774 +2301 +8703 +597 +25533 +30081 +21369 +4825 +13286 +28022 +20127 +32477 +15414 +4898 +21966 +3185 +4864 +24068 +2279 +17902 +24495 +31304 +29182 +406 +30219 +6026 +6725 +7789 +30667 +719 +13111 +29271 +10332 +10177 +8200 +9587 +24305 +21803 +27469 +30391 +17099 +24757 +29928 +9676 +15818 +1505 +25654 +32300 +20789 +7237 +10876 +16250 +14534 +266 +8592 +24353 +2042 +20389 +4804 +24369 +11671 +17877 +12824 +13942 +2429 +28382 +22943 +1498 +178 +29188 +4402 +5885 +15273 +8266 +11860 +24594 +31443 +7532 +6245 +2301 +11625 +16410 +32012 +11691 +13943 +1399 +222 +22961 +3116 +13266 +14419 +31016 +7522 +2211 +29931 +15047 +10601 +3529 +12956 +8003 +30233 +29187 +12672 +12772 +4119 +172 +1980 +9832 +359 +5307 +14259 +22556 +10803 +8955 +5741 +26169 +10202 +14215 +3650 +27005 +30268 +648 +2507 +32522 +14149 +20531 +4874 +9347 +19640 +2045 +29400 +8548 +12349 +3873 +23695 +31139 +13742 +10837 +29177 +9605 +9118 +15048 +11129 +2754 +20011 +29280 +28792 +29404 +8198 +23345 +27666 +31421 +15808 +20033 +27138 +14224 +12119 +13691 +18379 +3297 +15360 +13553 +17961 +28664 +25655 +5974 +18103 +5234 +9733 +6587 +16865 +15905 +30609 +29322 +269 +13350 +9194 +12224 +26885 +4429 +30228 +18543 +24744 +28073 +24145 +32115 +8146 +7537 +32177 +25972 +29320 +281 +17372 +16412 +15464 +8884 +2847 +27802 +18512 +7305 +24245 +8023 +12366 +1269 +22360 +13048 +27080 +23425 +14856 +12436 +16876 +13123 +17691 +27447 +22107 +5754 +22406 +19095 +22033 +24421 +24170 +8469 +5784 +612 +13538 +10487 +18797 +1362 +25100 +1253 +23987 +8225 +24917 +24481 +23063 +17080 +24842 +1803 +15106 +31753 +8988 +7764 +8454 +32375 +27700 +17282 +23427 +15719 +11511 +17445 +7065 +24612 +20891 +15704 +23379 +1529 +25515 +17146 +17681 +6025 +27158 +27182 +10038 +8562 +13182 +21265 +16403 +29730 +30400 +3515 +28180 +1272 +30143 +30328 +4137 +19616 +3702 +25928 +8824 +7848 +26174 +19604 +25409 +13927 +7004 +9011 +3089 +29968 +10446 +13725 +27434 +3345 +26710 +14958 +26930 +5810 +24264 +17950 +18204 +18923 +16017 +31231 +8276 +22918 +19593 +2680 +32047 +11126 +4858 +30848 +402 +27254 +3825 +6750 +992 +11493 +17348 +20383 +6186 +11489 +24803 +31832 +23442 +19875 +26084 +10141 +3072 +27163 +28874 +22850 +14345 +10444 +8854 +4817 +4892 +20713 +17937 +32716 +14830 +23729 +9432 +14628 +29481 +17672 +13992 +14329 +14416 +16983 +5867 +21396 +4854 +32421 +27780 +26274 +6688 +29942 +12247 +30643 +7159 +31204 +31517 +243 +16306 +10620 +20710 +13095 +11202 +13915 +1263 +20459 +31808 +22026 +13095 +30506 +5525 +18070 +28924 +990 +8040 +10611 +9451 +21514 +13261 +12179 +12359 +6132 +3755 +21187 +22344 +1192 +18798 +6213 +4952 +1450 +28399 +6324 +15258 +18938 +29600 +18708 +12221 +18510 +24060 +16696 +28927 +5771 +11054 +31577 +21892 +12421 +15360 +18676 +16857 +2552 +22023 +30948 +5316 +1991 +1293 +27328 +12623 +15475 +26815 +2935 +21268 +991 +15000 +30506 +6346 +23106 +6157 +15434 +28944 +2669 +23802 +31731 +21882 +3903 +6732 +25480 +32729 +17510 +29936 +15247 +1488 +16984 +30972 +1998 +1684 +400 +11549 +29863 +22275 +8462 +29249 +3505 +22504 +27657 +31621 +31128 +25229 +31479 +27232 +14135 +30594 +3008 +23313 +6132 +7085 +27966 +27975 +29531 +3987 +6648 +5392 +20478 +19686 +24096 +16389 +32140 +30287 +9418 +6835 +23599 +9596 +18543 +587 +19756 +17261 +674 +28302 +2230 +22268 +22289 +24563 +21778 +30123 +5566 +7707 +23282 +17075 +20607 +21112 +4875 +10313 +24500 +19256 +2296 +14131 +21065 +29304 +28499 +22668 +25836 +17831 +16657 +15827 +23695 +22839 +27678 +15163 +24608 +13451 +16698 +30766 +11655 +4637 +9492 +8739 +17889 +20463 +16037 +3490 +27900 +7221 +7886 +29076 +6163 +10817 +7477 +10448 +10186 +31662 +26205 +9699 +2413 +2513 +30468 +1312 +7013 +23388 +193 +26857 +28924 +21076 +29662 +3132 +20818 +15926 +10868 +14209 +3487 +32357 +28869 +914 +2731 +16600 +26335 +5899 +6538 +10497 +30574 +18901 +31645 +27392 +24545 +23278 +11718 +9993 +1472 +9338 +22251 +4370 +5453 +31247 +30126 +12482 +9562 +7485 +10602 +17814 +23658 +29789 +12913 +6997 +21259 +28572 +1413 +23223 +12147 +18503 +3732 +8785 +13914 +1625 +32440 +29636 +19735 +30786 +16751 +16679 +10494 +2298 +29975 +9905 +10232 +8262 +685 +7339 +3684 +31050 +12487 +11669 +9774 +6992 +19919 +31896 +31534 +24792 +19841 +10284 +12484 +14560 +30120 +21770 +11441 +3701 +30229 +27988 +4919 +634 +2016 +24579 +20597 +25527 +28642 +27793 +11004 +4390 +115 +18152 +7094 +12923 +30305 +8075 +26361 +29426 +19761 +23556 +13031 +10845 +26265 +2957 +5897 +8301 +8509 +25602 +24875 +22080 +15018 +21255 +2938 +556 +6288 +28533 +8157 +10698 +21828 +22283 +1169 +1607 +11126 +17490 +28168 +7911 +7471 +26833 +29186 +17882 +29198 +22386 +30701 +25411 +26819 +2868 +634 +14982 +14284 +22035 +3713 +5587 +14703 +17460 +792 +1008 +24313 +16213 +28398 +5195 +18229 +32373 +3821 +15679 +5167 +3520 +23056 +22694 +23594 +31421 +3714 +25249 +20959 +28858 +31736 +26276 +32761 +20856 +1872 +18117 +13261 +5651 +9067 +18757 +29534 +1077 +15175 +6239 +6801 +892 +18785 +8273 +31661 +7976 +6218 +30633 +7958 +9 +26760 +15826 +32330 +27304 +30639 +7134 +22044 +3509 +9408 +21397 +27697 +11441 +11714 +2239 +25528 +29404 +17055 +12463 +32110 +31329 +26945 +21521 +24273 +21440 +28397 +3828 +15523 +6525 +25311 +31515 +1187 +23559 +22055 +28800 +25223 +29163 +23747 +18474 +15421 +30777 +3070 +3377 +355 +3895 +29192 +18447 +27141 +8005 +17111 +20521 +150 +12816 +13885 +20381 +4913 +11259 +21323 +25934 +26640 +29130 +9445 +4397 +20813 +18065 +5030 +22219 +31705 +28124 +24822 +16924 +5562 +24096 +32617 +14990 +10121 +3938 +17499 +20554 +15659 +12838 +11978 +28618 +14799 +23194 +16244 +10140 +29480 +27651 +7729 +27764 +28652 +20584 +2195 +1912 +25998 +18558 +17851 +6856 +20791 +24533 +7038 +26701 +18443 +20800 +186 +18116 +23193 +26506 +2290 +28939 +10147 +9814 +17713 +7082 +31249 +18263 +5661 +31909 +3632 +22450 +11097 +12673 +23087 +432 +11297 +12180 +30172 +20136 +17697 +10898 +32155 +27948 +6037 +7509 +3239 +18291 +17831 +24812 +10893 +30215 +6149 +32232 +18405 +23215 +30914 +9186 +9812 +28575 +16240 +29521 +18367 +5855 +2683 +1419 +16593 +30201 +8647 +24344 +2736 +10726 +7821 +14399 +12283 +24379 +21619 +18379 +28935 +6800 +14314 +31774 +15195 +15665 +15821 +20089 +4201 +4616 +28727 +7306 +14223 +28362 +13477 +13367 +22350 +13665 +32589 +32170 +20937 +16794 +28606 +28573 +129 +3856 +4793 +14823 +11088 +9048 +17742 +21064 +22179 +2158 +30011 +20337 +17660 +25440 +14977 +15959 +18343 +29497 +1608 +23994 +15035 +1072 +25333 +27632 +18517 +8978 +393 +29431 +20241 +7405 +4157 +16059 +1993 +5886 +5724 +27044 +18065 +19165 +20832 +11107 +29427 +13031 +20304 +22014 +4967 +13036 +16985 +11546 +2070 +2330 +18860 +905 +20689 +4906 +11159 +19220 +31308 +13257 +15591 +649 +3743 +25673 +29052 +11784 +9470 +16009 +21038 +17803 +27832 +2849 +21472 +17845 +20334 +8146 +19427 +20188 +1686 +6702 +32142 +32345 +16432 +17028 +32027 +28175 +11975 +8974 +25539 +1594 +8362 +8030 +4381 +3450 +31340 +6150 +30132 +8991 +12442 +26247 +8936 +4023 +7355 +15740 +7175 +6101 +18830 +14599 +9387 +15652 +4735 +11132 +2135 +6573 +12907 +29261 +5965 +16741 +7573 +24374 +21682 +22010 +17128 +425 +4581 +14559 +4207 +23676 +29468 +1942 +22291 +21457 +6465 +20029 +27028 +24390 +27916 +7260 +4809 +19550 +18273 +26606 +16155 +7472 +29420 +27309 +30016 +20302 +17147 +26019 +31285 +5880 +15259 +30446 +15487 +23170 +1782 +28114 +25250 +31235 +13292 +18694 +6369 +12095 +31217 +19256 +31289 +4567 +32295 +20962 +12440 +2991 +21948 +23121 +10338 +18848 +16773 +24818 +29479 +29791 +24284 +1760 +13725 +15790 +18870 +10667 +15589 +3521 +27657 +22891 +5883 +23795 +30301 +22790 +19070 +1450 +15793 +5310 +2466 +6791 +31376 +15102 +31859 +3282 +9588 +25445 +32332 +12070 +27739 +28692 +27287 +24665 +32168 +5428 +21703 +27310 +9276 +13004 +18322 +25406 +28885 +27842 +26484 +5540 +27814 +11567 +5217 +18408 +4408 +31975 +26313 +25262 +384 +24136 +9170 +18848 +16450 +5699 +1233 +28696 +24485 +4010 +28169 +30226 +26135 +17593 +28841 +22866 +25700 +23271 +13312 +1746 +30994 +23790 +8707 +22638 +15615 +16152 +29441 +19155 +21822 +6604 +29860 +30628 +9774 +18010 +10284 +8175 +25564 +18947 +5096 +21200 +31644 +15180 +25590 +31844 +4834 +3461 +13883 +26865 +5990 +28308 +11685 +2131 +7288 +8967 +10400 +32169 +417 +3162 +14039 +18241 +7803 +17797 +10797 +2754 +28627 +457 +24314 +20888 +509 +6588 +6026 +16805 +5238 +29331 +1748 +7717 +12992 +11184 +26231 +7394 +15995 +15980 +13306 +23450 +9920 +31782 +28997 +430 +18627 +5772 +1115 +23052 +13736 +7721 +4698 +29022 +22949 +9008 +29108 +1140 +16474 +25735 +4015 +19183 +29293 +14615 +25883 +27183 +10346 +8019 +22100 +7295 +20186 +7943 +6775 +22656 +6049 +26979 +1512 +1235 +5277 +25415 +21508 +1035 +6013 +1489 +19492 +9425 +21214 +16677 +24018 +16985 +30893 +19836 +4175 +8454 +20921 +5743 +24901 +21337 +2711 +11397 +28361 +13087 +12731 +26876 +2196 +15067 +8916 +12245 +1155 +19313 +23400 +31779 +29260 +10773 +29872 +8852 +2690 +17012 +16054 +30272 +29900 +31009 +14509 +15282 +16738 +6722 +25232 +5684 +12744 +12411 +9215 +23392 +11471 +20506 +17494 +30948 +31177 +8837 +12303 +22677 +7948 +15841 +1882 +28343 +32681 +5380 +12795 +24203 +5230 +2973 +29795 +24858 +23578 +31394 +16914 +23105 +24287 +12539 +18732 +18430 +24862 +15469 +29530 +30713 +8542 +1736 +22500 +12118 +15757 +4948 +23308 +12474 +7035 +26746 +30381 +19611 +28820 +29103 +26645 +26573 +17630 +26022 +16159 +9291 +3379 +31926 +2709 +6210 +14527 +905 +7621 +16228 +19901 +5638 +11105 +4714 +29038 +3713 +12700 +28907 +30554 +29986 +29571 +18781 +21450 +31635 +31641 +11113 +3461 +20718 +25526 +12403 +2763 +23014 +24098 +26218 +21904 +6452 +15341 +10445 +13051 +21572 +27793 +5118 +10782 +16416 +13003 +32459 +22006 +17054 +2743 +9786 +7846 +5062 +32042 +30613 +13808 +19334 +23637 +9399 +29428 +10137 +9623 +28309 +26925 +5556 +1186 +21007 +22185 +19955 +13266 +761 +17800 +2436 +13770 +24933 +31928 +8594 +9297 +21812 +7151 +8821 +4203 +15324 +32490 +7960 +12219 +21627 +17380 +20650 +21273 +22045 +4441 +20104 +25199 +7242 +30460 +27242 +23001 +5588 +1526 +31949 +1021 +25055 +31841 +11681 +28071 +18225 +8197 +1333 +20137 +29115 +9298 +20831 +25586 +8809 +14237 +10991 +30446 +15655 +5023 +10070 +3613 +24884 +11563 +659 +759 +30635 +24367 +19807 +30974 +25678 +11503 +27545 +29221 +17558 +30589 +28404 +31841 +26873 +17019 +6623 +13453 +29819 +25620 +5812 +6788 +20088 +15417 +12069 +29305 +21168 +20249 +4068 +12186 +27539 +24291 +25746 +9189 +719 +24768 +22507 +29002 +29720 +26891 +17455 +30722 +28215 +27347 +8147 +15919 +28246 +26259 +29289 +3253 +16778 +25648 +24013 +15704 +14497 +21556 +1937 +30230 +31278 +13386 +28331 +19911 +7891 +4857 +31070 +5619 +975 +20133 +18278 +17908 +32712 +11203 +5223 +17229 +26073 +7772 +13976 +841 +735 +25285 +1451 +16855 +257 +16797 +13824 +18854 +23934 +6919 +29707 +2428 +23739 +5417 +19459 +29404 +10380 +2533 +10701 +24024 +1218 +4055 +32040 +28212 +17910 +14991 +19993 +13757 +30357 +28176 +19865 +4072 +22061 +24969 +11902 +29357 +7927 +11602 +21159 +12454 +15780 +42 +6252 +26724 +26476 +22448 +21572 +7442 +14933 +22559 +17080 +13389 +21441 +8014 +32393 +21826 +2363 +12007 +18205 +25866 +12163 +18919 +9008 +7234 +7127 +24918 +11192 +29167 +19332 +27720 +2840 +22416 +23982 +18197 +31882 +645 +19292 +30165 +22470 +16032 +2503 +26142 +29944 +1545 +740 +3073 +29921 +23127 +4143 +30275 +14668 +6892 +25530 +13784 +6579 +21649 +2934 +13478 +8243 +18003 +31426 +22391 +23213 +6045 +17970 +1855 +3134 +31639 +32161 +32145 +19170 +15806 +20601 +28764 +21859 +29636 +26690 +30954 +11656 +20650 +9577 +21018 +17020 +21788 +10835 +18909 +14204 +22797 +24738 +495 +4805 +10899 +25799 +23511 +24765 +15877 +968 +11298 +5984 +11090 +14163 +4315 +17902 +29861 +19460 +1871 +23763 +21047 +7667 +7423 +6614 +32628 +6018 +22501 +25734 +17745 +24165 +12780 +9954 +15853 +23282 +17322 +28232 +3430 +1451 +31328 +24736 +3070 +9993 +30004 +20937 +7535 +30091 +26029 +1347 +12684 +15871 +3952 +26654 +10777 +528 +17209 +20260 +8683 +14609 +28957 +1347 +20804 +7945 +11774 +13885 +2921 +15871 +18511 +402 +4485 +7559 +18441 +16814 +14018 +17549 +30190 +21327 +4517 +31073 +17918 +26938 +13995 +27651 +16694 +14366 +14370 +14001 +19088 +1736 +26441 +24751 +23351 +28297 +4779 +20310 +4619 +22501 +15801 +20832 +12885 +32637 +3495 +12402 +28108 +3902 +26504 +29931 +5576 +6092 +31661 +18412 +4037 +30249 +14906 +8104 +10523 +29098 +27914 +8686 +9724 +7708 +29382 +26868 +10158 +20018 +22336 +5733 +17930 +8754 +17686 +24750 +30774 +32480 +3204 +1670 +10399 +30890 +15241 +21692 +4153 +32534 +829 +10821 +13563 +21610 +26226 +9861 +10133 +7578 +28042 +28125 +23668 +5750 +23448 +12407 +15353 +13844 +8379 +24398 +17909 +20348 +1463 +15232 +25704 +31379 +19668 +11224 +18811 +20810 +17404 +1175 +29883 +19719 +1040 +11651 +15256 +20563 +22922 +21043 +28957 +10438 +4697 +2201 +2289 +5424 +11513 +6608 +20879 +7177 +9427 +22824 +8642 +15899 +22484 +13679 +5476 +20846 +16720 +28802 +13655 +4212 +1561 +10517 +9924 +10613 +3547 +8895 +15763 +23102 +9659 +30793 +3627 +25606 +26672 +9272 +23148 +25504 +26145 +2968 +30185 +23016 +19776 +30475 +32106 +28775 +1958 +9747 +32162 +17993 +4271 +26780 +25901 +20865 +31512 +27341 +24013 +8250 +25688 +7952 +26854 +1665 +20795 +29280 +23351 +1074 +12229 +14034 +5083 +28448 +31302 +28775 +2687 +11656 +14266 +28689 +4325 +3256 +21859 +26883 +25498 +32764 +5546 +27710 +26099 +21449 +4146 +30296 +9550 +8493 +32573 +31631 +32647 +3446 +22085 +7695 +2233 +8738 +24019 +31361 +3126 +18695 +20642 +14036 +17609 +14531 +13817 +16207 +10283 +23910 +30022 +24024 +25027 +2399 +24311 +6014 +22690 +31396 +9886 +31822 +23743 +38 +2629 +21844 +22383 +19316 +8974 +23791 +6952 +15022 +6927 +27994 +11895 +9901 +17516 +20856 +11839 +368 +19894 +9184 +9011 +20682 +3972 +26665 +26262 +20810 +12112 +19063 +29234 +19819 +5012 +12614 +14231 +29949 +25893 +3446 +23190 +16595 +6608 +5272 +27389 +11950 +17459 +20855 +31124 +24938 +9437 +14058 +9304 +29031 +14505 +8410 +30199 +31034 +16471 +28559 +13451 +10901 +32109 +10559 +31643 +30580 +8269 +19929 +15696 +7050 +9111 +18702 +1780 +4587 +4290 +11937 +9392 +17146 +27126 +11504 +134 +30357 +13612 +25027 +22669 +22144 +25736 +32085 +10349 +3344 +6134 +24481 +25114 +19480 +29700 +7151 +20949 +18457 +2560 +3742 +18784 +29605 +3411 +28979 +28288 +1812 +21020 +6306 +18617 +8299 +20752 +18909 +27205 +1929 +11409 +20635 +20566 +25235 +29453 +17514 +22158 +26274 +6810 +10232 +22971 +20652 +29135 +20126 +26071 +12976 +485 +13358 +2880 +24870 +7695 +13054 +14132 +3238 +7191 +17460 +11152 +21463 +29241 +13909 +29129 +22939 +13892 +1545 +25899 +11128 +14831 +17713 +12369 +1098 +16506 +15403 +23014 +14119 +2438 +12644 +15514 +20115 +11573 +800 +1639 +11237 +1413 +32646 +6918 +13049 +8426 +9967 +30124 +19991 +31274 +17520 +26122 +22052 +29054 +2214 +17540 +11015 +17127 +4801 +31152 +2142 +30158 +5075 +29970 +25187 +479 +30811 +28438 +22296 +9511 +17421 +4687 +32698 +10092 +3044 +26607 +11877 +1741 +14955 +9094 +25604 +18843 +2631 +10751 +2684 +29046 +25353 +28632 +16153 +19372 +1075 +2721 +14648 +6862 +10888 +4536 +6454 +21908 +7065 +10819 +11161 +30451 +17292 +23150 +27774 +7037 +20783 +32743 +22338 +26616 +31806 +1431 +20084 +30018 +25074 +13473 +10235 +15717 +9163 +15520 +10628 +17910 +13470 +20254 +303 +947 +32737 +27216 +1658 +13148 +22326 +12057 +20333 +9170 +21046 +24126 +26119 +11630 +3201 +22757 +10729 +21156 +28163 +16468 +10817 +17881 +27016 +4329 +1018 +20609 +23939 +21589 +4129 +22397 +795 +18205 +28315 +30900 +6007 +3410 +14597 +32240 +11083 +21135 +27116 +8443 +17571 +28981 +17454 +23801 +16111 +31971 +18096 +18696 +5456 +19512 +30786 +14359 +802 +24012 +6095 +6660 +9930 +13421 +31945 +23034 +4801 +1686 +13268 +13833 +30945 +23862 +9137 +19463 +23535 +32159 +18030 +22438 +29546 +15051 +17100 +24022 +11667 +2519 +29169 +16733 +31677 +30138 +7503 +31925 +21719 +20037 +211 +32038 +6711 +11872 +23890 +23332 +19113 +13699 +10034 +27627 +12216 +4211 +7509 +26713 +28987 +11583 +21579 +9483 +15140 +13946 +440 +6076 +24965 +12730 +5122 +9690 +12003 +23889 +25151 +30826 +18624 +10571 +95 +20765 +22115 +26536 +918 +7347 +21994 +4059 +17165 +16017 +19347 +12674 +24777 +20894 +14151 +29288 +9947 +23139 +31848 +13240 +1225 +9827 +10204 +14980 +14653 +21687 +16474 +30582 +29676 +17390 +3316 +18901 +31689 +24867 +32230 +22971 +9580 +5216 +9118 +26005 +9661 +17971 +24587 +7899 +3301 +14991 +15914 +29201 +30070 +15589 +7119 +22015 +13273 +22915 +4529 +32300 +4600 +8236 +17849 +3233 +25389 +11257 +5004 +7900 +31851 +27760 +14167 +21010 +23723 +27618 +26330 +6826 +4506 +3850 +1208 +2806 +9345 +2531 +23037 +25908 +7028 +1482 +496 +5317 +23231 +13525 +29724 +27308 +29325 +20082 +22681 +14666 +9434 +12612 +4768 +11096 +12188 +9786 +11599 +29221 +10029 +241 +5816 +10002 +27900 +6477 +21809 +31819 +3701 +23122 +8919 +6343 +6189 +25160 +7012 +15235 +10578 +28688 +26676 +506 +21331 +6592 +5778 +28136 +4555 +2182 +1095 +1601 +26292 +13755 +3685 +12140 +26313 +25926 +28240 +5828 +16955 +22836 +28942 +19793 +5529 +31381 +29905 +28099 +3834 +29593 +22723 +27056 +13164 +30444 +19217 +23055 +20641 +12367 +8506 +28405 +26328 +6775 +9882 +23182 +5898 +13866 +3378 +21343 +24919 +24216 +27833 +2490 +16304 +14071 +31721 +11394 +26821 +28003 +28675 +22816 +18225 +20213 +11940 +4806 +28900 +26914 +15820 +7395 +10961 +13397 +7724 +21735 +17626 +976 +31664 +26425 +23032 +14016 +24653 +31605 +16559 +26271 +21772 +13290 +14257 +3791 +7511 +7252 +6865 +26996 +30852 +25558 +11307 +32147 +5536 +32315 +15762 +6760 +9597 +2158 +17978 +15372 +14078 +3127 +12455 +5448 +18850 +32568 +27861 +15028 +16975 +6439 +4777 +11028 +11873 +23885 +8344 +12532 +243 +29504 +8854 +22913 +13932 +10973 +19777 +31915 +2638 +18312 +22862 +4729 +11067 +28328 +11060 +20908 +6473 +21853 +4888 +21399 +6791 +2436 +12537 +14654 +29135 +29165 +18717 +3502 +17359 +25051 +5307 +24988 +22099 +23485 +23274 +23617 +5589 +24364 +24009 +15733 +3399 +24101 +26608 +3338 +15391 +13704 +1559 +29547 +30372 +17617 +14598 +30582 +15480 +277 +11196 +7574 +12647 +7999 +14819 +9253 +9326 +12684 +21108 +22785 +20751 +21573 +678 +17516 +18132 +17852 +13597 +9513 +8994 +1418 +29008 +31189 +2368 +22279 +10043 +4995 +1192 +17162 +21319 +28060 +16781 +29922 +1654 +18165 +18348 +3733 +7891 +14385 +9048 +20568 +15385 +17242 +10432 +12110 +15523 +6331 +15748 +14213 +20116 +3328 +21624 +21807 +24903 +31889 +1975 +24861 +761 +6188 +31980 +3201 +30389 +22209 +32733 +2021 +3712 +2194 +32568 +358 +5574 +18315 +22434 +22070 +22532 +16607 +6398 +4946 +4023 +5093 +12794 +8575 +18821 +16946 +11744 +14475 +1963 +27895 +28828 +30146 +12711 +23452 +7433 +12718 +7206 +1950 +4480 +28948 +13616 +10662 +9891 +3372 +8338 +1002 +7271 +28447 +20620 +26057 +24928 +31431 +26300 +9378 +8273 +1186 +26954 +1525 +16371 +28439 +6229 +22205 +16646 +19181 +28574 +11277 +9878 +5897 +8308 +2281 +21647 +31592 +4063 +25959 +4228 +7005 +9488 +21255 +4284 +23307 +29705 +14927 +17791 +13349 +4233 +28075 +18591 +30181 +5434 +3459 +8009 +3147 +11038 +31134 +14861 +10904 +7479 +19382 +24364 +29962 +17525 +5981 +27426 +1497 +22502 +27407 +4980 +26994 +27929 +20121 +6076 +28146 +13523 +15017 +3314 +25062 +16373 +17846 +12028 +7746 +22701 +531 +25721 +30623 +15324 +18767 +24778 +29369 +16072 +28880 +4195 +22568 +11523 +9135 +15184 +863 +27291 +24022 +2571 +2274 +9859 +17496 +22653 +4044 +10562 +22288 +850 +31360 +3034 +14206 +7041 +15023 +25339 +222 +11292 +27787 +10857 +28042 +32341 +5449 +31915 +17810 +2002 +8413 +25333 +21145 +28466 +31473 +18776 +21746 +21216 +24359 +25384 +13820 +15895 +15504 +2990 +29627 +30774 +18541 +28431 +440 +6726 +7205 +1916 +6939 +5833 +31366 +15004 +16902 +8134 +6208 +9014 +26676 +5905 +927 +21283 +31954 +29920 +1928 +6515 +23453 +20619 +9655 +6367 +22846 +30627 +1079 +14959 +26850 +16183 +27171 +18540 +5918 +31586 +10139 +15752 +22018 +18713 +1289 +5196 +22139 +5683 +5526 +8899 +27374 +5050 +2279 +20069 +12050 +32369 +22556 +9286 +28943 +27045 +27147 +8575 +6101 +30777 +2746 +14301 +702 +12269 +21019 +23241 +7783 +21230 +22027 +8311 +10955 +27555 +17292 +17235 +28322 +30391 +15170 +4008 +21497 +22371 +3373 +2451 +10770 +509 +12197 +22312 +2174 +2246 +3483 +15074 +3961 +30448 +2062 +10832 +390 +9711 +18124 +19710 +29259 +30977 +13419 +28578 +1711 +11008 +16775 +14216 +562 +6760 +19261 +8767 +7564 +16292 +16616 +7557 +25225 +14749 +25883 +17264 +2340 +7301 +17887 +1759 +4579 +28385 +18478 +23584 +6514 +213 +25264 +10723 +8579 +2484 +25524 +3679 +19173 +14280 +24178 +17603 +15587 +7774 +7040 +14047 +13791 +11798 +10386 +1811 +304 +9065 +25462 +7800 +20024 +6011 +7247 +2894 +9418 +7971 +11025 +15270 +29371 +9272 +5181 +24656 +28358 +25887 +6366 +1031 +19621 +18066 +19908 +8924 +32366 +25522 +5632 +19936 +32555 +2128 +7329 +10005 +25277 +376 +10669 +16791 +9971 +28736 +28258 +12807 +486 +2767 +9390 +23352 +10648 +30640 +7660 +17181 +20684 +12121 +7393 +31731 +21800 +4087 +5879 +28075 +23178 +3964 +14520 +2970 +20391 +14315 +18830 +16996 +6122 +23011 +19129 +10789 +22156 +8555 +28049 +18658 +5871 +30973 +15614 +28976 +20033 +26325 +5685 +2339 +29262 +20602 +19637 +17785 +8613 +20622 +5505 +9480 +6383 +2771 +5535 +14437 +29067 +10879 +12241 +470 +25967 +30402 +28050 +31098 +5179 +10644 +8020 +439 +1438 +29892 +4089 +22500 +25838 +24893 +26512 +19768 +12803 +29852 +6481 +21491 +25428 +18672 +30939 +11467 +13653 +720 +21164 +16537 +8976 +20899 +9185 +29252 +17410 +26156 +19760 +29934 +2872 +2900 +23843 +29278 +9131 +19772 +19863 +3502 +26072 +23171 +20596 +3637 +8867 +3028 +1966 +16055 +16238 +15796 +17533 +19660 +24437 +26762 +10712 +13454 +5741 +8944 +20024 +1159 +24669 +31289 +14475 +1497 +23228 +19779 +21622 +5295 +31436 +5502 +14799 +13540 +15670 +19005 +25435 +12019 +2791 +19005 +12484 +16671 +20266 +30579 +20446 +12515 +31494 +28954 +26907 +18588 +29146 +6141 +11084 +3445 +6967 +18690 +4762 +14739 +5630 +31224 +1732 +18051 +18619 +9378 +11419 +5088 +19265 +11268 +1723 +30280 +25990 +10220 +16779 +14978 +8128 +17092 +18039 +26856 +8129 +5528 +29293 +21787 +20368 +11875 +2966 +17896 +2377 +11423 +21078 +16757 +17463 +8204 +18823 +18864 +32559 +5567 +4593 +5369 +25647 +32623 +29965 +3854 +24888 +24828 +31483 +11832 +12905 +28737 +10177 +26804 +6493 +4891 +15302 +22116 +15814 +26553 +5006 +19126 +29514 +17191 +695 +29397 +24733 +21014 +17973 +17423 +17376 +18414 +27082 +18055 +20538 +18454 +15561 +2076 +24757 +30083 +12811 +17304 +31836 +21631 +18226 +2077 +26514 +27324 +20253 +27853 +16052 +18840 +15276 +7353 +22002 +28339 +17077 +18188 +23146 +9903 +31303 +16249 +28807 +24134 +18462 +23266 +19354 +3475 +16486 +21577 +31414 +10649 +20405 +17916 +26321 +18456 +19522 +765 +15896 +24978 +19051 +23728 +18578 +23960 +20583 +8392 +25081 +21850 +17736 +23411 +5334 +14446 +14132 +10692 +4827 +16352 +21732 +10338 +1669 +23420 +13918 +19055 +31218 +1367 +20719 +9403 +20224 +10148 +12907 +31018 +1192 +181 +24488 +3683 +17817 +12624 +29241 +8123 +31768 +24885 +20839 +29024 +26391 +9708 +8822 +21706 +27797 +6100 +19478 +10591 +9525 +16745 +10535 +9573 +23842 +21717 +18098 +29485 +1570 +21434 +18724 +28286 +22265 +5439 +21708 +3648 +5120 +22105 +5528 +18026 +15622 +16475 +16908 +28205 +7271 +4545 +13699 +30305 +29547 +21817 +32170 +31793 +16354 +21235 +30522 +1027 +22269 +10282 +22005 +26794 +20846 +12531 +13284 +19152 +1219 +12358 +975 +3229 +1536 +25162 +765 +9645 +29052 +25829 +1581 +23345 +29694 +8836 +15828 +10339 +20759 +11048 +19865 +25392 +25282 +10161 +21263 +26913 +20027 +21359 +14258 +24715 +27165 +10215 +27172 +23031 +4543 +9954 +23208 +24020 +25040 +28348 +22239 +12892 +6705 +1259 +8387 +26051 +8466 +718 +23777 +26791 +25425 +4280 +13275 +17588 +3599 +23356 +17181 +15255 +23956 +28347 +14559 +23078 +32101 +9517 +14172 +19405 +13732 +4652 +23377 +31292 +25000 +6470 +440 +17743 +27613 +6788 +10438 +24381 +19165 +24886 +2082 +6405 +15311 +16642 +15464 +11029 +13824 +3372 +8670 +17981 +21441 +22055 +14965 +30932 +11392 +6493 +15107 +13353 +23594 +20284 +7104 +32301 +13248 +897 +18430 +7006 +20280 +25545 +18733 +15606 +3222 +28757 +2319 +32597 +8267 +15133 +1847 +17580 +17102 +24856 +7624 +14315 +13177 +10699 +12652 +1006 +3238 +30992 +26771 +2787 +9482 +32553 +17902 +10750 +31313 +21253 +16939 +21857 +24827 +25297 +16625 +6214 +30070 +26306 +32031 +17775 +2685 +16930 +18498 +25551 +4272 +32409 +14676 +9082 +13172 +19902 +9916 +26314 +9998 +15582 +1922 +11219 +25595 +1803 +6098 +25097 +19346 +12649 +23733 +30768 +29149 +23989 +25355 +11909 +2228 +32534 +21963 +31019 +10267 +23848 +18303 +32472 +28638 +4422 +19194 +32704 +15979 +27160 +14173 +12481 +30960 +24926 +13129 +22225 +8373 +4092 +25446 +11941 +12731 +19525 +22548 +27812 +1686 +24204 +5745 +24843 +15752 +30697 +22667 +3169 +23263 +22344 +24807 +12317 +9360 +18616 +32050 +10134 +29461 +27379 +5190 +5420 +29572 +26409 +23392 +12213 +5872 +1809 +3744 +15402 +11013 +21810 +18626 +32659 +22495 +13167 +22043 +13616 +32554 +5074 +7895 +21737 +14464 +16282 +1137 +13816 +26367 +22663 +20084 +22997 +9258 +100 +624 +27490 +31746 +21206 +17215 +15959 +13925 +7525 +4985 +23281 +10663 +456 +5942 +25046 +21102 +28277 +12547 +21580 +11475 +6505 +5671 +3227 +2743 +26933 +13847 +29375 +25442 +30794 +4407 +14675 +22627 +7814 +23251 +11962 +27555 +11518 +606 +28304 +8907 +18446 +32745 +32592 +5081 +2975 +32743 +10310 +5886 +26040 +18976 +2999 +6586 +21320 +32754 +20815 +20283 +27442 +3535 +27852 +14834 +25497 +27636 +19690 +19063 +32110 +2663 +32398 +3999 +569 +1076 +4150 +13275 +16420 +30184 +16800 +17364 +12365 +4942 +19385 +31300 +13133 +22633 +19658 +3352 +4100 +29106 +9438 +14276 +8360 +14227 +20086 +32486 +23054 +22819 +32624 +26910 +6455 +4644 +7733 +10540 +25374 +2106 +22306 +30028 +704 +11118 +24121 +1999 +12653 +13795 +10505 +1274 +13646 +9943 +11483 +16931 +8760 +21725 +27934 +10762 +10416 +29529 +26133 +14966 +7998 +10044 +8127 +22288 +12791 +1793 +29959 +28036 +25669 +8680 +23341 +9942 +20730 +27250 +13684 +8706 +21653 +8222 +269 +29655 +3539 +5218 +25923 +26645 +24697 +26348 +29673 +16326 +26209 +5401 +9729 +26842 +31428 +30903 +24750 +27398 +19398 +4599 +3676 +1502 +7751 +14518 +6189 +15409 +12265 +4333 +19367 +18597 +25437 +24182 +30877 +14228 +8947 +5121 +21339 +8742 +9570 +14678 +26389 +18095 +212 +1229 +9362 +31307 +14389 +17419 +22804 +12215 +11965 +28671 +6540 +3955 +11708 +2076 +28156 +23830 +26790 +4312 +18732 +9713 +11102 +20836 +6288 +29928 +7879 +11438 +30841 +1932 +20361 +12693 +22652 +16509 +25377 +15980 +7200 +21248 +10028 +21425 +971 +25564 +26356 +29198 +27119 +7034 +13115 +8081 +8304 +25916 +2120 +28712 +31321 +22557 +32304 +11617 +19904 +1163 +28519 +31071 +31223 +9089 +16774 +2335 +15860 +25321 +15455 +20973 +27395 +19249 +6975 +17953 +16298 +31276 +17538 +32031 +30429 +12075 +21341 +25230 +22371 +25691 +24552 +18648 +20360 +29026 +12650 +31458 +26884 +29493 +18154 +10509 +8491 +30013 +25075 +19821 +29015 +6058 +32678 +25417 +5011 +12054 +27654 +3539 +20361 +6495 +23424 +2601 +23470 +17342 +14010 +2187 +7852 +7724 +1181 +18655 +23823 +30710 +7845 +5730 +7988 +415 +7016 +32432 +23407 +28662 +7013 +24567 +12412 +31864 +25616 +10872 +15400 +16104 +29978 +28991 +23104 +7213 +1029 +9763 +22458 +18028 +2537 +7424 +26147 +2662 +20352 +12852 +23368 +26131 +9081 +12376 +2344 +9344 +9978 +20800 +14874 +31462 +23671 +30261 +7483 +25356 +25778 +29553 +12059 +11999 +5651 +2780 +27303 +4431 +23082 +29190 +20057 +6252 +32130 +32613 +415 +21697 +23977 +23248 +9866 +10737 +8572 +19771 +9144 +1168 +26552 +2997 +29316 +28996 +6078 +6559 +15724 +20765 +16551 +7726 +23234 +10033 +12936 +18724 +28566 +15228 +15879 +8906 +18148 +3830 +17950 +25394 +10490 +23798 +4143 +11435 +16173 +9671 +32329 +17796 +20413 +32392 +8121 +11526 +24069 +8777 +17365 +10156 +31463 +99 +31492 +7845 +20854 +17432 +12818 +28301 +15334 +4460 +21427 +359 +27825 +29507 +7253 +20446 +30731 +14012 +3115 +9661 +18825 +12237 +9078 +17835 +21005 +8991 +21782 +18476 +31221 +20780 +23378 +20949 +9092 +24215 +23268 +31951 +18832 +5579 +72 +4496 +1645 +15832 +838 +27349 +3866 +650 +15550 +8418 +28330 +10699 +15028 +22525 +3574 +4667 +32412 +20008 +21377 +14093 +20966 +1055 +26540 +13605 +23757 +7570 +26907 +3440 +27485 +21668 +7526 +8323 +3267 +7332 +27140 +8055 +30938 +20491 +8565 +28163 +26610 +1462 +28848 +12764 +18659 +26980 +30924 +2890 +338 +13171 +24818 +13067 +9282 +7127 +27778 +31084 +19167 +25691 +24964 +25254 +31624 +22044 +19282 +23671 +19227 +20035 +25988 +18689 +9348 +13826 +15132 +23271 +25224 +466 +17907 +32421 +10191 +5099 +6755 +19761 +8497 +7683 +27446 +17360 +7746 +24140 +29135 +15674 +11296 +21416 +1687 +26609 +7804 +17711 +30123 +13791 +13031 +14563 +23491 +303 +14943 +13746 +5990 +25197 +29977 +27821 +6732 +29665 +3217 +9608 +10003 +32296 +22480 +2642 +18215 +18964 +22013 +11893 +1259 +5062 +2855 +27888 +13868 +23306 +11089 +31188 +25288 +3315 +16319 +17149 +5019 +17079 +12928 +31763 +5546 +4557 +27709 +29121 +32147 +10565 +28736 +51 +30516 +14439 +8904 +18646 +11675 +23184 +9612 +843 +22318 +1097 +30349 +1453 +12828 +11688 +15649 +24580 +32003 +13804 +28988 +9993 +14306 +15444 +18690 +18973 +14658 +27200 +6283 +4228 +25505 +27275 +4085 +6630 +1823 +2599 +944 +32264 +15212 +15867 +11014 +26566 +15857 +2553 +233 +18261 +8253 +1412 +13057 +30647 +21171 +30977 +19190 +29567 +22386 +20667 +32251 +29895 +10629 +24829 +20123 +7279 +9292 +14186 +27848 +31895 +30506 +30111 +33 +8799 +29040 +28941 +18564 +31454 +12938 +5136 +16596 +12129 +2665 +15444 +12300 +21733 +5680 +4714 +21636 +2775 +25890 +5798 +5507 +25866 +12747 +24380 +26374 +15610 +31598 +17306 +19408 +17984 +2991 +28936 +8627 +597 +13441 +9342 +9245 +28555 +21074 +1478 +20709 +3912 +24182 +24531 +7000 +8070 +7634 +12896 +6527 +9096 +14282 +22732 +6067 +6110 +16748 +16949 +15972 +28060 +2269 +30420 +13862 +10455 +11524 +26265 +30205 +15968 +19830 +15623 +10218 +3268 +24226 +13905 +20405 +3204 +28222 +12726 +8189 +5009 +25585 +32026 +10623 +18444 +2625 +5606 +20643 +7739 +27584 +23329 +13644 +32207 +20595 +27855 +30945 +27221 +26499 +13450 +3735 +19193 +26919 +21343 +514 +11651 +15569 +28907 +24540 +8331 +28567 +10167 +11540 +256 +1765 +2768 +6171 +22233 +31585 +170 +20586 +7449 +26655 +28471 +12375 +4361 +14854 +30019 +9498 +25777 +27522 +11539 +283 +28824 +6252 +13375 +9342 +16574 +30262 +29900 +10225 +6358 +31835 +27533 +30133 +19401 +18694 +26555 +31979 +615 +3585 +32723 +27425 +19824 +4577 +14256 +6173 +7875 +4464 +5097 +4072 +1509 +3419 +5741 +26399 +19381 +20509 +24669 +17782 +18798 +14379 +29994 +21133 +5853 +4705 +23280 +28919 +27620 +4268 +5138 +29576 +20784 +10489 +11798 +14559 +31799 +26718 +25026 +22837 +29301 +1672 +120 +21092 +20455 +17765 +10959 +24123 +19656 +26898 +3187 +24321 +24202 +21511 +6463 +3655 +4120 +4993 +1945 +23027 +27979 +26672 +1037 +7050 +7595 +5921 +23085 +5565 +2663 +3823 +3751 +25655 +11159 +11558 +9896 +18854 +22704 +12280 +6258 +2056 +14408 +8227 +8505 +12088 +11020 +16162 +31810 +3512 +19967 +17811 +14143 +12224 +28661 +32232 +8164 +6280 +5711 +1874 +1743 +8659 +27896 +19690 +21399 +11708 +15776 +32034 +9778 +5829 +19000 +3435 +396 +2589 +9902 +5672 +15205 +14386 +28138 +4819 +11628 +1911 +28169 +21102 +25498 +13687 +10201 +9261 +17360 +4635 +15765 +3170 +27316 +16696 +11490 +3496 +14793 +11868 +28681 +21076 +21197 +7898 +25207 +16920 +31831 +3603 +1138 +20473 +11185 +16392 +31262 +3188 +12276 +13853 +25007 +18413 +14946 +29232 +23792 +20824 +16392 +13274 +27125 +7466 +28821 +7172 +26396 +24706 +15989 +25262 +24139 +27796 +13361 +2812 +29540 +22102 +4875 +16770 +4620 +13935 +30421 +20689 +13982 +3420 +31506 +22594 +28266 +6117 +7504 +12546 +27442 +8127 +22725 +11614 +17895 +5251 +14121 +7760 +19616 +30927 +21203 +19275 +30683 +28602 +1559 +18500 +25337 +30333 +17374 +22017 +25588 +5728 +21895 +14502 +7778 +6883 +31230 +12413 +11695 +6191 +8731 +261 +17047 +19900 +17982 +12862 +20450 +12611 +4392 +30772 +8804 +11750 +23579 +27850 +52 +25502 +14389 +1993 +11052 +29414 +266 +297 +25249 +8358 +13441 +2462 +16484 +24162 +3057 +1382 +3321 +675 +4732 +13650 +26390 +15782 +13483 +31251 +23136 +5699 +1354 +7623 +16737 +31521 +13190 +20420 +3789 +13336 +28230 +16036 +23030 +16359 +12487 +31889 +19084 +27159 +13434 +6610 +16282 +9519 +1058 +8599 +19902 +29977 +27690 +25857 +28841 +30164 +17476 +16501 +3031 +19036 +20040 +18210 +5775 +32727 +9804 +209 +3869 +12545 +32767 +9709 +4431 +30169 +11595 +1490 +11310 +27533 +10795 +858 +21246 +24739 +10698 +21413 +1400 +29034 +24797 +27433 +2886 +8352 +2370 +17659 +24256 +14437 +23258 +28765 +8934 +32607 +30115 +4232 +16541 +3631 +31002 +15035 +1838 +20756 +17616 +24195 +27644 +478 +7755 +9293 +17798 +9750 +14367 +28203 +7581 +23916 +22093 +26339 +30438 +3169 +3036 +19262 +8595 +12085 +19894 +22927 +31581 +24851 +22213 +4993 +14021 +25467 +6478 +15910 +1421 +12785 +14733 +19517 +17009 +28132 +19858 +7876 +30251 +12001 +24155 +18367 +21414 +760 +26163 +15175 +1921 +11119 +18506 +6869 +30407 +24998 +32150 +1744 +18669 +12362 +29417 +8790 +22797 +11454 +21587 +13639 +27234 +7366 +16827 +6296 +15364 +21622 diff --git a/M/TC/BIN/AAA.TXT b/M/TC/BIN/AAA.TXT new file mode 100644 index 0000000..ee5431c --- /dev/null +++ b/M/TC/BIN/AAA.TXT @@ -0,0 +1,29000 @@ +346 +130 +10982 +1090 +11656 +7117 +17595 +6415 +22948 +31126 +9004 +14558 +3571 +22879 +18492 +1360 +5412 +26721 +22463 +25047 +27119 +31441 +7190 +13985 +31214 +27509 +30252 +26571 +14779 +19816 +21681 +19651 +17995 +23593 +3734 +13310 +3979 +21995 +15561 +16092 +18489 +11288 +28466 +8664 +5892 +13863 +22766 +5364 +17639 +21151 +20427 +100 +25795 +8812 +15108 +12666 +12347 +19042 +19774 +9169 +5589 +26383 +9666 +10941 +13390 +7878 +13565 +1779 +16190 +32233 +53 +13429 +2285 +2422 +8333 +31937 +11636 +13268 +6460 +6458 +6936 +8160 +24842 +29142 +29667 +24115 +15116 +17418 +1156 +4279 +15008 +15859 +19561 +8297 +3755 +22981 +21275 +29040 +28690 +1401 +18137 +16735 +20343 +25267 +8312 +7111 +7733 +10993 +18554 +4353 +20126 +1018 +31086 +6970 +26484 +20614 +23431 +23999 +18086 +18730 +5504 +10891 +28492 +27015 +20143 +31246 +32484 +32180 +24168 +16704 +9679 +23528 +9365 +20966 +16135 +5740 +18323 +12580 +25378 +12736 +21327 +4164 +4748 +11020 +30113 +21445 +21249 +23243 +21480 +21672 +23625 +32691 +13799 +18422 +12344 +32231 +480 +30870 +14821 +7776 +17903 +16205 +20522 +23192 +19113 +25878 +14172 +121 +27381 +23461 +32332 +14982 +11562 +30774 +21118 +18505 +22889 +7323 +10152 +29436 +2365 +31365 +20079 +2683 +27762 +23826 +22109 +30313 +16179 +9367 +22310 +10146 +11623 +24752 +32028 +30177 +8013 +13446 +29935 +13747 +11094 +29025 +4778 +4763 +10563 +4974 +20459 +31111 +8831 +3281 +32099 +8051 +7103 +2798 +17294 +28764 +29656 +8693 +20147 +29287 +21472 +2732 +16926 +26962 +27785 +24193 +20125 +17948 +31930 +32207 +2104 +12016 +23918 +3184 +22326 +11096 +3794 +12421 +8269 +16543 +666 +32642 +40 +2695 +8100 +17788 +13855 +7212 +15057 +4791 +6706 +13624 +288 +15211 +14918 +5961 +3851 +13783 +31396 +1951 +12582 +649 +21935 +18698 +2550 +2795 +5862 +6675 +6416 +8722 +11546 +874 +24435 +5059 +28656 +656 +7463 +28103 +29849 +23749 +25622 +28529 +19921 +9780 +31785 +19309 +21270 +18781 +21671 +10186 +19243 +6851 +32460 +2123 +5580 +17624 +28070 +3818 +12467 +6181 +30516 +16046 +13259 +3006 +21185 +11439 +8371 +31205 +4221 +19302 +8566 +25854 +18013 +15418 +4745 +20659 +28214 +21321 +29702 +31592 +12565 +14708 +7720 +993 +7137 +22701 +21767 +18226 +31028 +32389 +6036 +743 +19574 +24816 +17879 +1909 +10812 +29020 +31336 +1760 +27104 +10738 +13101 +19374 +27744 +16683 +9554 +25613 +29820 +28567 +22670 +3392 +19468 +13290 +26004 +27471 +12959 +16712 +29655 +22767 +20826 +978 +21123 +23471 +12303 +26481 +18616 +2149 +26524 +19682 +30985 +25560 +3463 +22787 +29749 +2991 +5335 +2652 +22308 +13210 +8245 +16625 +4133 +17087 +324 +9287 +10087 +7527 +24893 +5044 +9909 +26345 +20175 +3308 +31862 +18391 +11574 +13513 +30180 +1128 +16538 +28250 +11404 +28454 +21418 +11312 +775 +984 +12921 +26596 +3319 +14002 +30360 +27629 +32324 +17339 +24693 +23456 +32152 +2688 +14836 +9608 +30233 +16887 +32331 +19433 +17510 +4278 +17187 +12175 +23252 +21845 +7917 +18652 +14570 +11040 +2177 +31505 +21019 +30465 +27646 +28124 +16322 +2221 +28894 +6435 +23139 +7182 +11608 +28432 +5665 +18161 +17146 +20573 +15995 +7921 +8327 +14049 +27979 +9123 +25871 +16988 +22784 +14595 +8269 +4991 +22043 +15903 +27717 +8511 +10216 +3074 +7198 +29787 +31871 +26851 +31805 +29996 +12282 +15247 +24484 +14253 +13048 +2836 +30345 +29130 +12370 +5807 +10810 +2029 +19997 +4600 +31281 +23495 +9696 +20812 +5747 +18780 +20503 +29307 +13102 +32338 +7912 +19891 +20882 +6010 +25636 +15021 +31215 +12448 +24193 +30230 +8977 +21135 +10774 +13120 +17113 +27496 +20504 +9737 +17437 +15653 +20947 +4364 +24001 +28265 +19180 +9223 +1814 +10634 +1749 +13965 +1394 +30177 +9617 +10988 +20241 +14161 +11178 +1377 +16172 +22 +6512 +891 +22360 +8399 +25971 +16333 +2593 +8911 +30275 +11736 +19174 +6304 +30567 +31287 +24311 +28889 +9627 +6924 +11246 +14114 +28239 +7339 +32587 +28549 +32348 +30342 +2899 +30711 +7177 +29784 +5418 +7206 +26686 +32662 +4143 +18309 +25351 +21779 +8857 +406 +20300 +29426 +20303 +8311 +20943 +19153 +16652 +23984 +26470 +1075 +29363 +14652 +3707 +23342 +12528 +22229 +16321 +26455 +12561 +16772 +4664 +22251 +14627 +16745 +9828 +27199 +5457 +12232 +13513 +15210 +22137 +30038 +23467 +7728 +5647 +7874 +2052 +9266 +15159 +13190 +5573 +4436 +32030 +15087 +850 +19567 +7834 +7018 +21560 +6200 +7938 +16402 +32561 +8304 +23631 +12407 +858 +10062 +25203 +1713 +179 +24362 +25593 +28582 +28631 +15467 +6111 +8600 +21758 +19378 +30897 +29938 +2608 +22599 +8422 +2899 +31947 +28357 +16511 +12507 +31288 +2050 +26590 +25526 +26602 +26689 +9188 +11752 +664 +32411 +10063 +15704 +187 +20651 +32082 +26142 +13386 +15993 +374 +31505 +1972 +10921 +6321 +10380 +29215 +21221 +26564 +15745 +16096 +25735 +730 +3778 +17467 +6539 +21086 +24715 +25948 +27061 +10524 +595 +31637 +7166 +18332 +2259 +730 +17477 +18620 +21080 +9594 +31027 +13196 +16710 +800 +20079 +11887 +22765 +20233 +24324 +3951 +10385 +8583 +29711 +17888 +12468 +6327 +5037 +22841 +11942 +9343 +1060 +31023 +31312 +6603 +3920 +23315 +25149 +26888 +4688 +24685 +12778 +5088 +9586 +17114 +20047 +15928 +26717 +16675 +5293 +30312 +15997 +2463 +26522 +4282 +1972 +24011 +5707 +12837 +8510 +11047 +2594 +26186 +15077 +5459 +26232 +23728 +19559 +11626 +1708 +10556 +14117 +21151 +1644 +9204 +24589 +30743 +16451 +17397 +19913 +19462 +28260 +4530 +5929 +31756 +22965 +3183 +11726 +4818 +17183 +7933 +20760 +10976 +29461 +32695 +13650 +29378 +7011 +6077 +11037 +15964 +30521 +19824 +21274 +8585 +21879 +20014 +10715 +20475 +31035 +13135 +30732 +15951 +31912 +7776 +29406 +16495 +8697 +10398 +6325 +8493 +16071 +16822 +5650 +28445 +11671 +22972 +16066 +31411 +29096 +29290 +26440 +16798 +30971 +29594 +10888 +17252 +10403 +24325 +26550 +31550 +8014 +16190 +1151 +31542 +23060 +28137 +16246 +25727 +10111 +3393 +7872 +14613 +5340 +20682 +18180 +17045 +16833 +29010 +18061 +2655 +17888 +26670 +8386 +7914 +5386 +19891 +9672 +8807 +3463 +30451 +25205 +24217 +7317 +11961 +13432 +23028 +9534 +9671 +20167 +10741 +5471 +30287 +14922 +32449 +21749 +22191 +7877 +9217 +31659 +22385 +24587 +29436 +30882 +18563 +23393 +29175 +6272 +8627 +20784 +7370 +5563 +2670 +18160 +4803 +7975 +23737 +27985 +9664 +190 +16240 +22187 +1671 +23216 +13247 +2472 +2665 +4779 +12766 +15407 +17944 +27500 +12561 +17044 +31173 +28295 +14047 +32511 +2685 +5235 +18834 +23834 +1221 +22233 +25071 +9727 +25717 +6429 +14391 +14432 +7634 +4910 +2142 +28920 +9199 +10891 +10634 +20275 +26694 +26006 +5327 +8729 +3986 +25885 +14121 +18816 +22511 +4134 +10939 +22387 +27701 +24059 +13127 +7645 +8337 +27254 +6638 +29818 +21605 +16527 +17448 +17151 +30051 +1827 +8711 +7048 +24549 +31751 +20392 +28995 +6287 +26957 +1530 +14171 +6951 +213 +14003 +29736 +15028 +18968 +28559 +5268 +20182 +3633 +24779 +3024 +10853 +28205 +8930 +2873 +5966 +3988 +6023 +24197 +21418 +2872 +483 +14386 +19487 +2621 +12816 +31280 +3964 +15721 +24534 +18125 +14224 +6829 +4261 +26082 +17227 +3317 +9427 +19004 +7704 +557 +26646 +17229 +20602 +916 +16709 +10004 +5605 +17477 +23883 +74 +21471 +20994 +29036 +3278 +11863 +21572 +28860 +6227 +13637 +1409 +20700 +32584 +26500 +21181 +14840 +26119 +1772 +19796 +15870 +28738 +31156 +23302 +29472 +1195 +13574 +20547 +3469 +26851 +27876 +24761 +21611 +16806 +1338 +4636 +3608 +17204 +68 +7477 +16290 +7682 +26147 +26926 +23429 +29602 +25019 +3356 +15268 +24560 +3792 +973 +649 +25214 +13665 +32212 +16353 +13378 +28227 +32211 +29747 +21886 +27906 +11017 +20448 +24561 +27380 +1564 +18785 +26940 +28575 +27687 +26299 +406 +29261 +5127 +22086 +6836 +4334 +29154 +12960 +25331 +22574 +11514 +3565 +24776 +22743 +5041 +8273 +23146 +1641 +14812 +13743 +21950 +6903 +11596 +13986 +15491 +31812 +27802 +26813 +28862 +24095 +3123 +16895 +23912 +7676 +13733 +27546 +20310 +5076 +27945 +20454 +8810 +21566 +18800 +20383 +3832 +8142 +2482 +31335 +9083 +31662 +13813 +26232 +13945 +12155 +13723 +937 +23732 +9315 +2095 +1444 +12178 +24956 +3185 +16742 +28623 +8551 +415 +6648 +20577 +15653 +12038 +22636 +30123 +26681 +24010 +2842 +29927 +31231 +4338 +18460 +24525 +16460 +10167 +28424 +10377 +5959 +22029 +17901 +27100 +17032 +8051 +3472 +24464 +17263 +16376 +26856 +6946 +10438 +12174 +13271 +16555 +5018 +11156 +9515 +22544 +27990 +29342 +22485 +32363 +2849 +7815 +5992 +953 +14970 +18617 +3029 +16580 +29459 +25788 +8293 +12627 +10731 +31997 +16888 +7825 +430 +15841 +20604 +26043 +21585 +31498 +24496 +9998 +20970 +6888 +8987 +26864 +12493 +5252 +8519 +31581 +10989 +27529 +2627 +10133 +17521 +22164 +19800 +30724 +6037 +31677 +18954 +9329 +8644 +28518 +14419 +28267 +19956 +24899 +9243 +31217 +14401 +9130 +6139 +28257 +26317 +31005 +21299 +27555 +29655 +21525 +9961 +8085 +25882 +29969 +22180 +1978 +11368 +4831 +6153 +11039 +3463 +31018 +3540 +22671 +25932 +18757 +23066 +13559 +3574 +18743 +9149 +9756 +23757 +27911 +11056 +25979 +29947 +1609 +19053 +18304 +27562 +17897 +31795 +748 +31072 +31799 +18053 +1152 +13463 +17203 +9312 +6895 +4512 +32539 +19131 +1795 +9146 +24883 +25797 +15374 +23406 +22740 +9050 +23700 +15917 +7864 +15303 +16182 +21293 +18052 +12735 +2017 +16769 +663 +2205 +8504 +23415 +1554 +14300 +8768 +4919 +12584 +32468 +27723 +5273 +29607 +29623 +3366 +70 +4551 +27084 +12678 +1043 +14131 +2794 +13233 +19610 +1110 +16439 +4713 +3098 +487 +17954 +23581 +4753 +9912 +1951 +23123 +13080 +23483 +7330 +2384 +29310 +10837 +2015 +10251 +15145 +231 +4032 +27729 +4649 +14746 +20134 +10041 +2461 +20332 +22116 +26059 +27723 +28024 +761 +23020 +24187 +17546 +22670 +6028 +28692 +21219 +2224 +29204 +23546 +2633 +31439 +1546 +28839 +83 +29687 +15111 +24072 +5363 +14797 +18907 +25754 +15172 +19660 +4862 +8645 +20630 +5569 +20794 +30072 +11703 +8837 +29846 +15622 +24196 +19963 +12679 +24385 +11185 +28490 +4178 +26069 +25301 +27739 +2245 +8167 +2233 +19349 +30230 +2542 +25058 +8407 +28443 +30417 +32092 +29111 +20140 +13890 +11721 +27898 +30806 +13402 +7339 +4435 +9537 +20086 +25582 +8032 +17764 +22865 +22969 +29411 +16615 +5218 +31350 +7997 +9688 +1656 +7456 +27440 +3602 +32660 +24012 +2006 +18795 +15367 +27259 +7901 +6173 +25804 +7711 +5124 +375 +26920 +5611 +5595 +4804 +28032 +11487 +22967 +4732 +19322 +2452 +7923 +29610 +24408 +10821 +21870 +5533 +7825 +6943 +834 +7123 +13233 +17098 +17858 +27170 +7027 +28984 +2486 +4392 +32540 +7341 +22234 +14069 +18458 +30991 +19092 +18424 +10462 +21872 +7670 +31783 +5878 +27610 +21236 +31859 +29295 +3930 +25831 +13419 +22122 +25679 +6209 +7215 +20221 +3828 +17810 +1688 +28749 +1068 +15292 +16293 +2793 +26766 +5491 +1833 +31081 +10673 +7672 +13235 +17223 +15801 +8470 +2494 +4349 +13602 +16989 +4890 +11616 +2764 +14237 +666 +4156 +24136 +679 +28671 +11825 +1121 +1600 +30756 +2509 +6638 +4709 +3436 +16875 +1240 +17350 +1129 +6475 +3942 +21117 +10446 +13171 +2513 +11279 +26263 +709 +7684 +29861 +21367 +9186 +16820 +19339 +9346 +8766 +29345 +28394 +23579 +25092 +10538 +6850 +15392 +11052 +11543 +16171 +18517 +4571 +14499 +27084 +25871 +14331 +5577 +32412 +24097 +9243 +8656 +7128 +25099 +10632 +25370 +17733 +15714 +7597 +7465 +12968 +25211 +22184 +3826 +23938 +2395 +12078 +18279 +10769 +29667 +2977 +15423 +18308 +8760 +7280 +3848 +9085 +881 +22958 +11376 +3277 +28293 +29686 +12752 +24939 +28531 +13950 +17657 +25525 +13491 +5753 +19012 +4843 +10461 +27571 +9428 +8937 +1176 +3688 +27950 +28453 +25797 +22117 +18941 +1256 +12525 +14178 +22303 +8401 +24041 +30366 +18163 +15239 +22736 +13756 +10726 +446 +9766 +20189 +2108 +21357 +322 +15871 +14876 +9805 +2048 +5014 +10719 +26518 +16040 +11369 +27802 +14581 +30751 +10927 +23785 +9425 +28236 +27753 +9215 +9663 +5837 +31490 +23787 +7491 +32732 +12325 +15917 +5578 +16763 +3039 +30073 +27620 +20199 +30710 +8650 +15046 +13372 +29833 +6058 +10240 +3173 +27113 +23489 +27259 +15175 +7095 +32669 +10422 +14382 +31038 +19648 +2625 +29815 +18194 +27120 +6266 +10879 +24042 +26298 +19079 +8396 +31420 +22856 +22676 +11643 +23575 +31333 +12878 +1513 +10437 +27598 +13472 +9893 +23457 +5308 +31405 +24470 +12469 +16558 +26126 +20585 +20376 +27772 +14925 +24894 +12039 +28057 +26530 +915 +28099 +24488 +24812 +18288 +7338 +1090 +6387 +4308 +13849 +262 +733 +31072 +16001 +10211 +12782 +10818 +19015 +13730 +29828 +14948 +25826 +12983 +1618 +23766 +5424 +25160 +13788 +27514 +31512 +27519 +6451 +6638 +16998 +10509 +11763 +23743 +26339 +19199 +122 +20683 +1460 +14021 +13930 +12023 +14325 +20864 +6241 +6163 +12950 +8332 +30456 +17674 +10101 +27726 +1786 +26446 +9148 +20799 +4326 +17795 +26494 +27449 +4007 +24682 +29325 +1793 +6802 +11281 +17054 +1558 +13985 +10553 +32416 +24761 +27374 +27399 +2905 +29245 +13427 +21743 +17731 +31633 +13568 +7390 +23462 +2059 +14718 +23975 +2294 +8311 +29538 +17841 +9327 +30816 +372 +11742 +18671 +413 +9154 +9406 +3348 +4640 +14047 +14836 +2198 +2043 +21089 +5609 +8934 +6067 +9882 +10672 +26376 +12490 +30102 +826 +22702 +9351 +17237 +4539 +1686 +31496 +6474 +26204 +22053 +8843 +30996 +15650 +17477 +25849 +23163 +23070 +6011 +20404 +20654 +1750 +16205 +31138 +12987 +15347 +23763 +21370 +25423 +17197 +12444 +28238 +5040 +23924 +27076 +25690 +7672 +14689 +4691 +20491 +21140 +17884 +5336 +32083 +21757 +11534 +5957 +16684 +25525 +905 +9998 +9067 +10116 +30646 +29309 +18119 +26100 +3455 +2905 +15145 +13066 +12862 +28343 +9782 +32327 +13542 +20000 +28187 +5856 +28272 +21989 +21144 +825 +9865 +27838 +8272 +18344 +122 +10409 +27215 +30823 +31831 +29954 +30172 +13018 +22635 +9695 +17537 +23043 +24292 +29871 +26713 +12867 +27579 +8722 +3738 +14419 +14055 +14587 +27746 +20355 +11970 +12036 +31174 +9009 +28347 +24081 +10009 +22412 +7742 +4905 +30841 +25995 +17376 +11921 +13216 +15912 +22735 +4394 +3049 +4322 +10362 +21261 +30881 +20850 +18556 +32612 +8593 +22732 +13518 +20876 +3529 +15705 +23598 +12136 +174 +15988 +10442 +23816 +12614 +24355 +20786 +9596 +18371 +3095 +32124 +29938 +19791 +26854 +3257 +8214 +31255 +8327 +1688 +21675 +3482 +21774 +1369 +28518 +7476 +2730 +9205 +13067 +1253 +10716 +15500 +7370 +26215 +29945 +783 +20956 +25201 +3299 +18478 +25178 +30789 +24836 +28804 +23901 +14208 +9867 +27649 +29276 +12322 +13035 +14744 +7106 +19676 +21904 +17195 +3790 +922 +3300 +7603 +27824 +2129 +12930 +31156 +28898 +28170 +31418 +20448 +6340 +25135 +25413 +5642 +123 +28182 +27978 +2126 +28939 +27340 +16017 +21119 +23475 +4899 +1541 +9681 +16009 +24574 +16240 +1736 +11862 +6876 +12915 +24416 +436 +21155 +18629 +8574 +22886 +7855 +6061 +1431 +504 +23579 +14529 +12702 +27288 +20814 +19936 +21556 +11571 +25546 +19566 +11 +25555 +19505 +27599 +21403 +18232 +29849 +21286 +14601 +21174 +27921 +25167 +19028 +26958 +8819 +12827 +9666 +14352 +17261 +10187 +16010 +20912 +32715 +14287 +30147 +16231 +3591 +13247 +1932 +781 +8979 +16283 +6269 +18037 +18533 +19007 +28494 +13320 +15428 +9514 +9926 +13476 +18514 +6000 +25575 +3767 +14938 +2045 +23640 +8855 +27484 +6924 +14611 +16421 +215 +24294 +8527 +20899 +21590 +25568 +31152 +22482 +11582 +23439 +9133 +29519 +14550 +6990 +18754 +30512 +27799 +7667 +216 +16602 +16054 +24782 +21873 +20774 +24816 +14306 +32536 +25268 +27029 +30055 +22408 +31118 +5848 +128 +22300 +10241 +6230 +14137 +9719 +1209 +2788 +14276 +3444 +3612 +4765 +27892 +21968 +30440 +16172 +31227 +23573 +6159 +9814 +24928 +27723 +979 +24780 +836 +11227 +30238 +21808 +20181 +8259 +7716 +32102 +17171 +7680 +32059 +4636 +6851 +11192 +22266 +18588 +16304 +9640 +28305 +3794 +24873 +11598 +3433 +29081 +18872 +12631 +3836 +6474 +20511 +6603 +28150 +2183 +32665 +25719 +3725 +2372 +21327 +15771 +16925 +29720 +8472 +24789 +16392 +15811 +3957 +20045 +4046 +30463 +13004 +8226 +8296 +10892 +11749 +3093 +2281 +17782 +29091 +23925 +11864 +30121 +30723 +29514 +19144 +10936 +5722 +3781 +4537 +9450 +17099 +32232 +28083 +16006 +26887 +28273 +4897 +23393 +10825 +29965 +25707 +10917 +9360 +5307 +25432 +9955 +7455 +21117 +11171 +92 +10803 +8518 +13019 +23948 +14340 +12833 +18816 +7672 +1279 +29854 +6491 +2874 +28994 +21378 +7454 +9290 +15703 +31150 +19773 +28430 +5173 +11088 +32268 +31781 +31860 +32585 +11033 +2288 +3280 +1247 +11212 +27619 +32738 +8612 +3389 +14090 +794 +13222 +3414 +15583 +23808 +17368 +29482 +25419 +18091 +21697 +16532 +28922 +5250 +6499 +30996 +16611 +2610 +8302 +31206 +2072 +30192 +16294 +8036 +6603 +28401 +19345 +13214 +21922 +21286 +26470 +25143 +11324 +24636 +31027 +11651 +26116 +980 +3661 +8414 +6197 +16128 +15357 +15439 +29742 +14590 +18536 +21854 +23800 +23864 +10175 +26931 +28437 +8315 +6568 +7152 +26251 +18807 +29421 +24912 +3889 +22648 +24420 +2688 +11066 +27236 +10270 +13630 +31743 +13045 +18899 +22576 +22801 +27191 +26510 +26759 +383 +18756 +26005 +21716 +4964 +29247 +14491 +20778 +21941 +24463 +13609 +12405 +16457 +13917 +27466 +18203 +28202 +6224 +23158 +4817 +26139 +20616 +2497 +9151 +25961 +30681 +20548 +727 +6391 +27721 +22988 +4466 +28804 +14284 +13250 +7725 +30784 +16958 +28250 +11012 +25743 +27298 +7680 +8364 +15389 +25498 +18687 +27445 +19490 +28454 +3444 +15329 +21239 +21921 +2930 +27711 +3290 +13305 +24439 +16011 +3838 +32046 +14607 +30538 +7383 +19214 +22983 +3106 +25507 +23087 +2132 +25591 +18492 +19757 +17413 +25676 +13086 +4901 +17510 +18392 +1716 +3442 +4406 +31336 +11239 +20647 +16011 +30197 +24809 +7372 +6468 +23813 +13887 +26846 +20399 +20039 +26125 +7553 +25212 +11625 +29094 +23304 +27106 +23869 +12628 +26279 +31503 +9997 +16996 +6903 +14806 +19260 +32630 +30635 +25236 +30494 +28419 +11409 +22627 +7193 +21551 +15308 +899 +25596 +19921 +3920 +3077 +16031 +12224 +7582 +15545 +17596 +609 +31170 +6746 +27662 +21614 +27274 +31480 +18600 +19208 +25864 +10663 +22423 +7168 +1610 +25190 +3772 +24162 +26712 +12882 +11747 +23875 +28271 +2060 +3368 +22733 +25725 +103 +25740 +24968 +3549 +15190 +18643 +14827 +32596 +17686 +22944 +27171 +24652 +24471 +23764 +29218 +28496 +14385 +17187 +17899 +26055 +21892 +20985 +29 +5877 +18864 +28300 +30398 +26159 +29879 +17986 +7754 +28765 +25391 +20549 +26364 +1206 +5420 +25700 +92 +18616 +14700 +25389 +12042 +9062 +10436 +11081 +8393 +19398 +11724 +22552 +27343 +5786 +25799 +1421 +7755 +24414 +16341 +5451 +7992 +10370 +31580 +12545 +10593 +20200 +3763 +1539 +12213 +27809 +25873 +30249 +461 +18148 +27318 +14829 +25532 +25424 +14936 +12224 +1046 +8291 +30416 +21676 +31811 +27963 +7429 +8753 +18181 +31883 +23065 +19801 +22856 +3809 +12755 +8989 +18730 +12310 +333 +32252 +12107 +1046 +10718 +4314 +11862 +32466 +28746 +790 +19664 +9090 +23593 +6640 +3360 +10016 +9109 +27417 +28640 +4641 +28440 +21660 +19555 +15734 +468 +13805 +11143 +18115 +4596 +9806 +4284 +22495 +23891 +9323 +23893 +23948 +18028 +31533 +14862 +2424 +1410 +22498 +13023 +15219 +14864 +19857 +28928 +11763 +26739 +16791 +16189 +453 +12246 +32134 +17532 +1301 +17502 +25151 +8332 +20898 +31127 +30797 +22320 +7738 +26911 +22917 +13675 +24444 +401 +12252 +7438 +5071 +2485 +17801 +25216 +22173 +25573 +25179 +10446 +5844 +7618 +29276 +26611 +3231 +6169 +12711 +2409 +19042 +21264 +22919 +18160 +1268 +10901 +2769 +14237 +28448 +3848 +29060 +14119 +17502 +1575 +23966 +4974 +24270 +58 +19777 +11340 +29814 +19841 +9223 +29089 +22461 +16347 +2978 +27545 +22311 +17591 +14776 +14657 +6227 +832 +5886 +12618 +2610 +19140 +915 +4380 +19081 +23910 +13471 +26142 +6826 +25349 +26412 +7493 +16239 +4203 +25668 +25819 +26743 +20154 +4684 +19601 +31396 +28436 +4000 +20424 +22997 +13962 +4720 +13852 +3553 +20039 +2523 +30259 +24276 +25598 +15434 +1732 +17517 +1681 +24334 +18923 +17624 +2818 +25405 +32427 +7848 +1439 +29641 +25796 +23064 +9066 +24802 +32440 +7555 +28614 +29839 +7704 +24865 +21097 +27784 +9748 +24067 +20862 +5462 +12354 +21586 +25625 +17070 +32686 +1220 +24801 +8458 +28195 +31071 +21752 +7305 +16313 +31090 +20270 +22793 +2208 +17616 +27495 +30594 +4395 +29264 +10826 +9382 +25632 +3458 +24876 +11447 +29503 +20403 +20027 +4264 +32272 +4131 +7407 +22647 +9970 +18309 +26286 +7882 +25185 +17080 +31678 +4552 +11399 +24773 +112 +25914 +12550 +30745 +10891 +29155 +20741 +16132 +10999 +32285 +13177 +21361 +4010 +27573 +19381 +15847 +10712 +18184 +565 +3009 +17494 +29534 +27559 +23722 +13904 +28806 +14907 +32603 +7724 +30131 +21804 +31129 +20669 +23959 +17039 +5993 +18604 +8126 +20315 +23958 +8740 +21292 +8634 +31590 +28349 +30266 +8591 +6040 +28076 +30638 +25416 +5282 +29736 +15642 +229 +10281 +4639 +8823 +3401 +25024 +16154 +12033 +3521 +31973 +7022 +31573 +9682 +6713 +4516 +1225 +24904 +15360 +25643 +27148 +18556 +8665 +29500 +19711 +10981 +24510 +18190 +21971 +19426 +19519 +10812 +4963 +24006 +8698 +24691 +13524 +30500 +28767 +17760 +22635 +28253 +14242 +24537 +27566 +18280 +19457 +13642 +22718 +8162 +23608 +26979 +31988 +17750 +14145 +30207 +9403 +25038 +11601 +1880 +2222 +27290 +10256 +18538 +2034 +15711 +22039 +11172 +7125 +5988 +1455 +31702 +16551 +21273 +2761 +16727 +20441 +6121 +19513 +18294 +1877 +26689 +21559 +20003 +14877 +14817 +24 +13279 +26150 +1122 +11080 +9185 +11127 +29193 +29068 +5258 +24702 +7883 +25719 +8715 +16306 +4512 +20522 +4436 +27247 +23565 +27472 +1856 +15630 +3052 +3672 +16384 +12356 +23423 +19957 +21189 +17341 +19381 +5332 +19890 +11769 +5307 +6301 +13825 +19814 +6342 +17965 +14452 +5823 +17696 +273 +5630 +31908 +3441 +21062 +6322 +3195 +27984 +25135 +7405 +15494 +7178 +23000 +31424 +10053 +24241 +1898 +23456 +12302 +9321 +25070 +18513 +19691 +22767 +18502 +31504 +29108 +6506 +5993 +16896 +22637 +14198 +29662 +32215 +8930 +13934 +25212 +2249 +4481 +12026 +3168 +4532 +19320 +17626 +18991 +14222 +29711 +6897 +21133 +28940 +2376 +29077 +10206 +3220 +18356 +23318 +8508 +21606 +3992 +12940 +10937 +8966 +1857 +16614 +6358 +29676 +30373 +15408 +11075 +15471 +6203 +3364 +6873 +6383 +23324 +1781 +20182 +6722 +21083 +32087 +5464 +16225 +19873 +25810 +31515 +26452 +22285 +26953 +7799 +18267 +4683 +9926 +6549 +12638 +14579 +28808 +24561 +13975 +12324 +21071 +11029 +29309 +29536 +14310 +21140 +2548 +20651 +26354 +11076 +10932 +12768 +14075 +18881 +5879 +28499 +13240 +17439 +2407 +26541 +5535 +20206 +32071 +22788 +15533 +20852 +9952 +14137 +6515 +19750 +10286 +31639 +12386 +13416 +19916 +10665 +9047 +3207 +24605 +1372 +28010 +30451 +21692 +13910 +15603 +32193 +27687 +21653 +6110 +16224 +1959 +6732 +13873 +21915 +17282 +14075 +16091 +5072 +8548 +32717 +21184 +30831 +20235 +31030 +4609 +28086 +21811 +30157 +1936 +13738 +15041 +18023 +9972 +7513 +26675 +14197 +18522 +21328 +22343 +22432 +20189 +32087 +23274 +17315 +25879 +26996 +2916 +29544 +31720 +30239 +8899 +17510 +30598 +3522 +21893 +15674 +14021 +20853 +29577 +18052 +24745 +20215 +23864 +21765 +9257 +24048 +6383 +16630 +22086 +101 +5296 +18091 +6733 +25212 +24586 +27753 +104 +21874 +27206 +18820 +18027 +25050 +4307 +27324 +9950 +19736 +2548 +20442 +25158 +11805 +30632 +16007 +28345 +28005 +11994 +26220 +31137 +19502 +32458 +4752 +10192 +20218 +1211 +25582 +16325 +10055 +22494 +20822 +10813 +30861 +6526 +26758 +29949 +5241 +13678 +3208 +17375 +2665 +24240 +11598 +23579 +9768 +5223 +13453 +13784 +14827 +15102 +9175 +16371 +20363 +5530 +8188 +16911 +7429 +11198 +26018 +2269 +22575 +26429 +25378 +18605 +17853 +30310 +29606 +25142 +8052 +15978 +30593 +30114 +11693 +27153 +17871 +28637 +12300 +24733 +13134 +32287 +29058 +12542 +10875 +5048 +9089 +15673 +4336 +28188 +23679 +12818 +30205 +17198 +21934 +5889 +18054 +1489 +17401 +596 +541 +27821 +26690 +15777 +11616 +10046 +13019 +26223 +32148 +27940 +5699 +22308 +31106 +21414 +25890 +25649 +2962 +5511 +22406 +14717 +16678 +14606 +4960 +25616 +13114 +16464 +21562 +21505 +21561 +20417 +3643 +25250 +7970 +30458 +10333 +10473 +25563 +1997 +10732 +12834 +11477 +10119 +30531 +22227 +31202 +1668 +31171 +19440 +19539 +27129 +20244 +12864 +16470 +29694 +23455 +12815 +12174 +21978 +23628 +28437 +6388 +22676 +21369 +24742 +18925 +26550 +27963 +23068 +1196 +2660 +14040 +20354 +8139 +30366 +17797 +8834 +23333 +10962 +10332 +913 +26103 +14758 +16801 +13145 +21046 +13315 +25398 +12390 +28979 +23909 +19036 +7445 +21869 +5730 +22188 +27066 +30135 +10617 +6229 +3857 +11659 +26141 +4503 +25831 +5805 +13826 +18304 +24841 +30723 +6311 +32230 +19053 +17844 +12580 +15014 +11423 +28288 +21046 +27675 +5999 +29280 +13448 +20193 +30425 +32350 +17220 +28363 +3893 +2487 +10970 +24355 +27040 +12334 +5648 +1569 +15529 +17843 +17739 +6062 +7488 +24373 +27676 +7002 +988 +19652 +270 +6554 +29164 +16620 +27567 +19527 +17281 +8525 +15580 +28245 +31033 +15487 +23890 +1744 +1647 +24869 +24178 +19228 +28576 +4687 +22868 +29805 +17697 +21782 +2064 +9349 +17919 +21362 +1353 +13742 +14135 +20575 +24058 +4599 +15127 +10544 +24965 +28082 +13556 +24627 +23545 +302 +1293 +27782 +9891 +7601 +10431 +19257 +15065 +14778 +2795 +3494 +13058 +20597 +4261 +24844 +26090 +12414 +11807 +19314 +2117 +5594 +4052 +6587 +129 +11059 +9208 +15110 +22736 +20052 +4128 +1353 +31606 +13285 +24366 +7981 +9552 +18023 +29567 +2860 +15014 +23667 +2392 +4073 +27186 +8751 +21903 +31184 +19056 +21009 +3190 +29166 +23848 +6360 +23821 +26130 +9530 +16583 +11367 +15909 +15018 +36 +7517 +23239 +2284 +1778 +12402 +6444 +9072 +10218 +2054 +22581 +23665 +14528 +7360 +15058 +2555 +1428 +28213 +9111 +9531 +29622 +31709 +9629 +12299 +12190 +4664 +26268 +3262 +555 +14396 +11846 +13352 +10524 +18691 +7910 +30194 +20172 +1458 +21305 +12060 +32050 +11181 +23949 +8915 +10265 +23289 +25624 +24949 +10908 +22769 +22171 +27107 +21476 +31533 +31031 +28934 +24357 +18095 +16527 +31652 +29399 +3920 +15136 +13925 +818 +9066 +989 +14368 +13293 +20423 +31246 +6764 +5431 +18378 +14954 +5220 +22517 +15836 +5492 +954 +21822 +14361 +32531 +4095 +1301 +27964 +13173 +21552 +16486 +13768 +3365 +14981 +27203 +23929 +18539 +30327 +23647 +24810 +12260 +18704 +13003 +25479 +28258 +31607 +21232 +27062 +519 +15291 +18894 +9025 +3228 +18399 +23924 +20999 +32055 +4903 +28095 +6372 +20238 +20898 +86 +16093 +22934 +5625 +5094 +12944 +28127 +28022 +5787 +23003 +15668 +9816 +7135 +31180 +17646 +11349 +11607 +17097 +15257 +10097 +21274 +19713 +15179 +18687 +12084 +4370 +9536 +29428 +18523 +10491 +31418 +9588 +24560 +25925 +10008 +24215 +28473 +621 +30517 +22651 +10205 +2710 +14852 +20880 +5025 +12141 +18025 +19232 +12130 +10331 +25178 +27165 +7506 +24818 +18230 +26159 +19063 +914 +16229 +13054 +9057 +11355 +6450 +20413 +13354 +20568 +27365 +26871 +20404 +9449 +25636 +14494 +6687 +4977 +10380 +20561 +4745 +1345 +28555 +14829 +30730 +5061 +25985 +6744 +9710 +26861 +2583 +17034 +17205 +23519 +2015 +23260 +24904 +5595 +16684 +5269 +26110 +19310 +3636 +3506 +23759 +21978 +26725 +21238 +2903 +14534 +32516 +11315 +25870 +24610 +28941 +7895 +14918 +8797 +10310 +21177 +15974 +21195 +4517 +17702 +16741 +28753 +12004 +30247 +14474 +15442 +15715 +31765 +29282 +17887 +28222 +10592 +4610 +13594 +27566 +12444 +11646 +25323 +10149 +29389 +11178 +2279 +12197 +25588 +15632 +5501 +482 +12761 +3121 +28771 +8088 +6427 +257 +15168 +22702 +5238 +13213 +23194 +3212 +21077 +27215 +21251 +23609 +7320 +16068 +18048 +2489 +7847 +18060 +7738 +166 +13751 +23251 +11368 +17421 +14172 +23390 +21115 +15756 +23120 +2249 +30604 +10665 +11650 +20991 +23300 +7541 +18786 +12538 +3978 +24929 +10092 +29372 +10802 +7520 +19443 +1678 +29155 +4670 +11824 +12409 +6921 +23616 +2699 +15106 +23421 +31485 +2856 +1065 +25265 +6780 +29365 +420 +544 +22927 +13683 +6232 +4597 +2415 +11395 +25369 +24058 +8857 +20339 +17571 +9924 +27368 +8201 +24792 +797 +2291 +13390 +22844 +11698 +170 +2782 +26798 +2814 +21804 +5488 +14953 +29558 +19435 +9633 +6203 +3574 +3330 +10245 +19460 +18027 +7382 +22896 +20593 +11458 +27372 +25217 +11514 +18449 +29195 +1393 +6426 +10757 +9618 +18970 +17102 +20108 +10268 +21579 +21585 +5059 +1874 +20555 +5398 +22050 +30991 +8619 +16902 +31973 +21947 +16465 +30971 +702 +19425 +28610 +21372 +18106 +2323 +15535 +3258 +12658 +21504 +27843 +20172 +31347 +21459 +19628 +807 +6638 +206 +2152 +16993 +12964 +31271 +31185 +16167 +12 +15651 +6508 +18556 +5319 +31089 +32110 +16180 +30023 +32457 +4880 +6832 +23227 +32709 +32277 +22747 +10813 +9727 +19096 +30053 +27711 +13164 +23835 +17471 +20530 +11513 +19661 +19288 +2169 +19044 +5148 +30614 +2702 +10076 +17275 +18711 +32627 +29148 +8821 +21160 +28764 +4549 +27379 +10374 +31643 +1466 +2762 +6741 +7627 +28993 +6024 +21599 +23361 +6167 +24704 +17422 +21935 +17108 +19219 +23468 +6682 +18624 +25921 +4441 +13055 +15092 +23153 +13645 +19137 +27829 +13950 +31568 +27223 +21773 +8962 +21366 +8243 +1451 +2790 +28192 +7029 +13053 +20522 +1840 +1873 +2443 +32754 +21644 +12989 +19607 +12498 +13269 +20576 +31219 +30555 +29545 +23223 +28450 +7398 +21143 +26761 +19379 +1184 +5409 +32142 +3289 +27350 +17912 +9051 +7759 +27266 +1331 +22161 +23659 +29975 +32081 +5191 +17281 +10378 +23472 +5044 +18555 +12193 +26701 +30753 +5814 +6272 +6334 +1806 +12063 +19825 +14957 +11940 +9358 +7155 +4118 +26715 +29026 +30214 +32388 +17388 +8798 +22966 +9351 +9849 +21188 +2790 +31290 +2555 +13744 +2911 +21363 +18668 +10423 +32025 +24971 +16951 +3008 +23240 +4175 +24924 +23073 +12970 +23110 +22248 +16638 +20368 +28710 +3348 +11999 +31787 +20369 +9404 +6289 +19609 +9492 +1668 +28479 +6704 +5474 +21573 +976 +7562 +18893 +18110 +21379 +21201 +23558 +17272 +31177 +5196 +32022 +14074 +17251 +5931 +29596 +32558 +7868 +13967 +19784 +29203 +25993 +14557 +24472 +19621 +15263 +31556 +29650 +5641 +32532 +12173 +14915 +17150 +1434 +6178 +24758 +9600 +8983 +28258 +26679 +29886 +13705 +24356 +5641 +31038 +12826 +18825 +7141 +10574 +28543 +11271 +21365 +16815 +10646 +27571 +10513 +9853 +31296 +25039 +4537 +6242 +17276 +23444 +10323 +2556 +18116 +30784 +20006 +8587 +26028 +4451 +27286 +13023 +18361 +6503 +9761 +15745 +24960 +7263 +15514 +15137 +6400 +20241 +17061 +19008 +832 +22598 +31348 +286 +30508 +16465 +5056 +29926 +29101 +13021 +29451 +16664 +1800 +32508 +23572 +6968 +23930 +365 +7067 +16053 +27920 +25902 +3158 +15644 +204 +26179 +4915 +32381 +13557 +708 +28368 +32286 +28351 +17965 +30265 +3935 +2332 +6882 +8929 +14061 +13026 +19969 +483 +25643 +14878 +12653 +26745 +5853 +16567 +2072 +1981 +15639 +5703 +10384 +15264 +21861 +13110 +461 +12584 +8508 +4377 +28217 +16366 +29601 +23625 +257 +4823 +26648 +15047 +14747 +31762 +3535 +9296 +18840 +4178 +21259 +1981 +22700 +25933 +15572 +14749 +29435 +3957 +14045 +26645 +3494 +15094 +1974 +4087 +19862 +31728 +13620 +12065 +31880 +12790 +25889 +12312 +22617 +6855 +1568 +19174 +10388 +28748 +19684 +22321 +17977 +11730 +20882 +19357 +464 +22664 +22899 +26211 +5039 +26427 +6366 +15154 +647 +9553 +31077 +8774 +11318 +11525 +12351 +17607 +23752 +21730 +12534 +16996 +8142 +11393 +18513 +11312 +14308 +25734 +27524 +20668 +26749 +15833 +1943 +5494 +32242 +23586 +23828 +22850 +16331 +6023 +13300 +7254 +14668 +10666 +29644 +26971 +1092 +20957 +27700 +15298 +530 +19624 +22904 +24419 +12024 +14973 +29058 +1373 +31652 +20922 +1287 +2601 +22780 +30688 +241 +10497 +25130 +7698 +23565 +6256 +20712 +31953 +15606 +19514 +10253 +2806 +25666 +22639 +16472 +19441 +9963 +12746 +9085 +20801 +1279 +18255 +24942 +2867 +10379 +12581 +19435 +17630 +22726 +28849 +17485 +26463 +11642 +32245 +1934 +24658 +3768 +7719 +9373 +18321 +19644 +16277 +2273 +8240 +23582 +22200 +20236 +20665 +571 +30872 +15394 +11940 +32227 +11872 +5833 +14618 +30788 +15937 +17618 +24299 +18967 +25995 +23304 +27597 +24841 +16394 +2873 +30936 +20844 +22687 +7299 +31806 +24607 +7967 +23009 +21583 +4282 +16241 +8949 +27052 +1022 +5602 +2840 +17611 +12925 +15564 +12960 +12972 +20358 +28520 +18033 +21721 +24659 +15856 +20934 +14500 +21366 +20216 +20033 +20893 +9345 +10766 +7730 +29521 +22517 +18321 +23844 +9802 +23405 +25039 +12974 +29764 +5643 +17251 +4984 +1964 +13603 +3789 +7307 +14943 +295 +15186 +29919 +28576 +18131 +17174 +24863 +21850 +8345 +15992 +30143 +26776 +11343 +26798 +4929 +22850 +30999 +18850 +6339 +10522 +14735 +268 +30925 +8695 +1594 +28368 +7257 +32576 +15407 +13466 +16420 +26284 +17408 +19640 +14388 +3128 +19693 +12855 +17834 +7528 +18506 +22082 +27338 +20419 +12590 +24247 +26952 +11913 +27741 +27146 +22229 +951 +19576 +21599 +29674 +30782 +1635 +14819 +12500 +18303 +8695 +12908 +3329 +8714 +13034 +593 +15497 +7064 +26107 +15499 +16384 +16454 +11873 +4620 +23163 +11540 +8054 +19039 +4576 +18334 +16032 +8578 +9587 +28953 +22912 +1793 +9886 +20625 +11359 +31315 +8193 +4193 +25813 +121 +30394 +10995 +19643 +28373 +29174 +8889 +10579 +1864 +5304 +16748 +6838 +8592 +13801 +14980 +1919 +24032 +673 +19704 +24758 +7361 +22197 +16440 +18943 +14376 +6017 +22631 +29188 +14809 +31991 +7645 +10015 +2811 +29928 +5085 +29772 +22781 +3218 +14995 +21071 +11176 +3179 +30802 +14626 +26757 +12845 +17931 +7585 +16242 +13602 +15121 +10105 +15487 +178 +21515 +11085 +31503 +20778 +4410 +13611 +13868 +7887 +18413 +12079 +12842 +803 +17217 +28790 +15232 +1142 +4126 +16454 +14050 +29617 +4207 +6523 +32420 +18527 +12705 +14900 +2379 +9980 +25183 +19391 +5493 +32130 +9099 +11971 +22251 +25138 +20608 +14252 +24836 +8352 +31367 +26460 +19005 +8450 +29591 +27664 +17686 +5562 +25682 +30351 +10799 +6945 +2364 +12186 +12195 +13718 +29502 +22929 +18853 +22983 +26459 +27234 +28762 +27455 +14769 +10679 +18166 +23856 +16306 +8032 +24601 +24963 +13732 +24062 +7020 +21022 +13143 +30193 +22647 +16501 +3110 +7300 +31430 +22355 +13873 +21336 +31549 +31466 +5337 +7182 +695 +21274 +17020 +1081 +18918 +11262 +13682 +5506 +14951 +22717 +23624 +30237 +3364 +1167 +3388 +17773 +25071 +7694 +25849 +243 +3164 +18623 +28820 +32124 +4575 +224 +16070 +16523 +5415 +23924 +13419 +17925 +10938 +7309 +16444 +32283 +21201 +26074 +18889 +3965 +5238 +28529 +30650 +10685 +30172 +28893 +10567 +29697 +19967 +4203 +16116 +25581 +11132 +14001 +3730 +2255 +19635 +29792 +7795 +5901 +25883 +26188 +1004 +16332 +11237 +17337 +273 +8418 +28628 +745 +15789 +22782 +11356 +16355 +14207 +3094 +23546 +20869 +17852 +25618 +979 +14540 +19394 +22967 +13456 +22115 +30489 +20949 +31864 +4715 +9391 +23220 +1744 +25225 +18772 +5565 +25712 +23094 +31092 +6501 +14758 +12611 +27669 +22367 +19792 +27819 +5393 +21250 +13620 +5534 +12948 +13304 +7075 +10954 +27097 +297 +23119 +14316 +20256 +4070 +26217 +16279 +29939 +29530 +18942 +25412 +24219 +30766 +9875 +30107 +29149 +30844 +32000 +25345 +17402 +5111 +13962 +7266 +24038 +6232 +11076 +28736 +21447 +9739 +8616 +32253 +19377 +23834 +881 +12133 +20385 +7771 +17339 +25727 +1719 +11478 +12894 +15765 +12728 +15225 +14471 +12161 +1732 +13055 +15000 +20027 +18516 +15389 +6979 +31136 +13175 +23023 +7138 +22661 +8525 +8355 +5657 +19964 +30660 +21605 +19118 +21733 +17810 +31882 +16808 +28089 +9587 +14080 +30631 +2707 +17573 +22517 +21635 +9599 +10401 +8646 +10024 +27912 +4123 +8491 +8881 +13052 +2876 +31137 +6340 +2434 +10014 +11800 +27950 +14943 +18569 +12767 +32447 +1157 +4588 +19916 +359 +19421 +28831 +9647 +1425 +10070 +11608 +27129 +10431 +31022 +7147 +425 +11112 +32128 +17990 +14456 +26639 +31503 +11948 +15685 +26532 +594 +1329 +31939 +3871 +26304 +27767 +9313 +8795 +24157 +10663 +22905 +6192 +29572 +23475 +28861 +31701 +13559 +5578 +12767 +22388 +20518 +31003 +29568 +25614 +445 +10703 +7004 +31378 +2160 +15169 +20147 +569 +1547 +28544 +24314 +22565 +31412 +26119 +16067 +27706 +18052 +5563 +2794 +3900 +23878 +11814 +29697 +11817 +6286 +15346 +5118 +30425 +21502 +11433 +31780 +8660 +16340 +3500 +1839 +23924 +5560 +8817 +15299 +5692 +7109 +11777 +19223 +6263 +8662 +2993 +30685 +18197 +25874 +29472 +29045 +25538 +1466 +881 +28499 +9288 +31538 +29130 +6318 +4391 +12879 +30477 +1131 +26994 +16864 +22742 +23881 +2028 +24959 +10677 +30285 +1380 +3737 +7341 +23408 +5198 +3004 +2029 +10888 +20899 +9760 +29389 +16500 +1786 +28025 +19212 +1676 +6631 +18940 +7496 +27719 +9364 +7344 +27839 +22830 +29598 +22007 +1605 +8962 +25907 +11868 +27269 +21545 +25961 +28063 +11132 +20063 +993 +27646 +22834 +5530 +24220 +14790 +22971 +20286 +24093 +6426 +18543 +16770 +32448 +13827 +14438 +24354 +9050 +18617 +30262 +11078 +11538 +3633 +9456 +434 +21631 +17128 +21080 +3888 +4 +3054 +24165 +1594 +4968 +31285 +20986 +23533 +29881 +5147 +226 +6442 +16994 +4406 +4881 +3086 +30346 +13408 +20762 +26005 +29616 +28676 +20459 +3977 +13958 +16551 +22481 +18097 +10507 +27066 +8872 +17720 +21227 +158 +19810 +2395 +25371 +29177 +6331 +1111 +20144 +27960 +21818 +15762 +257 +25189 +5740 +13832 +22782 +32299 +2396 +6137 +28623 +20519 +2647 +32465 +25776 +1905 +21982 +25431 +10764 +29034 +28907 +30746 +4056 +9929 +9321 +537 +1843 +4833 +10222 +31154 +23356 +16693 +22459 +32717 +23347 +7486 +4598 +29513 +12755 +4219 +5926 +12966 +26094 +10938 +2543 +22005 +16458 +16550 +27152 +27901 +4796 +11410 +9882 +3503 +7299 +7556 +9075 +16076 +2023 +8325 +19979 +2772 +15634 +20520 +7516 +18227 +1582 +22105 +6440 +23463 +16577 +11368 +17518 +5621 +6213 +17750 +1838 +21964 +1547 +3679 +29535 +7417 +4690 +29128 +301 +20429 +4771 +18410 +7800 +12748 +24943 +25215 +11657 +27287 +19180 +7724 +20247 +7964 +11053 +9808 +4986 +27388 +31104 +22284 +28462 +17980 +15629 +27027 +3723 +9008 +9900 +22195 +25794 +20645 +19462 +7076 +4636 +27726 +16368 +19729 +32111 +29041 +1028 +9317 +15586 +12242 +3969 +29527 +10722 +14048 +26469 +10680 +15459 +286 +969 +22908 +2396 +27605 +32380 +25864 +125 +18168 +18147 +17339 +17715 +2391 +22289 +2239 +16095 +29960 +9762 +6161 +15442 +14355 +21469 +13775 +18060 +21853 +18826 +23490 +32438 +25047 +19472 +300 +9053 +25063 +15187 +16595 +6384 +21270 +31437 +2381 +4477 +11772 +16235 +17294 +12200 +27753 +16042 +7089 +16621 +24533 +31474 +22531 +27415 +25610 +10546 +27222 +26880 +14864 +27581 +10116 +12938 +5977 +24165 +20801 +11230 +13613 +12246 +24103 +14308 +27737 +17461 +11260 +18947 +10516 +7417 +2117 +21274 +17201 +521 +15121 +9663 +1676 +10263 +32767 +11703 +30638 +20540 +6545 +5814 +8387 +7380 +27318 +15960 +29374 +6044 +17042 +3423 +1738 +9483 +18064 +5167 +19444 +24814 +9898 +1671 +27928 +8263 +2040 +29313 +31497 +5223 +20856 +20173 +9988 +19273 +18204 +15402 +6487 +2354 +7962 +5669 +12366 +14215 +32111 +12054 +13150 +25838 +437 +21336 +18069 +4777 +21287 +28616 +10817 +19247 +22258 +30592 +4832 +15884 +31934 +25813 +9544 +23802 +19837 +29071 +25367 +13889 +10355 +25192 +4957 +2124 +23174 +455 +29577 +19085 +31688 +9661 +15505 +10130 +16194 +23873 +18534 +9320 +8451 +8360 +25495 +28976 +7786 +8552 +5956 +7936 +25776 +5390 +30534 +14077 +8633 +6012 +16540 +28342 +25371 +104 +21529 +30147 +12143 +18450 +22860 +6302 +17880 +22341 +5552 +13505 +12242 +24209 +17429 +14849 +4414 +4295 +30798 +13610 +25258 +23733 +23324 +8156 +485 +547 +19035 +29093 +17603 +7694 +10603 +11872 +31277 +2595 +28129 +28109 +1389 +11135 +13423 +6258 +32696 +3238 +27153 +21937 +3069 +24257 +21882 +26411 +18669 +15901 +3262 +27988 +3403 +21984 +9024 +20823 +23158 +16141 +7135 +20524 +12596 +14011 +27484 +25336 +13505 +1938 +5903 +165 +18455 +17030 +15306 +29890 +4480 +8920 +2318 +18332 +4186 +14666 +31853 +29598 +12586 +15009 +26943 +25574 +3045 +3425 +6281 +30761 +14458 +29380 +3370 +2505 +26019 +26364 +14407 +11828 +7662 +5291 +10745 +12928 +26374 +30623 +2614 +3141 +10055 +2770 +26109 +15290 +32130 +7585 +7366 +23314 +30477 +11341 +31273 +22297 +20495 +22448 +18381 +3339 +10762 +22592 +25492 +18869 +25769 +2121 +9732 +26063 +1228 +24934 +9465 +31640 +21970 +2370 +7817 +29107 +12582 +18829 +6200 +22337 +6156 +3905 +32349 +19776 +2990 +19735 +20436 +31012 +20322 +23876 +8677 +15540 +318 +15993 +2165 +12070 +13534 +18458 +11884 +4990 +31860 +12733 +10853 +18468 +3090 +2534 +23453 +27588 +25396 +30721 +23318 +13163 +10385 +26017 +19722 +11743 +9252 +27384 +7832 +28735 +885 +6806 +31658 +26588 +21549 +2150 +2341 +19799 +24793 +10214 +12117 +29947 +23550 +23974 +151 +30812 +1374 +24580 +2120 +30001 +13706 +17190 +3566 +23919 +31657 +19512 +6310 +5288 +14727 +26599 +16077 +22179 +27105 +24606 +3571 +9020 +31983 +11520 +5884 +11133 +30515 +32038 +27288 +31741 +16001 +20762 +4582 +24697 +16720 +17940 +20324 +15538 +25663 +27636 +13338 +22150 +25067 +17023 +21767 +19794 +2288 +14814 +11468 +14983 +1085 +21076 +30103 +14218 +6558 +14143 +1875 +17618 +2691 +29010 +1550 +20029 +790 +3089 +27818 +18610 +17277 +19086 +16328 +9469 +28524 +18274 +29937 +5095 +12272 +7150 +23047 +22421 +4983 +27348 +2283 +7715 +22562 +27056 +13168 +8577 +3151 +17947 +21376 +2189 +12642 +482 +2957 +17777 +19669 +8835 +17211 +27968 +4992 +20457 +19531 +17612 +6953 +15977 +7115 +32458 +15951 +32765 +25468 +26409 +7731 +6336 +6020 +30639 +28456 +29353 +11349 +4566 +31517 +3212 +6364 +23014 +1640 +78 +26863 +28499 +725 +15464 +27633 +32345 +15598 +3231 +19399 +26326 +28557 +19970 +6144 +29800 +27040 +27172 +4416 +25543 +12861 +30107 +16621 +12644 +22246 +3513 +10525 +27971 +20509 +20873 +6336 +4118 +10284 +4622 +28682 +3483 +20526 +5559 +24868 +8247 +20322 +2854 +30995 +2515 +14513 +1826 +31976 +17911 +4733 +10714 +26409 +26918 +7340 +18269 +4480 +10617 +8437 +12118 +22178 +19583 +14698 +28684 +14467 +30292 +14662 +12441 +22200 +5631 +9209 +32362 +16684 +27409 +24178 +10743 +29447 +24700 +1708 +3780 +475 +14514 +7548 +25241 +19729 +18174 +28313 +26621 +14739 +12839 +25324 +8185 +17851 +31810 +10522 +22283 +380 +19416 +24655 +10600 +14031 +12857 +12622 +23159 +20065 +27424 +438 +7050 +15483 +20872 +11671 +7647 +561 +1486 +29493 +3031 +3791 +264 +32027 +17781 +3456 +4517 +13924 +31770 +27456 +32069 +21829 +2431 +8453 +17371 +18399 +7667 +3625 +16385 +28484 +8663 +28443 +8347 +21703 +26199 +15431 +30640 +17801 +362 +32066 +23173 +65 +28940 +23610 +20219 +24907 +25019 +1438 +555 +14580 +13360 +8201 +1087 +14341 +7776 +26741 +1427 +7821 +946 +16029 +20749 +6388 +24705 +11699 +32698 +30525 +25813 +15683 +8618 +10907 +6750 +5735 +22542 +13623 +12722 +18732 +7311 +30785 +21192 +15941 +12785 +3125 +3253 +8431 +31209 +3951 +16549 +19747 +11323 +5874 +9244 +3587 +11031 +11637 +13935 +14463 +28854 +3247 +17789 +28231 +21040 +31972 +23987 +5366 +5025 +1713 +16704 +19836 +2429 +25364 +17044 +30668 +17200 +21951 +7711 +3784 +31481 +23965 +12103 +26729 +18184 +26534 +7339 +9779 +18391 +28640 +22423 +25048 +20422 +15542 +2760 +25131 +16378 +8317 +21601 +25672 +5751 +27972 +26413 +17666 +27004 +1756 +28439 +5773 +19487 +16169 +21735 +28269 +22569 +26791 +15679 +30622 +22836 +19264 +24277 +5381 +21763 +26444 +3058 +8215 +27938 +13033 +2860 +4040 +21950 +15742 +7008 +5046 +24007 +25994 +16114 +28566 +17476 +3251 +10824 +8927 +22262 +30219 +29061 +10422 +5681 +15013 +20867 +23578 +23030 +88 +12307 +19537 +13397 +24274 +12152 +3474 +3330 +7905 +28961 +20980 +12854 +16382 +25511 +22166 +23241 +28699 +14343 +28944 +21901 +25006 +23073 +18714 +25070 +11262 +2160 +2684 +28103 +8622 +26379 +6965 +13447 +18823 +10717 +8687 +31620 +25994 +12833 +26787 +26527 +13366 +15137 +26504 +10266 +22550 +29231 +1090 +29366 +4495 +5604 +20809 +3344 +14056 +30872 +22935 +24382 +5786 +546 +17557 +19365 +12250 +3281 +24136 +18461 +28005 +14763 +20407 +29769 +20107 +6117 +5025 +10544 +10879 +15266 +29533 +15904 +31197 +8176 +6161 +32453 +21116 +28672 +31767 +3717 +375 +5030 +18604 +13598 +28534 +6929 +27611 +20610 +15170 +26059 +29353 +26611 +13961 +8436 +29570 +7259 +12526 +30907 +5347 +29166 +15700 +6429 +31817 +12034 +23916 +23010 +12635 +19502 +16253 +12757 +16723 +12706 +31347 +19779 +11954 +15814 +29739 +25526 +31012 +20759 +24062 +10483 +18865 +23358 +29580 +30001 +3878 +9586 +26570 +156 +5827 +22031 +11342 +19978 +27942 +26999 +32474 +8445 +4983 +7210 +26920 +6873 +21717 +545 +7925 +23398 +18433 +18287 +26193 +16521 +18762 +22043 +30245 +8511 +30904 +23864 +30469 +8154 +2172 +30022 +4664 +28544 +26520 +24013 +15109 +10465 +5323 +4152 +7744 +2616 +9663 +9199 +25622 +16005 +20086 +16313 +12309 +2057 +29938 +5201 +2943 +27138 +7460 +7238 +9680 +11688 +14615 +7448 +6029 +24167 +10589 +9616 +4943 +6495 +31162 +1376 +12560 +19482 +9743 +31228 +16310 +16012 +29578 +3256 +18654 +1105 +10764 +24098 +13034 +12578 +14811 +23202 +11597 +27800 +6537 +5200 +21270 +16677 +26660 +15894 +12219 +16976 +8095 +1031 +4648 +26161 +25473 +15614 +23048 +11820 +14284 +12667 +11091 +31473 +11312 +29626 +13336 +10164 +18289 +1301 +28813 +18602 +16150 +17564 +6484 +10437 +18259 +25330 +10256 +25264 +1849 +22379 +7720 +12557 +32028 +4707 +31195 +20973 +24389 +26849 +1413 +6544 +17625 +30061 +27952 +4191 +8969 +27183 +18014 +14376 +27260 +4169 +30229 +21657 +20729 +28790 +8492 +21247 +4953 +24803 +4821 +11583 +15276 +29774 +17772 +25621 +14251 +1629 +31103 +27788 +19294 +24897 +1822 +11454 +11278 +14475 +21860 +25550 +20333 +30030 +9286 +6435 +15108 +3958 +5275 +28390 +24542 +28776 +6764 +29631 +20083 +6876 +17790 +20427 +20183 +5111 +3102 +26849 +10531 +18860 +1068 +23046 +10788 +29268 +13931 +23086 +12355 +8588 +30728 +28214 +19636 +3663 +30312 +542 +17635 +18005 +24886 +17803 +28 +19115 +24237 +26492 +11641 +20883 +13859 +3404 +11793 +10655 +23767 +8425 +3934 +31240 +20732 +21075 +8687 +23636 +28421 +26712 +30800 +2857 +11571 +15502 +23095 +8811 +26973 +32401 +30704 +11421 +13567 +6782 +27146 +31094 +19334 +24240 +18755 +31171 +7899 +15546 +27313 +7292 +9774 +16805 +3123 +26922 +23300 +8555 +32024 +21368 +4228 +29107 +3853 +1048 +4350 +28623 +23372 +4825 +11709 +28148 +10243 +28166 +11534 +17336 +31234 +27394 +17040 +24017 +7849 +15393 +32191 +18701 +14865 +18377 +23228 +21644 +9594 +7369 +24927 +10053 +10741 +32761 +32383 +25785 +25426 +20243 +896 +15601 +22348 +13522 +30751 +958 +3316 +27209 +10874 +11057 +12379 +389 +10595 +15705 +3715 +30055 +5350 +12604 +30088 +31419 +28952 +14104 +17675 +20125 +26403 +22491 +15071 +32270 +8335 +992 +18423 +25298 +10450 +27884 +31120 +20876 +283 +18281 +17051 +13597 +21084 +20193 +12653 +4921 +27030 +10686 +23978 +13900 +27241 +2112 +6766 +30860 +25563 +6847 +14526 +27743 +13160 +15139 +26159 +24047 +25163 +26017 +29653 +27147 +26892 +23735 +4462 +9793 +1355 +5227 +18640 +5690 +3531 +16576 +17808 +27222 +28866 +9080 +13556 +17288 +18527 +29969 +18971 +30835 +12701 +1274 +12907 +6086 +20807 +27926 +1595 +9173 +13132 +29812 +450 +17272 +28741 +32076 +4672 +25641 +17732 +6717 +875 +2393 +2528 +9925 +22812 +17682 +12414 +32513 +8506 +5588 +15585 +12967 +18919 +9641 +23797 +20289 +18410 +9866 +4056 +7596 +6493 +18422 +1834 +28368 +28824 +465 +11926 +21409 +4956 +12410 +1441 +23638 +14916 +15920 +14258 +15081 +31849 +21927 +7778 +25808 +4949 +23014 +6663 +4089 +810 +8036 +27771 +9996 +29459 +8803 +562 +4316 +16876 +13964 +21884 +26414 +9005 +27596 +22550 +30895 +20508 +9326 +3832 +12848 +6451 +6266 +19546 +19236 +25551 +16973 +13320 +20828 +24603 +28793 +30184 +28673 +829 +30943 +27336 +3538 +4543 +18698 +32622 +7840 +17983 +20431 +6618 +17415 +24667 +31779 +25822 +6510 +10199 +19772 +11745 +18241 +12305 +12268 +16623 +14702 +26535 +9530 +28422 +5406 +16486 +28226 +10908 +18869 +31606 +14671 +26228 +22796 +26052 +3126 +8867 +13038 +4272 +26614 +21469 +16337 +21240 +24973 +4357 +30422 +7653 +11293 +13045 +6914 +29364 +20544 +21130 +31678 +1095 +3240 +20724 +21646 +20748 +7163 +22076 +10254 +16686 +23534 +29207 +12851 +5371 +4512 +19178 +19903 +12182 +18233 +1821 +26884 +2526 +32451 +23716 +26078 +22941 +13896 +29388 +235 +14581 +31021 +579 +7182 +23048 +31438 +24427 +2084 +4839 +30299 +23264 +10756 +19902 +20467 +9287 +5820 +10557 +13055 +7002 +779 +21833 +10704 +15153 +8730 +30692 +27260 +3027 +20351 +9817 +21749 +17917 +8308 +16045 +24171 +5425 +14420 +11587 +26085 +9219 +31831 +27342 +11803 +24223 +655 +15996 +30870 +6047 +22562 +4192 +32267 +31500 +31433 +22561 +16372 +31666 +8585 +29665 +28528 +9897 +12465 +29552 +25949 +2337 +29973 +9138 +26547 +5229 +649 +26190 +14372 +11347 +20896 +8601 +10226 +19346 +30886 +21697 +11536 +27317 +7132 +7230 +13436 +5399 +28915 +12918 +11740 +22583 +29131 +14511 +3159 +31039 +6764 +21562 +14518 +7375 +20037 +27614 +12476 +19726 +16549 +4483 +20419 +2547 +31864 +25632 +31896 +20433 +26435 +30182 +14488 +16417 +23393 +686 +19467 +22677 +13695 +672 +3008 +25689 +29014 +25893 +29674 +5036 +12712 +16 +5179 +26016 +20350 +32520 +2367 +20525 +19616 +24376 +32506 +21117 +17748 +17211 +30917 +23923 +15708 +11074 +23142 +15997 +25642 +23943 +28271 +30875 +11366 +2807 +26073 +14256 +21155 +31771 +3296 +18953 +12125 +21064 +12577 +19499 +28726 +10503 +29938 +29410 +5233 +9159 +3074 +8070 +18607 +13250 +7474 +10896 +32234 +8748 +17843 +4190 +22447 +10915 +31072 +27715 +19872 +12755 +15453 +28115 +7209 +25705 +29169 +13421 +24706 +19003 +15522 +15625 +31718 +6581 +11151 +20036 +6673 +22407 +12562 +3753 +30464 +3725 +7830 +12609 +16356 +11262 +8629 +25695 +11112 +19417 +32407 +28325 +9509 +397 +903 +9819 +10338 +26855 +29142 +12017 +9744 +2881 +22517 +10450 +4613 +25833 +6349 +16235 +29561 +5840 +7266 +16764 +5310 +4212 +26025 +12190 +11844 +15887 +2471 +27925 +10445 +1793 +17355 +32472 +21228 +10363 +9100 +1247 +9668 +14445 +3910 +22956 +29951 +23731 +6226 +1053 +9741 +635 +23653 +26480 +19102 +8697 +28715 +23959 +14946 +23119 +3876 +10174 +2048 +29111 +3262 +24859 +27989 +1523 +17076 +24565 +2798 +30966 +30886 +12536 +5832 +26068 +250 +6327 +22087 +10727 +1778 +18306 +32628 +20035 +18958 +11115 +23931 +23900 +17060 +3219 +21604 +28918 +27582 +24506 +8209 +1102 +11828 +31495 +27257 +22151 +10506 +6420 +5412 +26967 +21260 +22077 +20966 +26610 +12712 +5162 +26335 +566 +8460 +28571 +14771 +2073 +27008 +13427 +32263 +20816 +7686 +31752 +9020 +15682 +47 +25002 +23919 +22316 +25920 +31089 +26033 +27285 +22662 +30028 +19844 +5108 +30455 +9287 +406 +6560 +16394 +14364 +22465 +6393 +22488 +31997 +17474 +21461 +30324 +28577 +4665 +10797 +135 +23949 +15202 +3081 +1328 +31653 +15122 +28585 +7451 +7922 +30837 +6133 +26335 +949 +9222 +14119 +7326 +20141 +9295 +14775 +32471 +13478 +28131 +17799 +4239 +29763 +25241 +14671 +24737 +3596 +5130 +14412 +23649 +26299 +1357 +3620 +26488 +16323 +18418 +30493 +13563 +12834 +4157 +6271 +7630 +5993 +7332 +13639 +28729 +3336 +3211 +27405 +29896 +32223 +574 +823 +9320 +24067 +11311 +9312 +19391 +1229 +4466 +28675 +6091 +20777 +15735 +22636 +18367 +1053 +9990 +15072 +27 +32152 +28288 +2571 +31498 +18301 +20308 +5291 +4608 +6896 +24768 +13436 +23700 +19424 +458 +29027 +24731 +18133 +3198 +25822 +3974 +3324 +11369 +27051 +3326 +23152 +29782 +25527 +31422 +25291 +3912 +11339 +17840 +20461 +10423 +28274 +12363 +28427 +26639 +32685 +5676 +14332 +7015 +218 +9459 +6848 +28031 +21346 +1633 +16210 +17148 +11938 +14255 +9136 +6887 +24988 +2609 +17447 +3683 +3295 +2347 +14820 +19374 +24756 +16628 +31672 +10331 +11146 +9033 +11563 +9933 +17572 +1268 +10181 +2808 +7937 +28830 +10904 +23124 +4236 +19184 +23570 +25378 +6533 +1009 +2561 +9955 +14383 +20892 +21479 +17429 +5307 +12225 +11137 +15153 +4468 +8478 +22418 +10977 +2861 +28093 +25845 +24454 +21992 +23184 +12770 +20970 +16840 +5707 +32640 +28994 +13369 +22403 +13740 +21608 +8541 +26629 +17672 +11862 +29114 +6520 +21320 +8678 +8227 +24373 +7609 +20680 +7140 +2406 +15890 +16836 +15153 +23902 +15744 +31282 +18897 +1849 +8684 +26295 +6 +8373 +24975 +28481 +28097 +18767 +26809 +21061 +9732 +2977 +7645 +9016 +13975 +3067 +4065 +2124 +14318 +15425 +15013 +4973 +346 +4357 +3537 +21115 +19824 +29669 +8676 +29384 +23223 +28454 +18298 +5077 +21653 +20113 +23774 +9545 +4220 +12686 +5584 +27699 +27472 +19071 +8600 +2945 +21276 +18272 +23371 +11200 +18678 +8092 +28764 +7702 +26416 +17202 +10599 +5757 +14272 +26376 +16698 +22850 +26354 +27279 +30245 +30653 +7756 +4761 +16772 +30802 +5058 +5495 +24970 +1448 +6427 +13399 +8527 +297 +14243 +24028 +2845 +5306 +9234 +5630 +28919 +8124 +5820 +7973 +30571 +6979 +21499 +8321 +3738 +20886 +28890 +17837 +1413 +1255 +8195 +4996 +9114 +24915 +4843 +28226 +29822 +22045 +15164 +3295 +12829 +12839 +30851 +21929 +30960 +8114 +32282 +24608 +12942 +23383 +32088 +6167 +25206 +16965 +24568 +15880 +16667 +5053 +7879 +16567 +20785 +459 +146 +11274 +23351 +27974 +19791 +10536 +31557 +26890 +16779 +19409 +11544 +24693 +19987 +10494 +603 +32032 +28646 +29369 +28472 +10207 +11355 +5438 +22815 +16635 +32143 +4435 +21462 +27566 +15122 +4069 +14530 +2272 +19153 +27364 +1140 +15649 +9798 +10080 +9847 +7655 +32735 +7397 +12120 +25097 +5293 +17939 +2295 +12667 +30286 +30338 +9486 +28747 +22813 +29141 +19967 +8413 +12952 +8220 +1506 +14691 +13329 +23408 +8143 +2207 +28057 +4809 +32616 +1501 +9513 +15907 +10923 +10283 +11794 +24529 +6646 +8412 +19624 +3873 +29276 +5436 +29227 +18481 +5671 +13205 +23798 +32017 +14253 +16226 +26859 +9242 +23128 +28882 +7197 +16270 +28145 +17281 +15296 +6769 +28716 +4210 +30030 +13991 +16505 +3920 +26619 +10319 +4618 +6885 +6748 +23135 +10273 +21723 +10323 +30848 +18588 +1203 +13630 +31276 +4290 +19971 +28256 +2822 +6224 +6644 +10639 +19578 +3775 +20475 +27679 +11413 +16088 +14807 +26127 +20006 +9339 +11980 +11634 +15894 +171 +25118 +17953 +29189 +6110 +28880 +16799 +19495 +1668 +2718 +845 +8285 +22486 +21048 +29903 +30359 +19169 +20673 +14013 +1641 +29138 +6280 +6542 +10220 +6019 +29446 +27330 +13784 +5958 +13848 +25168 +7391 +4850 +7293 +15439 +5196 +13100 +15763 +19176 +15324 +24056 +78 +3195 +6877 +3968 +9593 +4624 +15493 +16675 +17713 +16897 +26005 +2753 +23455 +17126 +7982 +27206 +16629 +6849 +4851 +23925 +10411 +20075 +29793 +14838 +1019 +3390 +29547 +28579 +25499 +13572 +29785 +8463 +13498 +14880 +2274 +15960 +30014 +16379 +26249 +3631 +15164 +28082 +22069 +20773 +11191 +19197 +22804 +27448 +15517 +12643 +32433 +16286 +24063 +7580 +10324 +10960 +26256 +27974 +13722 +18138 +24417 +21709 +22101 +26083 +2780 +6548 +32167 +28408 +17150 +23656 +12889 +2333 +2777 +39 +14465 +16534 +28489 +30893 +20565 +4722 +4854 +3583 +1609 +2649 +394 +24507 +20592 +24216 +9780 +13504 +29970 +13930 +350 +25369 +30345 +1673 +31146 +23599 +97 +12277 +25651 +10544 +4528 +19716 +8193 +25530 +24754 +22699 +24781 +30412 +13225 +7179 +1271 +13295 +10996 +3647 +4806 +2209 +14446 +4709 +14559 +24578 +16394 +16363 +28167 +31938 +7596 +8475 +3101 +22346 +3146 +5098 +595 +19497 +10819 +14589 +31404 +9922 +5887 +7421 +3771 +21556 +26057 +2076 +26522 +19082 +25065 +8168 +25897 +28708 +24581 +18256 +10376 +3941 +6330 +26868 +7639 +8862 +18550 +6065 +24877 +1083 +4249 +12653 +6871 +20269 +21964 +28703 +11986 +31639 +6048 +5411 +23435 +956 +32107 +6845 +9173 +7464 +5216 +6123 +8235 +21022 +31470 +17008 +4904 +1858 +30042 +15133 +23877 +14727 +10144 +4194 +11218 +92 +28806 +8982 +32566 +8210 +8706 +22915 +25707 +14481 +4814 +19638 +32180 +23612 +17737 +23557 +13985 +6945 +8082 +21217 +16198 +20069 +28895 +3293 +10935 +12271 +16419 +17407 +19656 +2644 +8160 +30023 +13059 +3331 +842 +1918 +21738 +4274 +20637 +8257 +22382 +22536 +11456 +21325 +32687 +6283 +15387 +6157 +12534 +22477 +21685 +12641 +4592 +26835 +23954 +29617 +13613 +5574 +22348 +5426 +24793 +16861 +18928 +29816 +20921 +3978 +5148 +317 +5481 +22243 +22358 +13168 +22484 +30804 +32174 +15489 +16372 +22403 +5272 +24300 +14284 +2692 +30980 +6148 +15267 +2366 +4287 +2050 +3202 +26909 +3342 +17485 +25072 +28922 +29320 +12 +30445 +4423 +25140 +14058 +3628 +3199 +24548 +17961 +18837 +23501 +4561 +8170 +28923 +7163 +13688 +1211 +1050 +3742 +17844 +28513 +13269 +31616 +3612 +7912 +7853 +32334 +10143 +27369 +27781 +3203 +6751 +19995 +9620 +16276 +8395 +21277 +24747 +12125 +18431 +20355 +9385 +26827 +26976 +6431 +6460 +19659 +14707 +8593 +25306 +25459 +26623 +9233 +17919 +28528 +3427 +20860 +28072 +19888 +24890 +9885 +28943 +27984 +30253 +22718 +29865 +27592 +30487 +1136 +606 +8533 +8544 +2711 +29960 +10663 +30867 +18360 +4910 +13516 +28482 +4487 +13570 +11356 +284 +9900 +4504 +30950 +31308 +31958 +3945 +29595 +26644 +6402 +13320 +20537 +28330 +24077 +3875 +2875 +83 +32121 +15549 +10303 +12734 +30332 +23210 +19639 +10147 +20303 +3403 +724 +22940 +29876 +28555 +12463 +9795 +27593 +2586 +4026 +29837 +16909 +11753 +12391 +24167 +26544 +19942 +22038 +8335 +24607 +13305 +14148 +19380 +29904 +11583 +28147 +29393 +22091 +2438 +9300 +21191 +22393 +2569 +18876 +12089 +12081 +7021 +23494 +24749 +27649 +30459 +4036 +20448 +1593 +1824 +26731 +23146 +15422 +11042 +960 +23699 +9485 +13860 +11581 +23668 +9486 +17757 +73 +4690 +12571 +18837 +9943 +18999 +3025 +24545 +92 +23250 +26902 +21919 +15607 +11665 +9195 +29620 +14556 +5116 +29300 +27909 +9217 +26197 +17477 +3124 +16909 +10094 +14063 +31900 +20093 +10698 +19658 +19087 +20761 +29176 +20997 +30415 +28310 +21035 +7149 +14666 +397 +31518 +3706 +20251 +1948 +32295 +5152 +28605 +11994 +31898 +29651 +17809 +3969 +97 +12636 +1428 +24022 +14809 +25563 +601 +8285 +7919 +11933 +22093 +13883 +10107 +18465 +300 +14827 +8924 +15205 +5310 +3109 +25301 +20342 +19671 +4875 +14248 +16695 +11918 +31126 +31089 +15217 +2749 +31553 +6853 +14619 +32697 +2036 +139 +15852 +22099 +19507 +6937 +4383 +22031 +27015 +31891 +26246 +27811 +27437 +26753 +8658 +17587 +17149 +6320 +8225 +10188 +23198 +13131 +13257 +18335 +1256 +11833 +15972 +19071 +23450 +7097 +5404 +14108 +21821 +7228 +6968 +7041 +8024 +29059 +16103 +2892 +2261 +28409 +17485 +20782 +2227 +17235 +2764 +28579 +11502 +22374 +14484 +19698 +32172 +15944 +30829 +9831 +8361 +29354 +13764 +9935 +18660 +23925 +757 +15413 +16011 +24996 +5592 +2268 +2852 +26978 +1678 +2942 +5630 +12388 +15501 +23235 +15575 +18312 +13802 +4100 +13519 +3503 +5350 +15680 +16268 +6615 +8124 +2655 +175 +21117 +7850 +21927 +32631 +11826 +17470 +29564 +8372 +22908 +3043 +26973 +9455 +15856 +15019 +16411 +30424 +9869 +28255 +18779 +22000 +32090 +26308 +29774 +10615 +24131 +30000 +3504 +1944 +31537 +15950 +1791 +15572 +3433 +14894 +8445 +24492 +20520 +7824 +5481 +15506 +16507 +8050 +7161 +9746 +7780 +12759 +26268 +30012 +27434 +15578 +28910 +18006 +24833 +25844 +16123 +15808 +8155 +23946 +26424 +24871 +2958 +27834 +959 +20718 +5927 +3431 +26315 +28121 +31117 +23427 +11891 +14076 +1882 +13980 +5035 +27619 +11766 +18090 +4216 +16131 +19445 +20247 +14707 +9313 +25267 +31760 +26241 +2177 +23854 +5643 +1745 +31633 +26660 +18329 +15383 +7383 +5997 +24942 +6407 +21080 +21659 +18606 +7956 +6346 +21200 +31610 +22378 +30652 +991 +22459 +9001 +26116 +19110 +4142 +7908 +10857 +26282 +31664 +13658 +1170 +21749 +10956 +15731 +10798 +8749 +28546 +16254 +25701 +27126 +17242 +15786 +22911 +32649 +14249 +7106 +20180 +31637 +23587 +557 +28403 +11094 +18338 +22565 +24598 +7412 +12086 +12599 +14022 +17694 +14189 +18940 +4299 +31207 +27620 +28694 +25686 +16096 +2318 +29037 +20338 +7799 +1092 +28331 +29608 +3215 +32270 +11510 +10738 +3681 +2736 +17133 +6882 +9107 +31992 +15589 +1811 +11415 +8007 +5221 +19408 +19013 +1758 +5856 +28676 +29372 +28012 +6065 +17762 +14197 +15572 +2396 +27093 +30890 +14659 +23044 +13610 +486 +30066 +12072 +24316 +19437 +32057 +23714 +26848 +24527 +25173 +13025 +6354 +5959 +6011 +102 +4063 +13913 +17821 +25213 +18709 +6700 +1915 +16702 +3240 +31013 +14189 +4803 +9061 +28742 +15216 +16811 +22108 +22981 +31600 +21199 +1738 +10480 +28117 +9796 +27205 +18240 +26192 +28561 +14123 +11964 +4839 +16690 +19788 +15761 +21311 +18253 +9942 +32496 +22058 +3507 +7553 +25895 +10609 +27930 +20476 +12547 +10211 +31641 +13208 +613 +29086 +7269 +7732 +20002 +23197 +2762 +21608 +13601 +31618 +31853 +26613 +30895 +20646 +14016 +29293 +2086 +4958 +13254 +30751 +25535 +14736 +12809 +32581 +20660 +18295 +19416 +10097 +6809 +24499 +29126 +19765 +24060 +15764 +25696 +1554 +6204 +1448 +2350 +163 +30887 +6274 +14060 +5386 +11992 +21453 +21770 +4507 +12879 +28050 +27233 +4040 +16209 +21958 +30520 +23885 +1282 +18968 +13943 +17820 +16577 +2041 +8746 +18315 +17092 +18667 +22329 +828 +6133 +29967 +13414 +27725 +21772 +14313 +20615 +3137 +16109 +25463 +9222 +24879 +19524 +19827 +406 +9385 +15455 +4836 +14903 +1775 +16203 +28139 +2157 +10837 +27443 +2508 +7868 +27378 +31477 +315 +30056 +16011 +4613 +29417 +13163 +14526 +391 +22607 +20150 +32627 +19112 +2746 +16301 +15231 +23102 +8855 +25565 +20891 +14752 +7425 +27648 +28549 +12487 +29577 +28979 +14708 +5541 +4677 +3446 +9154 +17605 +22555 +4964 +17621 +32549 +3407 +16693 +11086 +10577 +31819 +2801 +1142 +10176 +6319 +22518 +7909 +21619 +24729 +20397 +5492 +18892 +25654 +4489 +11877 +32428 +8073 +29761 +15058 +28625 +4731 +10318 +595 +21102 +17188 +22951 +1779 +3084 +5720 +11451 +11605 +27552 +10870 +12976 +5411 +24558 +8301 +12507 +11704 +10013 +32527 +22400 +21262 +13212 +7322 +17355 +32489 +16948 +14980 +26894 +23109 +23918 +16263 +15677 +15101 +18984 +15341 +17575 +22974 +6514 +9245 +22775 +19500 +23471 +28007 +18282 +3922 +12521 +30988 +8786 +11855 +12916 +31121 +25036 +20799 +29127 +15942 +12222 +16488 +2198 +4369 +31508 +10150 +30261 +4736 +11835 +9753 +17961 +16399 +9437 +30220 +15376 +4278 +15583 +14633 +179 +21431 +7833 +13532 +3177 +15782 +6229 +2820 +19119 +20409 +10506 +15073 +13061 +1361 +5721 +30266 +21259 +29641 +10697 +5837 +1500 +18559 +28991 +16381 +21675 +20769 +7873 +30903 +15517 +31290 +25452 +18853 +21990 +28669 +25011 +11159 +6182 +19792 +4826 +21038 +14342 +1308 +15282 +7882 +23054 +29140 +19606 +18359 +5834 +14148 +18598 +32659 +3101 +25244 +4163 +10498 +30693 +29884 +10955 +25238 +6097 +17090 +27542 +30457 +19071 +22738 +3633 +32092 +11737 +19237 +9689 +13861 +14001 +8533 +31803 +28628 +32155 +18407 +15211 +54 +15627 +13337 +32547 +7630 +15536 +9710 +10557 +9601 +9744 +13432 +5490 +6273 +32356 +4197 +2132 +24187 +16822 +10445 +30090 +6148 +23353 +7739 +31052 +3393 +30441 +12281 +8479 +1238 +26723 +4001 +24529 +3857 +8967 +18145 +18615 +4440 +32588 +7054 +28198 +7632 +18787 +7660 +32560 +25423 +21775 +19772 +160 +16773 +4804 +32391 +15672 +19814 +25086 +29098 +18729 +20954 +7397 +16547 +13524 +6312 +6431 +5402 +19136 +1951 +6644 +20531 +29916 +24072 +28585 +4243 +9462 +7753 +16406 +17073 +23675 +28634 +13449 +10079 +12144 +1389 +2272 +31896 +24241 +21337 +14305 +13451 +25962 +8776 +16605 +26345 +5587 +18978 +17029 +26732 +8496 +8505 +26380 +13480 +9992 +27573 +23935 +5654 +10148 +22338 +23649 +14430 +30156 +20217 +27019 +4325 +957 +13197 +25410 +18839 +10094 +17335 +1689 +6646 +12805 +16611 +28426 +14947 +30356 +7196 +19280 +23980 +7192 +14133 +17287 +23767 +22196 +1593 +19591 +302 +25642 +7445 +25725 +6284 +26522 +30084 +29899 +16358 +127 +31036 +21795 +4125 +14567 +7255 +11230 +6402 +9971 +5123 +10146 +22186 +23951 +30062 +20021 +3317 +2162 +18668 +23708 +13657 +20312 +23915 +29816 +27380 +23678 +26649 +4769 +210 +8799 +15443 +2819 +11899 +15534 +10193 +1465 +32449 +2196 +16144 +14697 +27848 +20523 +9729 +24288 +23382 +9531 +8432 +6638 +21085 +18228 +31158 +21379 +11974 +12395 +1315 +16650 +12416 +9881 +21670 +5381 +4809 +27281 +24638 +5355 +6844 +25410 +13478 +4159 +18460 +24557 +29116 +29937 +5215 +19879 +9523 +31993 +27646 +31761 +19834 +12594 +19964 +19799 +4332 +15732 +15797 +28007 +30009 +20982 +29417 +27763 +8980 +3554 +29705 +22698 +542 +12089 +1728 +13106 +14610 +1002 +8901 +23657 +24114 +22574 +21216 +21341 +25586 +24103 +12347 +25737 +3556 +19129 +25579 +9171 +31204 +9128 +23231 +19906 +2437 +31474 +5960 +27652 +14266 +4975 +20009 +22816 +9929 +10919 +14496 +32631 +29293 +25588 +18773 +28545 +4682 +4313 +12131 +10566 +22679 +21153 +21412 +13595 +22791 +20796 +15426 +26527 +17400 +854 +635 +27893 +479 +17337 +18100 +30531 +6899 +12260 +20161 +11371 +14104 +3053 +14963 +12041 +16911 +10132 +31332 +24237 +32732 +169 +29951 +11098 +7544 +7840 +1490 +6207 +2489 +25458 +17176 +18869 +8830 +19894 +13698 +14968 +543 +26624 +28230 +29738 +30996 +24954 +10090 +26373 +32740 +3009 +23122 +15584 +11600 +14851 +30857 +17253 +31937 +15702 +13004 +18833 +28911 +31323 +31325 +3181 +24275 +21523 +10374 +3851 +27856 +26625 +30827 +31171 +4637 +22401 +16149 +23727 +8822 +6760 +3516 +29029 +12803 +5853 +10837 +14324 +23944 +31351 +2652 +2849 +17103 +4248 +15331 +2019 +13651 +4618 +26844 +25628 +31534 +10711 +24739 +4250 +7748 +11118 +21455 +16974 +7601 +13811 +11834 +16075 +2929 +16614 +15182 +2050 +25167 +19961 +147 +17212 +8207 +15403 +31350 +30552 +28639 +30760 +10076 +32327 +28923 +1509 +3303 +17861 +26016 +8055 +9096 +15194 +22068 +25909 +21573 +32656 +29876 +23311 +29901 +15478 +19549 +12077 +28089 +15189 +2462 +1483 +30501 +5553 +26174 +18004 +5999 +7556 +1481 +9661 +20558 +22710 +20033 +27173 +9751 +11232 +2307 +9131 +27980 +4162 +22519 +22158 +2663 +28930 +19196 +21131 +4069 +2983 +8594 +13172 +26261 +28630 +1226 +18189 +27682 +31307 +17771 +21548 +13278 +26395 +27238 +32528 +21970 +22312 +7036 +18177 +30724 +25829 +13358 +22825 +32264 +9292 +2789 +13490 +2762 +10780 +14434 +23586 +16538 +30296 +27497 +4083 +27513 +24061 +5289 +20086 +418 +20482 +30447 +5354 +9820 +4502 +26508 +7640 +6912 +19861 +19204 +6321 +19013 +4940 +6648 +5803 +22996 +8302 +31318 +10457 +28168 +4694 +14527 +27529 +3077 +23167 +11832 +31459 +17917 +4673 +24085 +3263 +7615 +2510 +22563 +11206 +18817 +11884 +11029 +20429 +18158 +9205 +29489 +20334 +26739 +11660 +20795 +26344 +18631 +16801 +21922 +20537 +20665 +25896 +11241 +10362 +15166 +10773 +4697 +7802 +17338 +27931 +27109 +9886 +27279 +11942 +27229 +12281 +31716 +8983 +18135 +5799 +17591 +22079 +20059 +20335 +8742 +32286 +21710 +2201 +22265 +22749 +28705 +15372 +21364 +12809 +21946 +28332 +23388 +27410 +25634 +6386 +13896 +8964 +9457 +29902 +22058 +22916 +21239 +11450 +8221 +10509 +12460 +10271 +17265 +29804 +15066 +28908 +19189 +9082 +905 +28276 +21636 +19226 +16683 +29065 +6866 +23666 +24073 +19927 +15736 +14190 +5101 +31875 +29502 +15474 +24593 +1028 +4777 +14686 +23368 +8513 +7366 +19911 +17003 +28140 +13877 +8820 +15110 +30 +14968 +4120 +8260 +16179 +21885 +4431 +25624 +27112 +20331 +7131 +20653 +2484 +30378 +15648 +13841 +20324 +21557 +5597 +20509 +5370 +5668 +4397 +28839 +199 +23668 +29373 +14828 +1478 +21530 +6223 +30007 +15676 +19528 +2672 +20951 +21902 +12799 +14454 +6208 +4706 +7638 +31676 +7552 +6650 +24585 +15905 +741 +3021 +14020 +24511 +3565 +7271 +6834 +14313 +9326 +12930 +19905 +19815 +14598 +16742 +6201 +8693 +13254 +23678 +24573 +11513 +8986 +16444 +1568 +24965 +16636 +19502 +13995 +23437 +6233 +10849 +5805 +4201 +22211 +8182 +31876 +7822 +5721 +17155 +7787 +6281 +11252 +4525 +25413 +26429 +17811 +9859 +16809 +8030 +25865 +1564 +22830 +26157 +741 +16885 +12792 +16757 +26018 +27781 +20099 +28358 +30992 +6818 +31663 +7664 +12802 +28184 +2829 +10947 +19001 +25991 +25449 +12806 +24721 +28029 +5016 +7606 +18794 +28373 +21379 +1153 +7001 +22095 +8052 +30850 +17424 +20849 +22944 +8509 +12683 +15517 +7670 +15582 +23421 +32372 +13351 +25774 +14586 +19562 +19446 +12502 +28262 +5290 +28610 +5977 +16285 +2348 +22865 +8779 +4707 +2068 +5342 +22871 +3343 +23887 +7782 +31345 +7540 +6505 +25904 +24023 +29712 +31152 +24987 +8526 +16248 +7567 +10540 +30363 +13315 +1316 +11480 +12607 +11190 +5412 +3470 +28536 +27248 +7153 +13064 +31348 +21078 +5113 +4307 +14808 +5249 +8018 +17821 +22129 +10727 +30867 +191 +26681 +8327 +21750 +23051 +19342 +2265 +29611 +2007 +31150 +3957 +22143 +8010 +118 +3842 +24494 +19174 +30043 +9826 +20741 +9046 +32681 +7964 +26684 +5754 +22012 +12297 +5266 +2225 +19196 +26690 +426 +7270 +17757 +20042 +29605 +19421 +16150 +32632 +12417 +16703 +10208 +23464 +29362 +6372 +18162 +2339 +8447 +31201 +30716 +23755 +18334 +12499 +24418 +29323 +3731 +14570 +29114 +510 +10566 +24377 +27272 +15198 +31587 +27708 +3641 +14512 +28407 +32682 +21341 +20270 +14280 +2685 +20265 +19700 +32757 +4928 +301 +28399 +14799 +12440 +23121 +6915 +4854 +26134 +6934 +10876 +17592 +20284 +25868 +20663 +15782 +17613 +7054 +27153 +24696 +26714 +28614 +16144 +21539 +16906 +13277 +2001 +8505 +23721 +20865 +15282 +6273 +3060 +32669 +31040 +16086 +18723 +4948 +4706 +14917 +20920 +2111 +2247 +31842 +29831 +7144 +1678 +9707 +14598 +6278 +7989 +24480 +19671 +11003 +25796 +9314 +25492 +24588 +7482 +14475 +29914 +9440 +9272 +19085 +1176 +26299 +17644 +30925 +24985 +11771 +6209 +14530 +1616 +20563 +13125 +23369 +2020 +5703 +12762 +10828 +16252 +28648 +27041 +23444 +6604 +5330 +20771 +21739 +14560 +11107 +26434 +32118 +21544 +21309 +9951 +6225 +709 +12030 +21197 +25707 +23571 +18751 +9718 +32165 +6775 +28875 +13260 +15142 +11370 +26657 +1267 +1793 +24518 +1068 +15404 +27403 +4945 +5697 +20357 +20214 +6791 +15706 +8639 +9138 +16301 +31377 +2048 +30725 +4115 +9440 +1978 +12905 +24232 +6167 +22747 +27686 +10436 +15134 +30774 +10672 +18738 +14701 +22065 +27715 +9597 +3017 +28080 +22717 +16765 +11329 +20290 +28604 +25889 +4456 +27787 +4856 +16510 +19668 +12273 +21474 +14873 +26839 +11403 +18302 +21361 +24957 +29254 +23422 +20432 +21702 +21081 +26784 +2388 +17957 +8172 +32329 +8248 +4409 +14596 +9058 +28776 +26570 +25522 +2163 +31045 +30471 +19324 +26367 +9142 +4094 +11020 +2591 +4719 +28508 +28184 +15458 +26758 +103 +22417 +5860 +12851 +14137 +30735 +28076 +23527 +24127 +124 +21835 +25488 +29426 +15616 +32179 +12332 +28116 +17453 +24149 +15244 +4525 +9836 +28543 +31338 +7687 +10663 +27893 +11951 +231 +23864 +24013 +4094 +25550 +4626 +23952 +30340 +12273 +815 +25230 +29699 +26036 +14905 +32130 +1821 +25452 +31868 +20071 +21726 +30550 +19467 +10906 +5262 +22739 +18738 +12337 +6581 +25830 +28 +17050 +10350 +14832 +28357 +11384 +32753 +3754 +20259 +25274 +18268 +24675 +29072 +9470 +18626 +21628 +13179 +30501 +9846 +26913 +24144 +12343 +30361 +20809 +31397 +6777 +28898 +6129 +25510 +24780 +6829 +26261 +9922 +17737 +7495 +2799 +31639 +23834 +12920 +6131 +24603 +19867 +21330 +15882 +9484 +18098 +5433 +13967 +30363 +13932 +24884 +24200 +11604 +29145 +29043 +23718 +29521 +20266 +16672 +28287 +2463 +27912 +23146 +14602 +14833 +9015 +11984 +14427 +16516 +22635 +26027 +10913 +14930 +14699 +19711 +4701 +25466 +3428 +22659 +11236 +12783 +9104 +23278 +29208 +6240 +5639 +25988 +3683 +32104 +24037 +31201 +20468 +13047 +29854 +31237 +1598 +31233 +32414 +673 +23213 +24165 +15140 +7073 +1451 +30496 +13664 +27386 +31443 +22194 +29388 +21942 +26741 +14288 +6856 +15165 +9802 +12877 +21369 +14053 +28536 +1091 +20451 +5053 +969 +15237 +19269 +24214 +3112 +19274 +28085 +16979 +24157 +23058 +22012 +6771 +31754 +21469 +17588 +26588 +26854 +3212 +9376 +5098 +13368 +32407 +27724 +11704 +20886 +29169 +5349 +3502 +7391 +5944 +8795 +2891 +9591 +25377 +30901 +12596 +7362 +13860 +31412 +7038 +995 +7267 +11691 +27704 +29878 +12769 +24222 +573 +8716 +30432 +1178 +24120 +27430 +8346 +23636 +25080 +7796 +12837 +30981 +22006 +18318 +27041 +18053 +24868 +9331 +19876 +14502 +24312 +7682 +26343 +9172 +16313 +24503 +29233 +31466 +24329 +27303 +5764 +28247 +31924 +16317 +27526 +10353 +17336 +32054 +23603 +8985 +2964 +2907 +12738 +21137 +16342 +13439 +21204 +8602 +6623 +17464 +740 +31441 +6394 +2529 +11755 +23372 +25757 +23120 +3154 +10864 +1278 +27860 +11038 +21269 +7641 +12147 +9303 +23006 +6017 +28258 +5049 +27858 +25125 +27333 +5022 +10303 +16229 +15528 +20011 +3281 +15893 +7229 +28346 +25325 +21584 +28247 +32648 +1876 +17345 +12327 +32672 +23797 +13358 +7735 +15623 +24594 +12358 +12965 +16169 +5784 +28843 +22176 +19843 +22968 +8515 +25384 +24211 +13513 +3260 +19713 +31485 +21858 +23134 +6137 +24830 +18611 +18965 +27996 +29718 +548 +6846 +29109 +17649 +26418 +1713 +13766 +15767 +23686 +656 +24266 +15829 +4183 +10832 +25066 +13291 +32257 +2181 +28413 +32119 +26342 +9202 +26244 +7330 +15493 +32593 +30437 +3465 +14298 +30559 +15592 +18413 +6645 +11051 +879 +14623 +20958 +23201 +32378 +16935 +936 +26450 +7515 +1588 +11475 +25478 +20534 +5448 +25063 +23428 +23740 +16164 +24911 +17696 +7720 +6769 +30579 +16774 +19577 +3121 +28698 +7495 +9970 +23398 +4350 +15009 +7632 +7425 +22961 +21011 +22347 +1037 +1200 +13602 +11216 +25116 +1477 +32613 +30076 +25586 +418 +25047 +20188 +22129 +31419 +29790 +7396 +32708 +12132 +14742 +45 +22736 +25899 +16612 +2419 +13015 +7544 +4792 +19791 +5486 +28515 +21282 +13105 +24738 +726 +18072 +7073 +32615 +26852 +9478 +14774 +13889 +19816 +26391 +15319 +23093 +15842 +31171 +8113 +31730 +398 +1049 +19833 +21308 +16070 +11086 +22115 +30362 +27034 +263 +29283 +11072 +14253 +2020 +6435 +22847 +5459 +31309 +21061 +28651 +22504 +16256 +6362 +18061 +10611 +15067 +28195 +17738 +27004 +24935 +30599 +25171 +32555 +16806 +17364 +16207 +22690 +27039 +5050 +29445 +5020 +22311 +16773 +19278 +2886 +24177 +9243 +4922 +18270 +13017 +2357 +10626 +2186 +32237 +8930 +29486 +28155 +12476 +1081 +30343 +28738 +31588 +2398 +10815 +11634 +5846 +18104 +17631 +17015 +19693 +23408 +6258 +11702 +27311 +17197 +18032 +30439 +2274 +783 +22509 +6191 +22227 +19946 +1539 +25729 +21346 +31684 +15996 +26422 +8274 +28817 +12484 +30955 +23503 +20013 +28431 +1435 +11329 +3483 +28614 +16382 +27216 +23420 +31544 +15905 +5432 +21459 +20862 +15174 +32079 +30968 +5295 +31486 +20691 +474 +17221 +2437 +30457 +23417 +20175 +21854 +25908 +31138 +6873 +24112 +23235 +21229 +28697 +29919 +11902 +9205 +12251 +18670 +6881 +21976 +21422 +16148 +13401 +9198 +1360 +19741 +30159 +23757 +23256 +22276 +3955 +23165 +802 +18767 +25546 +3576 +28288 +27818 +24315 +14822 +16286 +11975 +5206 +14487 +4278 +23669 +20005 +26944 +22774 +2303 +31672 +8314 +32302 +7880 +10667 +14328 +24254 +21796 +28794 +6536 +24511 +1913 +1352 +24909 +19313 +10646 +22764 +29499 +3045 +21843 +28990 +8147 +3563 +11626 +26784 +13345 +22590 +4502 +16335 +4339 +8943 +24554 +28140 +9563 +31503 +16243 +23238 +26727 +16033 +12306 +12138 +11807 +31934 +23443 +10477 +29632 +1546 +25618 +22904 +32568 +14679 +11152 +918 +28130 +22681 +20689 +31674 +3715 +29194 +23928 +15380 +8837 +10654 +24934 +5781 +25202 +28329 +30543 +12609 +25012 +27087 +28319 +14516 +11659 +12076 +5772 +29944 +17232 +197 +26236 +11398 +14824 +11567 +32665 +410 +14987 +22142 +17330 +13756 +9399 +11632 +32085 +32651 +31087 +27867 +21803 +24269 +27065 +8532 +4244 +6836 +9303 +2337 +21891 +22131 +16068 +6241 +28571 +26625 +21875 +28026 +21131 +23853 +16195 +16835 +21926 +23267 +28742 +8819 +25799 +17085 +26547 +32202 +8805 +19149 +17705 +20606 +14066 +29609 +24870 +32616 +18808 +2232 +1224 +10608 +23926 +5821 +7362 +32181 +4601 +1185 +929 +25089 +32247 +14981 +16193 +30061 +9712 +776 +19851 +15185 +18119 +4822 +23665 +31343 +29150 +25201 +2347 +7263 +13937 +17988 +691 +6461 +21557 +28901 +11134 +15250 +13105 +19370 +5757 +18561 +7388 +20848 +31572 +22579 +29304 +22439 +32218 +27268 +23726 +29090 +25809 +1006 +12395 +23070 +7143 +24246 +1274 +3856 +7404 +31830 +14179 +2996 +7253 +9003 +22275 +19666 +5362 +5216 +14188 +2899 +3820 +1563 +9086 +22789 +15875 +11750 +28103 +2987 +21253 +26463 +23065 +8777 +7313 +17188 +7274 +4270 +21261 +2553 +26864 +7490 +11238 +60 +20861 +15633 +4103 +30091 +27672 +6680 +4508 +27827 +32477 +12240 +32009 +26588 +11543 +10745 +8485 +9459 +24987 +29096 +10939 +22104 +29288 +5268 +12099 +9161 +14716 +29341 +17117 +32655 +7929 +23966 +13711 +7143 +20601 +6004 +21440 +3251 +8622 +23119 +17908 +24930 +21054 +22328 +27594 +17180 +13534 +22243 +20019 +25395 +29613 +26807 +1268 +17862 +28115 +19484 +11103 +13495 +27226 +4 +16461 +26320 +7244 +9404 +3424 +10032 +13326 +7157 +29047 +2300 +31228 +4878 +10866 +29508 +11846 +25508 +31272 +4404 +10763 +30300 +17061 +29308 +32179 +5104 +30120 +26625 +2194 +20600 +29532 +26821 +17851 +31995 +13399 +2836 +18977 +19254 +23249 +24048 +12276 +4011 +1830 +11967 +27451 +19949 +2957 +1843 +17326 +31531 +23322 +28538 +28630 +8956 +20467 +16552 +3432 +23146 +9423 +4961 +29406 +11585 +15796 +5835 +5719 +29081 +7153 +23475 +1457 +11681 +6489 +24574 +11236 +31663 +18115 +26194 +24482 +6277 +2495 +26118 +30509 +2022 +21914 +8008 +23928 +31578 +7060 +8077 +25729 +26429 +20064 +16958 +20718 +29198 +5341 +31136 +23270 +10742 +2068 +27653 +8242 +11416 +6258 +12593 +17301 +11544 +30278 +15375 +13673 +1134 +6526 +15509 +24955 +14316 +17566 +1524 +15912 +8718 +7937 +17669 +30904 +10626 +16980 +4848 +15098 +12920 +22352 +12318 +17953 +13868 +7607 +29538 +24286 +11440 +31634 +14691 +18111 +13567 +28585 +24653 +16072 +10047 +835 +7096 +20304 +32086 +5919 +11480 +20766 +15793 +10163 +19174 +29636 +21585 +25763 +18383 +15675 +1559 +14213 +15644 +16063 +27216 +5588 +19746 +31469 +5764 +14898 +17515 +14619 +26747 +8419 +10083 +16888 +6801 +25478 +30791 +16741 +3644 +20501 +16715 +18834 +30939 +22304 +12042 +13149 +24257 +11589 +18227 +22503 +2178 +15348 +1906 +24440 +24189 +15713 +30877 +8598 +22186 +8138 +544 +21088 +24741 +3051 +2475 +31024 +31739 +10942 +11034 +27761 +25781 +1656 +5284 +20157 +547 +8896 +21320 +18748 +1003 +10290 +7029 +32569 +22865 +16148 +23032 +30469 +28361 +30039 +6443 +29713 +23994 +19410 +1628 +32326 +31381 +18106 +9084 +4776 +27926 +7525 +28937 +14636 +16090 +25919 +7229 +31703 +3106 +21517 +32120 +31512 +17126 +30050 +29419 +7014 +7198 +28511 +25479 +2077 +15180 +12974 +30245 +1942 +8269 +12737 +18678 +23686 +22370 +31560 +13614 +12441 +4986 +21489 +27372 +17487 +7874 +11108 +29037 +24598 +19823 +2173 +22386 +17065 +24267 +18636 +8174 +2216 +30846 +20299 +14069 +18808 +10271 +32350 +31457 +25950 +5883 +6417 +9670 +16599 +23589 +26509 +8985 +26938 +6334 +15067 +7579 +24209 +19078 +11229 +20876 +32436 +163 +12682 +28430 +19879 +24241 +27241 +6359 +5942 +6668 +13649 +19227 +9679 +23898 +30047 +14009 +2720 +15963 +7480 +23716 +13041 +12789 +23936 +30101 +18115 +10875 +4763 +29167 +3242 +19517 +19875 +7666 +20200 +25686 +5290 +13860 +32203 +3505 +13873 +30716 +2889 +12382 +19432 +31441 +15321 +18196 +18600 +23811 +26772 +5894 +11695 +4456 +28301 +17899 +17179 +22778 +18285 +31304 +28584 +13502 +1875 +29184 +2990 +23543 +15339 +15135 +19285 +652 +26828 +31459 +7196 +31671 +7448 +28428 +4490 +1264 +24142 +5478 +15666 +17689 +25715 +9619 +3565 +19435 +25442 +18718 +4692 +7584 +23919 +15805 +14972 +5858 +15171 +19943 +29941 +13555 +9459 +19351 +17157 +3614 +22627 +31070 +8225 +1631 +30939 +3503 +22701 +3150 +5095 +15463 +11253 +27218 +22388 +29339 +21868 +30723 +13608 +12455 +22820 +14303 +28417 +11892 +12173 +11569 +18738 +13833 +11378 +30270 +23866 +24661 +15665 +30387 +19015 +8251 +23098 +7755 +16074 +18399 +18378 +6085 +5979 +29744 +489 +27653 +3791 +2742 +28578 +25993 +15255 +13725 +14722 +16399 +22108 +2563 +24404 +28805 +1497 +17534 +26907 +4401 +11256 +18418 +20304 +15905 +28720 +19089 +30301 +28117 +798 +23859 +22873 +4651 +22370 +14552 +16390 +3468 +19388 +32379 +7176 +18517 +616 +21785 +26984 +29321 +25015 +4610 +11849 +15796 +31214 +22368 +30185 +6946 +19556 +21765 +25307 +19009 +12246 +6009 +13443 +17236 +19982 +4420 +23506 +19034 +30389 +19064 +31555 +13886 +17268 +25218 +28182 +14400 +18770 +20531 +13004 +12195 +21322 +3082 +21732 +21912 +25132 +4292 +12756 +19818 +28086 +24103 +13642 +25836 +8946 +27146 +26788 +4384 +7122 +11177 +29101 +29481 +19466 +11560 +23706 +29043 +7983 +20325 +19780 +12576 +1037 +11266 +29608 +31670 +24909 +16819 +24476 +23816 +12104 +22213 +4052 +1378 +13094 +15855 +22549 +15352 +5947 +26973 +31415 +28049 +23715 +30715 +4449 +9072 +25116 +10495 +8449 +28291 +31779 +25017 +29962 +4815 +23122 +12703 +7666 +32539 +13817 +148 +12011 +23772 +1532 +21369 +5856 +17504 +13293 +21238 +12467 +24895 +3690 +138 +26294 +4863 +29880 +17873 +1383 +22023 +30624 +18965 +6513 +198 +27530 +14873 +29919 +8484 +10200 +28193 +14243 +1576 +28549 +6725 +30535 +16875 +16127 +29944 +25073 +12222 +31554 +32724 +30878 +19096 +15925 +24232 +15511 +24514 +15433 +26820 +27704 +27077 +32592 +24708 +10977 +8084 +29339 +32026 +12349 +1014 +31832 +12961 +23218 +311 +8234 +25696 +16681 +23823 +26377 +27995 +8192 +4307 +2141 +11040 +15692 +20954 +4182 +30416 +8275 +22066 +32655 +14443 +14409 +8580 +8163 +97 +20043 +26181 +2702 +21335 +24218 +18207 +7048 +5174 +13593 +1183 +19999 +14458 +26888 +25375 +16083 +12986 +5123 +21750 +20086 +16243 +24630 +13535 +8837 +25 +18914 +7335 +32449 +4192 +12309 +9243 +13329 +455 +4261 +5169 +8348 +26982 +2927 +23158 +32034 +27641 +2254 +18615 +29596 +29742 +8030 +27892 +15124 +32556 +5362 +3457 +13510 +11108 +5843 +5502 +18040 +30108 +1340 +32122 +28183 +20536 +28179 +31843 +19091 +204 +4840 +3249 +5628 +28639 +5683 +4563 +19678 +22274 +11210 +10713 +32473 +30994 +26785 +30564 +1157 +20681 +3527 +28619 +5765 +24972 +27293 +31119 +489 +5744 +12888 +26369 +30153 +23437 +24762 +6450 +9760 +23944 +2572 +22299 +16359 +7003 +12896 +9486 +27250 +13928 +2053 +10332 +21007 +11454 +7499 +25416 +30684 +27051 +32120 +21804 +17129 +22658 +14602 +19178 +3727 +26030 +17712 +27542 +12816 +6647 +19075 +19809 +15728 +15380 +16137 +7880 +26515 +9330 +26476 +12287 +27032 +12100 +7031 +26776 +17269 +30923 +27090 +30072 +9683 +20455 +30462 +15100 +32044 +2783 +13204 +22375 +23075 +10861 +17850 +16783 +13091 +30478 +16870 +20424 +15164 +1160 +3799 +13073 +19002 +18363 +4304 +12926 +4615 +10925 +30743 +13029 +7491 +19153 +20143 +22220 +21282 +19864 +8529 +17043 +31877 +30522 +24497 +20702 +1628 +28614 +20463 +17222 +32059 +25192 +12635 +15168 +32315 +25339 +27245 +1869 +6420 +17871 +24068 +4195 +24440 +21948 +17375 +29595 +7602 +5223 +8281 +5149 +30847 +28884 +14185 +12617 +27693 +8237 +5850 +19751 +26866 +1233 +5062 +28433 +2191 +20384 +22361 +3743 +6437 +18309 +22212 +13011 +31063 +25414 +21120 +4486 +418 +8584 +14533 +15122 +30457 +19238 +1866 +7745 +17060 +2995 +2110 +28790 +27482 +3149 +1670 +17946 +2974 +31909 +21817 +26442 +16727 +13900 +18010 +11454 +21171 +26176 +27860 +28925 +1085 +26806 +17851 +25023 +23613 +17194 +9410 +15778 +20304 +26789 +32760 +18962 +4680 +13390 +30407 +3442 +3398 +17972 +12335 +6544 +11286 +11867 +27710 +29255 +1995 +4612 +25812 +23670 +9628 +14146 +22933 +8482 +18173 +8890 +25391 +4326 +1793 +13242 +27086 +21412 +16624 +27261 +23260 +20582 +31780 +17597 +31229 +14742 +22825 +23674 +26955 +2399 +15381 +13578 +17615 +31330 +12324 +25186 +27968 +18590 +16536 +30371 +24063 +18073 +17104 +25064 +10834 +4820 +19879 +12367 +32224 +31086 +23056 +21061 +15470 +19991 +18671 +23319 +7385 +19000 +19002 +25014 +23379 +15200 +24912 +28619 +24290 +3570 +665 +11003 +28181 +13 +1631 +9340 +20233 +2236 +27885 +31449 +28317 +16223 +12262 +14849 +27378 +20313 +7400 +9622 +7462 +17404 +30049 +22901 +32336 +14513 +20401 +27777 +959 +14700 +30081 +437 +20079 +24399 +15202 +29546 +18893 +30109 +3498 +1253 +5549 +13026 +11916 +17956 +22408 +21089 +24951 +5609 +20218 +6590 +32688 +28168 +18811 +5868 +12850 +26094 +20829 +8794 +19654 +6003 +13319 +29017 +1631 +20961 +15216 +17617 +2744 +18244 +14047 +37 +8496 +8181 +12001 +13411 +25830 +8289 +24714 +27568 +18960 +19743 +23537 +16627 +27809 +14642 +25062 +4033 +25627 +27291 +23799 +18569 +6322 +291 +4514 +13569 +21922 +2919 +25052 +14544 +5330 +13860 +16322 +23165 +16298 +16836 +11166 +8343 +24881 +27178 +22813 +3878 +1387 +11450 +22479 +20818 +16882 +6317 +23264 +23378 +9171 +5523 +31765 +4248 +32428 +19497 +5642 +14907 +22787 +7518 +4522 +22948 +29160 +21408 +17135 +9085 +7119 +31339 +12507 +11990 +26791 +2069 +25783 +9370 +25408 +17875 +7307 +31538 +20956 +8720 +31967 +2679 +15891 +22767 +7600 +989 +15852 +7966 +3765 +6878 +14905 +15070 +11987 +27045 +11827 +14160 +29406 +24061 +7255 +7682 +30610 +14968 +13440 +25274 +31441 +30691 +26437 +28034 +6175 +4842 +25237 +28404 +25691 +4616 +13202 +27335 +17600 +20402 +2474 +9370 +7452 +21700 +22268 +23296 +12623 +20268 +18922 +31949 +22022 +28885 +23546 +17569 +19641 +17110 +29171 +26290 +26339 +14555 +18740 +15582 +19585 +4308 +11863 +7408 +462 +19165 +14600 +17714 +2109 +17774 +2335 +2868 +14006 +18884 +16645 +14556 +9493 +5263 +14661 +17327 +18145 +9949 +10609 +19038 +4425 +27462 +16952 +1172 +18533 +31577 +29893 +4351 +20394 +4423 +25434 +19869 +6574 +29134 +14125 +9801 +4894 +23145 +22403 +1413 +9469 +16310 +15883 +21386 +10783 +26663 +25725 +12173 +29669 +12013 +1907 +20308 +14906 +31521 +14983 +12538 +4814 +14133 +2478 +2814 +19346 +21659 +9173 +9875 +17524 +10163 +19130 +4131 +9309 +10235 +1036 +18981 +1383 +24690 +18374 +28192 +29795 +7245 +10185 +26624 +24459 +7133 +11448 +14233 +20612 +24000 +25625 +25721 +3480 +18503 +23465 +4083 +32305 +16168 +1536 +20841 +28312 +29029 +17510 +18649 +3824 +27516 +4596 +5035 +18798 +14800 +3055 +4025 +19418 +10071 +21345 +6303 +24651 +25733 +1017 +11078 +28959 +8825 +15397 +7083 +21561 +28263 +29293 +18677 +14719 +22854 +5139 +31671 +22674 +14266 +10473 +23170 +14800 +1604 +30834 +8367 +13960 +15784 +27708 +875 +3196 +9119 +11133 +28931 +8349 +25534 +11245 +5746 +19714 +31910 +13283 +22312 +22058 +19821 +2483 +8989 +25459 +20301 +19527 +22294 +5850 +18315 +12540 +4919 +8181 +32171 +8895 +13258 +26158 +16850 +32360 +22606 +9793 +20347 +26710 +9412 +7928 +22622 +30540 +10549 +10534 +17309 +12428 +7048 +22242 +27953 +4402 +20354 +30214 +29077 +8403 +6430 +4583 +20913 +18773 +1296 +20566 +31497 +28689 +5012 +17879 +38 +3112 +24956 +7457 +3397 +13859 +27513 +11734 +25919 +27855 +22441 +24195 +29368 +2903 +29026 +28123 +14732 +11426 +17213 +32560 +13430 +30703 +31590 +1587 +27394 +4783 +1572 +28141 +19382 +13218 +2724 +5885 +5756 +4918 +13834 +2323 +25428 +13597 +186 +29613 +4407 +18221 +23012 +23057 +10574 +4476 +25934 +1675 +596 +13243 +14182 +8425 +12360 +11219 +15239 +1076 +3160 +25023 +12427 +12208 +24842 +13482 +26515 +28438 +1709 +17737 +12563 +5648 +31743 +31098 +9248 +27382 +18208 +29982 +11262 +7368 +10935 +1075 +2021 +24684 +31586 +12854 +10516 +4392 +8548 +2744 +6937 +28771 +4746 +16191 +25183 +24728 +20574 +11872 +31992 +14235 +13967 +2074 +29100 +1040 +9632 +2932 +6467 +25129 +21968 +6490 +3600 +15263 +24138 +6325 +28095 +3828 +15503 +26570 +22879 +6631 +26656 +22229 +24499 +823 +15983 +26598 +15797 +24477 +21256 +20476 +8556 +11780 +28668 +30047 +23280 +9995 +21134 +26435 +10170 +31677 +28705 +2714 +1073 +24464 +20321 +30777 +12147 +31131 +16817 +18480 +19809 +6428 +2261 +18019 +21229 +18730 +13537 +19565 +10408 +8119 +18017 +15542 +12166 +25545 +24778 +23250 +5109 +26361 +6433 +32029 +6942 +11820 +11498 +21397 +22139 +17809 +11603 +16376 +27034 +23515 +27298 +31518 +20015 +192 +11228 +921 +16992 +8882 +32439 +4491 +19789 +10205 +11202 +3015 +1503 +15969 +6867 +14891 +2003 +16337 +13233 +12604 +17159 +17388 +1795 +13060 +4355 +16027 +19320 +297 +15563 +17706 +31544 +23630 +26852 +22219 +7563 +11439 +32676 +17480 +2249 +4088 +6591 +4872 +10370 +18534 +1807 +30534 +5101 +18720 +26019 +16780 +150 +23512 +29452 +23414 +23876 +7070 +995 +12197 +8489 +16644 +19871 +6402 +6989 +31608 +28309 +13621 +20028 +21469 +24656 +13924 +9199 +21612 +16404 +4144 +1528 +29131 +6573 +7150 +9714 +29035 +8317 +4131 +552 +18727 +709 +26434 +29317 +13339 +17203 +4521 +18876 +30913 +17581 +3801 +22200 +7250 +29789 +18933 +21062 +32604 +15869 +21886 +1281 +8096 +13924 +25165 +12670 +31534 +10322 +3538 +3769 +20676 +28536 +25483 +24256 +14691 +19915 +11720 +28062 +22323 +9995 +29085 +1162 +5529 +20110 +12840 +7505 +13974 +21330 +22276 +25089 +10595 +30274 +21006 +17623 +26187 +14025 +24663 +15467 +19400 +8597 +618 +28698 +14561 +19885 +1983 +24756 +24771 +13238 +18815 +22887 +5023 +19329 +28794 +13547 +30915 +7130 +25190 +17135 +30204 +10380 +12891 +22980 +16427 +27320 +12427 +24649 +20773 +16216 +30022 +23575 +16081 +30735 +813 +20461 +12156 +31283 +23734 +30301 +26496 +6173 +10464 +9400 +11286 +4272 +17208 +25144 +30584 +24872 +21261 +32620 +14906 +21797 +17903 +14825 +9706 +247 +18798 +14383 +15591 +4651 +8209 +27097 +9087 +8791 +28053 +6154 +28237 +30755 +22119 +12820 +27089 +25241 +3684 +8809 +5968 +6830 +13007 +14279 +23278 +22288 +2963 +28319 +5898 +32306 +4027 +9927 +12506 +8854 +18735 +4449 +14920 +13658 +29617 +25355 +15628 +6918 +29464 +5705 +25354 +3733 +31947 +18991 +30702 +32449 +4224 +2387 +6 +20884 +7223 +1266 +24671 +14892 +26481 +4192 +21539 +3277 +8630 +26806 +11059 +15662 +12358 +5304 +3584 +29437 +5918 +26884 +17071 +24756 +6447 +31874 +12141 +18592 +27610 +6408 +5647 +23598 +6575 +29772 +17647 +24953 +28775 +15631 +14595 +19217 +5663 +18568 +27966 +11790 +8663 +27662 +21291 +16982 +21291 +20234 +12488 +22827 +17744 +16668 +24481 +30200 +14674 +24717 +10541 +30044 +21388 +7413 +15469 +28280 +26728 +25133 +30915 +14965 +13400 +30584 +2576 +20058 +6933 +24301 +4626 +21261 +18967 +16679 +23292 +10150 +23125 +12593 +20311 +14844 +19775 +21676 +13080 +24938 +248 +15426 +23043 +10210 +30680 +30800 +22335 +11574 +3874 +13775 +25147 +4258 +258 +28547 +27840 +3229 +19915 +32616 +9815 +12512 +26734 +7258 +26846 +26296 +16957 +4099 +19045 +11145 +4578 +12554 +20558 +11684 +29083 +28025 +32678 +14154 +12472 +29040 +18110 +5120 +29782 +13832 +31757 +23574 +861 +1162 +28234 +21106 +22968 +14801 +16838 +16546 +24276 +22013 +5895 +32034 +23388 +9306 +13995 +2026 +2610 +1935 +15995 +26939 +24753 +13835 +3022 +16043 +27170 +29356 +24353 +8815 +21116 +3506 +29940 +22761 +31841 +14820 +4071 +28786 +15957 +513 +12309 +16233 +9025 +27241 +29617 +27772 +18983 +2828 +23776 +27958 +16679 +11667 +30934 +9930 +30643 +15310 +9267 +7454 +9231 +2654 +26784 +23579 +14348 +19364 +12197 +1844 +16645 +14057 +18126 +15157 +20250 +12238 +28926 +11854 +16300 +31222 +275 +14943 +1817 +17651 +14780 +15750 +21945 +7279 +28311 +31974 +13337 +2204 +8846 +30139 +29303 +27357 +8051 +18587 +1918 +25269 +17114 +11022 +14914 +18161 +31799 +2898 +13183 +32530 +14393 +21096 +21006 +18685 +13670 +28771 +24233 +14054 +32247 +7921 +31456 +29049 +758 +1578 +26459 +2635 +5270 +12184 +32081 +27265 +13267 +29576 +30537 +10687 +31050 +19601 +25873 +22868 +3418 +15714 +26364 +4003 +28029 +13520 +3167 +16340 +31457 +7199 +29006 +10685 +3658 +31632 +30611 +28171 +3372 +24876 +14064 +4789 +15363 +30160 +151 +930 +18935 +27770 +4582 +23449 +20910 +14290 +21095 +362 +19312 +12796 +14600 +25947 +11394 +8861 +13463 +27349 +12220 +20267 +13185 +19023 +876 +378 +9932 +30587 +22640 +12420 +7250 +22448 +3726 +14201 +19519 +21656 +31255 +18183 +13773 +5915 +32444 +31979 +10047 +30347 +31664 +19897 +19740 +26640 +17664 +11496 +9390 +31319 +9775 +7969 +28090 +10614 +10774 +8904 +30593 +5923 +9210 +6860 +25847 +29462 +13806 +10156 +17474 +8123 +20587 +6858 +5494 +24349 +26414 +28660 +7312 +5135 +22355 +31024 +6832 +25500 +15024 +10440 +19099 +17073 +9331 +9622 +15473 +15369 +766 +5522 +27819 +31322 +8962 +19097 +12888 +25278 +4059 +15744 +24728 +19300 +19756 +857 +14169 +6775 +9660 +10501 +32593 +22862 +2960 +8442 +27964 +2006 +17737 +12118 +10328 +15421 +25791 +37 +4125 +23264 +17118 +21487 +7490 +29303 +31937 +28294 +31213 +2176 +11790 +13326 +11577 +25065 +25746 +8269 +30189 +5121 +2333 +1076 +12411 +27041 +14751 +13743 +25656 +26774 +20611 +7594 +21467 +850 +5451 +20580 +11576 +17108 +21102 +7160 +13373 +29908 +19567 +14632 +1325 +10804 +22078 +2669 +18972 +4515 +32467 +5437 +32684 +31379 +5129 +8604 +9478 +3166 +30392 +11238 +29467 +32180 +31766 +5339 +30493 +22600 +22608 +15339 +11320 +5307 +20068 +28612 +28821 +6856 +8514 +24858 +29074 +29106 +547 +950 +27451 +11499 +30761 +2498 +22284 +24837 +32056 +25939 +26090 +11486 +19476 +31799 +24927 +8968 +7099 +31233 +20501 +8055 +17413 +27731 +31126 +21870 +1914 +5484 +9539 +8619 +32372 +8434 +12434 +27858 +24438 +9984 +22668 +10775 +8395 +10611 +21126 +15920 +12131 +30577 +4127 +23162 +14058 +9020 +19066 +6250 +14122 +30262 +12477 +24887 +25250 +3892 +21962 +28101 +616 +5895 +14653 +27349 +23356 +14152 +1958 +3436 +20462 +16228 +28168 +9089 +15602 +9193 +7314 +27882 +18753 +17424 +21660 +18568 +10354 +8586 +7653 +434 +2585 +30351 +32523 +18912 +12896 +22053 +21836 +10905 +30692 +17070 +10107 +31646 +8915 +26293 +4166 +10584 +26947 +23546 +7078 +22399 +1236 +11451 +13223 +11276 +7562 +31557 +30810 +20066 +1509 +31676 +7960 +26296 +1090 +11303 +13560 +10698 +9590 +30399 +24723 +15552 +21672 +10873 +32503 +32094 +13423 +30161 +14313 +31342 +29997 +20441 +25952 +10347 +9388 +31618 +27198 +7791 +13046 +4395 +21585 +26463 +10362 +14952 +25994 +13140 +18780 +3092 +24700 +30029 +8732 +10905 +13336 +14612 +14699 +9343 +25256 +15726 +25418 +12083 +16393 +7814 +29029 +12826 +25388 +7324 +15535 +19414 +26320 +19177 +17470 +15831 +21881 +13014 +23913 +27174 +23733 +14175 +12576 +20334 +9103 +17601 +651 +12108 +24659 +6251 +31462 +19160 +2437 +11556 +30364 +24948 +15900 +6009 +4002 +24020 +16644 +24169 +24855 +23886 +9171 +7252 +16410 +32100 +31946 +29729 +26090 +7055 +17423 +9903 +18244 +29518 +13353 +21631 +5370 +18031 +18876 +14239 +8656 +31645 +16007 +25049 +10652 +24363 +7067 +19229 +13725 +29216 +16094 +15404 +6683 +29571 +28607 +24967 +18752 +4072 +24379 +4759 +30518 +25403 +12049 +6429 +19331 +14540 +23617 +1245 +7073 +13723 +10443 +22407 +27361 +22758 +24742 +5350 +11138 +32497 +5630 +843 +32013 +21013 +12466 +10300 +25587 +22028 +27918 +19801 +13930 +31099 +9669 +6544 +14980 +22977 +1331 +2690 +12690 +9471 +31184 +23092 +19640 +18024 +2552 +7418 +18130 +18634 +25305 +9121 +8070 +7006 +16061 +28124 +13226 +9420 +32378 +14577 +11992 +20610 +4662 +30372 +4687 +566 +3425 +14436 +19725 +7098 +492 +23221 +8491 +256 +32462 +31965 +21112 +18029 +19898 +4306 +23129 +30050 +19482 +3940 +7393 +4873 +31567 +7335 +23340 +21853 +9261 +10403 +24321 +12924 +10673 +22591 +7079 +13873 +26372 +17003 +16392 +18877 +13494 +19853 +30213 +23014 +28979 +14639 +19224 +1859 +10378 +8166 +32304 +19654 +14175 +32133 +11978 +18570 +1326 +1411 +10572 +4831 +12738 +21930 +19622 +20371 +20981 +20738 +17707 +25987 +6057 +12029 +6317 +2147 +263 +2788 +16344 +202 +27383 +32641 +18641 +24193 +8928 +6926 +16143 +269 +21409 +14174 +21625 +8826 +27088 +586 +1985 +20586 +19250 +16990 +17408 +32607 +32123 +9157 +13714 +9285 +6215 +6514 +20532 +67 +7768 +7825 +16989 +2755 +6673 +25645 +20954 +9664 +6452 +14114 +23981 +2127 +25560 +10821 +294 +2929 +2734 +20691 +5187 +17688 +10357 +5400 +1350 +7543 +29370 +30560 +18325 +19086 +30165 +16674 +21462 +24054 +6177 +30827 +30027 +20714 +16507 +8074 +24683 +14999 +15357 +3322 +20162 +7333 +16124 +26516 +7178 +29190 +7488 +4854 +8331 +27646 +5506 +6190 +17584 +2420 +19500 +22187 +2538 +29815 +20812 +2406 +1226 +21012 +19929 +27724 +1114 +28759 +13355 +3567 +25276 +32415 +4021 +6510 +15110 +15399 +20485 +9378 +93 +18642 +11005 +20106 +12880 +1079 +29267 +14841 +10870 +9965 +30791 +12414 +16203 +536 +24484 +31124 +14409 +4404 +29434 +12811 +20291 +18977 +24346 +12214 +15110 +22384 +27858 +15702 +32562 +10476 +5610 +15047 +32085 +1644 +4447 +28009 +842 +4313 +13022 +3282 +21201 +23931 +14724 +22450 +24176 +6024 +27093 +15622 +14217 +21487 +3834 +25984 +27068 +865 +16192 +10550 +16256 +11937 +32717 +15755 +11261 +26893 +9124 +10075 +22060 +9581 +476 +15722 +305 +22780 +24348 +18191 +19960 +6325 +9819 +797 +4623 +7391 +19670 +8978 +16324 +22236 +32082 +1667 +7040 +1326 +26260 +17095 +14946 +29130 +18718 +17123 +1567 +18082 +8235 +2998 +16921 +9325 +493 +28774 +19902 +26553 +4869 +17162 +8228 +18484 +10564 +19864 +14562 +15927 +31137 +7954 +562 +23188 +28026 +30956 +24644 +31905 +31503 +26817 +27109 +4740 +7484 +23095 +1617 +20418 +18039 +11568 +27733 +1539 +27402 +7219 +16041 +3112 +32401 +32537 +16780 +24463 +182 +13820 +26017 +27557 +29996 +18524 +9225 +9134 +25322 +1172 +26562 +23249 +13994 +11132 +64 +1639 +9377 +29792 +22858 +22149 +25984 +29985 +29718 +20679 +27306 +15018 +23976 +22880 +26040 +7574 +7784 +22111 +16171 +7967 +24322 +22852 +22640 +23114 +16003 +31427 +13594 +21841 +5553 +21719 +26459 +16209 +9131 +18186 +23491 +26164 +24514 +28932 +24637 +28897 +27798 +3923 +583 +10659 +26741 +9849 +8305 +25816 +5872 +10300 +19225 +20443 +8127 +32553 +20581 +13363 +24279 +11370 +3969 +31484 +458 +25546 +28442 +31894 +28255 +20998 +4891 +26765 +11889 +31063 +11687 +20937 +23821 +20540 +1879 +10999 +20679 +3725 +6837 +16182 +32605 +21693 +24313 +29446 +22159 +6511 +7683 +22894 +1598 +2364 +29080 +26989 +30660 +17603 +17377 +24484 +28306 +10483 +28449 +6210 +3600 +3477 +22710 +27951 +16562 +9757 +9043 +25724 +15446 +28850 +21628 +15114 +8166 +24443 +2371 +6010 +26155 +10284 +5697 +29013 +10735 +26065 +11991 +30845 +30551 +30938 +28582 +2260 +9855 +20840 +26701 +30250 +31574 +4055 +98 +15468 +1725 +10124 +21427 +24587 +1243 +28672 +25022 +2731 +13507 +20493 +11374 +12302 +25930 +28536 +8728 +18239 +13090 +6848 +28342 +25602 +13371 +17702 +4195 +15484 +3163 +21757 +19222 +26399 +9980 +9780 +22435 +23769 +4710 +28449 +27119 +2941 +14349 +29584 +27251 +1137 +28205 +12812 +32500 +5017 +7844 +30572 +16000 +19076 +32527 +1186 +11437 +19414 +5673 +12992 +22542 +25333 +2656 +16715 +14326 +13304 +30137 +15045 +9584 +4044 +15078 +7029 +2942 +14504 +6053 +9849 +10898 +8884 +28763 +5391 +2891 +31989 +4337 +3104 +31857 +3708 +24303 +1038 +14387 +13264 +14552 +3775 +3232 +2200 +32453 +10218 +9059 +2445 +69 +31649 +17603 +15007 +19316 +20256 +12762 +7526 +6489 +30676 +29204 +972 +21381 +3247 +12268 +2809 +28394 +15787 +227 +19071 +6137 +32157 +13505 +967 +27648 +27196 +2064 +23996 +15299 +7793 +21974 +30902 +4952 +23265 +9362 +26281 +840 +12473 +10873 +21390 +26339 +6841 +9458 +27153 +9188 +12420 +8015 +16509 +8006 +24614 +1230 +23014 +25446 +23014 +6607 +1941 +13146 +6735 +14424 +14008 +1936 +15993 +27591 +30283 +12203 +3741 +18390 +16705 +5530 +27352 +5844 +22776 +24059 +1599 +15137 +15324 +25007 +7205 +24556 +1113 +15550 +2984 +21801 +15367 +28269 +1410 +13013 +28433 +18077 +14351 +8046 +3046 +7270 +9625 +21933 +23332 +2549 +4332 +17798 +7105 +10659 +11287 +27747 +3963 +4183 +30079 +16540 +899 +286 +28458 +19514 +8549 +5640 +7242 +21229 +5179 +23110 +28937 +8011 +19987 +4481 +8340 +21323 +31133 +10365 +30058 +22529 +25625 +2798 +8167 +18588 +27520 +23195 +9996 +29853 +15601 +17329 +26512 +21850 +28511 +27242 +19757 +4786 +18041 +11742 +12836 +29458 +10714 +15401 +4370 +21161 +7283 +13247 +29943 +32231 +16437 +19980 +21380 +2876 +12802 +20303 +15781 +4110 +18902 +14264 +4687 +19708 +2865 +29120 +8075 +11602 +20937 +31178 +24003 +13772 +1646 +15096 +12621 +16016 +26685 +7503 +24118 +5222 +13833 +270 +6736 +23866 +17414 +9035 +27006 +23508 +18871 +10191 +12351 +28374 +29723 +17460 +10361 +26358 +2067 +18493 +9352 +4221 +8471 +32630 +19591 +3072 +22554 +10252 +16861 +21086 +24250 +31471 +21772 +32763 +23213 +294 +14774 +17211 +3432 +12914 +25841 +2626 +5137 +6438 +460 +19434 +19367 +30534 +10273 +2052 +9583 +10463 +16798 +23251 +30627 +16294 +18703 +16326 +5718 +5076 +20462 +24438 +16555 +17985 +30253 +1248 +11831 +28607 +16450 +5604 +18611 +31162 +30580 +11005 +24038 +23565 +101 +8770 +21970 +15399 +21472 +18846 +14622 +10590 +1509 +31820 +5059 +29331 +1779 +20374 +32763 +20744 +2965 +10958 +25958 +25726 +17968 +26253 +14463 +15506 +24331 +20267 +17983 +27481 +22175 +9855 +22543 +23867 +15905 +216 +15348 +29197 +29262 +6459 +31990 +4979 +17526 +30943 +22481 +17524 +15820 +3559 +14303 +26206 +26861 +3423 +18501 +11997 +19886 +15481 +25949 +2902 +2858 +32009 +31332 +28042 +15372 +14654 +5989 +15720 +4378 +2722 +19301 +27698 +19970 +14421 +3792 +25812 +5225 +26758 +18980 +21890 +10546 +8498 +17628 +3728 +8203 +29729 +2207 +29334 +6462 +29214 +1193 +13252 +32183 +16758 +32122 +23170 +25937 +29619 +5311 +20813 +4965 +30362 +30077 +29134 +13717 +15458 +28804 +20284 +20693 +30519 +5395 +14835 +2236 +1007 +4552 +14421 +11530 +24588 +27084 +28897 +14713 +18162 +19004 +16787 +13257 +21097 +3034 +123 +5126 +14934 +11508 +8609 +8988 +4022 +20373 +15896 +31646 +3803 +2027 +14432 +6355 +25835 +1784 +31233 +8195 +1174 +28029 +1638 +20480 +26135 +21284 +24311 +17143 +20078 +19948 +29819 +28280 +31196 +1498 +8620 +3524 +17823 +8414 +27420 +25175 +13551 +4867 +72 +30390 +27960 +7899 +14842 +20347 +1434 +4650 +4580 +13982 +17823 +2770 +20346 +3333 +12091 +20478 +26127 +20047 +28682 +2963 +16436 +13021 +5573 +28627 +29774 +7203 +8709 +5460 +7798 +14125 +22844 +7457 +23446 +373 +26865 +25390 +8641 +7140 +16699 +19713 +29138 +6182 +15745 +159 +7753 +11314 +30832 +4020 +9058 +30746 +26429 +25351 +19575 +18960 +6173 +29214 +8856 +3258 +12289 +4909 +24680 +19383 +919 +28485 +26427 +31346 +26494 +26298 +29037 +26918 +5064 +29141 +32261 +5170 +14005 +18875 +12683 +14751 +4782 +26014 +10279 +24815 +17281 +6178 +29947 +16680 +1756 +22802 +19138 +12577 +9228 +1859 +2473 +3597 +20214 +11977 +11886 +17477 +8790 +8025 +24247 +26202 +3383 +24318 +3765 +32347 +20403 +17664 +31737 +1379 +25325 +18706 +31126 +11623 +26700 +21179 +18808 +26942 +31737 +5382 +32516 +24306 +1692 +17005 +9970 +12358 +27218 +9475 +12391 +17799 +9970 +26338 +21334 +1688 +20865 +5844 +28696 +11832 +31475 +13637 +9290 +9111 +25125 +21865 +4327 +1561 +3351 +7849 +3495 +22378 +9582 +14932 +17815 +28610 +13353 +31107 +30969 +10362 +6307 +16205 +24670 +26832 +22218 +31533 +27906 +247 +6302 +16304 +25192 +32611 +32493 +16738 +1334 +27730 +7501 +18939 +23379 +6046 +15706 +27590 +14655 +25795 +17713 +339 +6322 +16684 +23853 +17757 +29816 +12482 +12513 +3838 +9612 +7351 +26454 +32273 +32116 +20624 +11910 +9192 +6620 +20849 +30232 +29743 +11638 +31661 +13662 +2592 +14865 +4750 +22669 +3561 +30712 +11873 +12603 +18010 +26254 +13510 +1566 +8916 +16935 +18230 +7683 +18798 +23337 +21461 +25101 +30056 +2659 +13434 +29488 +12757 +16045 +2044 +20206 +15493 +24513 +12736 +24400 +7473 +602 +11136 +4647 +15594 +10635 +5469 +21380 +2499 +4449 +12328 +1909 +29374 +16060 +11757 +24323 +18421 +20587 +1218 +9321 +19209 +19847 +12238 +23190 +31696 +27922 +2716 +19429 +27962 +4816 +12962 +25627 +11908 +32100 +6925 +29089 +5281 +25007 +16079 +10756 +28645 +28517 +7403 +3499 +31220 +31473 +27392 +1751 +2026 +18572 +10772 +24544 +19660 +13465 +2467 +27822 +14383 +13635 +17641 +886 +15655 +29017 +26219 +8374 +3443 +26729 +7628 +21108 +5350 +26652 +5070 +18098 +16664 +19154 +26791 +6453 +24910 +15230 +18567 +15480 +10919 +31427 +16998 +6635 +11401 +24912 +19730 +17777 +16716 +7032 +9849 +24600 +18212 +23062 +31029 +1563 +11604 +29857 +29782 +25621 +8593 +14474 +16755 +20360 +27060 +25054 +1267 +32398 +13733 +31001 +21656 +15070 +30084 +4681 +20558 +11266 +24 +10596 +18739 +5335 +5501 +6122 +8935 +8261 +2570 +24510 +23317 +6464 +9601 +18242 +25410 +10751 +634 +690 +14549 +32380 +31249 +26307 +26472 +26156 +26575 +24700 +24910 +20736 +20951 +11860 +23141 +17309 +16722 +5773 +4381 +7895 +22300 +5840 +12745 +22131 +26799 +18698 +16422 +29470 +12624 +31110 +13097 +31657 +25466 +10827 +12045 +8583 +9864 +32696 +2461 +19593 +19622 +21087 +1215 +25048 +19705 +25118 +27458 +25139 +19981 +26244 +31721 +15210 +19584 +30819 +20151 +26908 +10733 +4273 +8317 +16557 +12315 +6308 +12450 +1162 +21607 +18190 +7475 +6817 +18287 +18166 +26923 +539 +7424 +25464 +6404 +25692 +6210 +13535 +4478 +23869 +26658 +2816 +9390 +22153 +24576 +4313 +31051 +4790 +30875 +25963 +14389 +17124 +9529 +9685 +11334 +17435 +18714 +9394 +16478 +24513 +22815 +19124 +1961 +11099 +30135 +23681 +15412 +25477 +2315 +8654 +24496 +24115 +13674 +10682 +27269 +28714 +8182 +10349 +13594 +25017 +25488 +10737 +1892 +20157 +14338 +5712 +31405 +3540 +6508 +17135 +6566 +31457 +31729 +3370 +27312 +16576 +22434 +14897 +20584 +32331 +6314 +6179 +27761 +25229 +16315 +7272 +28805 +7238 +16057 +31572 +2495 +14495 +23974 +29945 +21026 +19758 +13262 +21325 +29806 +2349 +307 +21885 +28197 +2551 +29755 +1169 +7128 +3780 +10136 +11585 +31671 +26534 +25720 +31510 +21080 +15299 +29935 +28868 +7623 +724 +4769 +14792 +719 +19934 +15796 +4414 +8328 +15152 +2037 +14852 +30242 +12702 +8265 +17429 +18160 +16124 +10839 +6944 +10424 +13789 +11891 +6759 +10298 +26253 +11726 +8672 +12286 +3917 +9948 +26758 +7523 +24526 +5638 +2048 +12261 +11248 +16018 +32117 +16046 +10683 +18383 +7086 +24672 +22174 +31364 +10862 +28962 +24552 +10907 +12047 +8937 +10884 +6410 +6750 +1032 +22009 +23042 +22456 +10235 +22178 +2908 +31077 +24176 +810 +26432 +32308 +9367 +12619 +32535 +27736 +15531 +15815 +10932 +15746 +6081 +7079 +30654 +22592 +32209 +18099 +9569 +4758 +8194 +13617 +30773 +31195 +314 +9443 +29294 +23510 +24806 +24379 +15430 +19737 +5127 +20705 +18599 +10396 +30845 +4200 +541 +17566 +28312 +12363 +3068 +22713 +1244 +30767 +25550 +20804 +16917 +24916 +28415 +3054 +14748 +29276 +16588 +14744 +21992 +22081 +9321 +24946 +1368 +19088 +14193 +16730 +13631 +16619 +8340 +1905 +18224 +20414 +11900 +8447 +27788 +20033 +27391 +6794 +5194 +14254 +28300 +19761 +22279 +12740 +32719 +21838 +3406 +21117 +19367 +3660 +31785 +267 +16715 +4037 +17384 +3609 +24247 +26593 +32049 +24384 +31069 +3819 +12360 +18887 +20234 +20532 +4768 +30879 +27414 +9261 +13987 +31134 +11215 +14271 +6590 +19963 +29736 +7406 +15537 +6667 +21918 +24751 +12822 +20539 +15979 +519 +20271 +29517 +30703 +1636 +27380 +19415 +347 +10048 +22364 +11513 +4768 +21748 +236 +9310 +21399 +2778 +24702 +12662 +4977 +12455 +11092 +24561 +3170 +1287 +27997 +24959 +32649 +19834 +31174 +711 +13603 +18286 +24004 +6054 +11505 +5790 +16801 +15017 +2791 +11434 +25605 +31693 +3094 +26103 +7047 +23158 +4059 +22474 +2676 +9901 +329 +2976 +28894 +9630 +11477 +9168 +18665 +5457 +20033 +9572 +6482 +27560 +25290 +25396 +10816 +27802 +2965 +17988 +2127 +29614 +3159 +28512 +474 +3259 +12868 +28150 +2697 +14302 +12091 +2100 +12572 +29884 +13615 +20578 +4982 +28922 +24025 +897 +31981 +30201 +10908 +27941 +6865 +29142 +10424 +19600 +29499 +14242 +1459 +30480 +2583 +21214 +8197 +13211 +24692 +2619 +24579 +2984 +14859 +28048 +25869 +3408 +21775 +2843 +21244 +15014 +52 +10236 +19398 +8787 +15106 +6127 +24947 +23926 +19548 +4169 +3141 +28347 +31564 +4662 +28963 +16057 +22033 +18481 +1095 +12689 +13163 +29380 +21545 +4549 +23077 +16514 +2219 +19543 +31460 +11586 +25222 +14882 +26672 +17565 +18164 +29309 +14528 +25514 +9119 +25358 +16394 +22009 +14025 +10475 +2315 +27086 +1982 +26360 +16212 +22431 +7031 +5501 +12886 +6352 +12688 +1798 +24302 +2477 +5484 +7808 +11060 +29352 +20390 +29329 +16513 +21717 +17339 +23095 +12222 +5540 +1526 +7845 +19444 +26077 +30109 +20058 +26385 +32737 +26458 +28036 +23801 +6431 +27628 +32660 +6349 +8917 +32526 +9762 +127 +13833 +10919 +20739 +29335 +18119 +27188 +15272 +16959 +31388 +23155 +13242 +23957 +15955 +338 +25843 +2610 +30446 +14871 +9792 +25590 +27112 +4560 +1045 +2583 +14506 +8189 +1040 +9833 +2892 +10109 +24017 +15088 +18061 +2998 +9496 +24996 +26901 +26121 +8481 +27267 +27625 +18293 +19773 +989 +16943 +29322 +16049 +22747 +21541 +6544 +27604 +21074 +4443 +27897 +4195 +26055 +30264 +1540 +11048 +7874 +8365 +31155 +20684 +20056 +20531 +8176 +20472 +3315 +27915 +23291 +25267 +31333 +29366 +27415 +26872 +26669 +22962 +6773 +26775 +23048 +23671 +19809 +20046 +2235 +13234 +17067 +11303 +21280 +9665 +4184 +28948 +18799 +1391 +10378 +21961 +16079 +31729 +29357 +31450 +3357 +14881 +17636 +29718 +30460 +27897 +18867 +15651 +21533 +4435 +7661 +21339 +29648 +735 +13024 +28902 +25036 +25189 +16576 +9496 +31035 +12093 +21841 +17933 +29193 +12300 +19161 +30595 +21614 +1728 +13125 +17143 +32442 +3022 +922 +32003 +10593 +19627 +2975 +29687 +5446 +18825 +1481 +9143 +20556 +20052 +19303 +27349 +15387 +748 +30990 +31982 +17200 +3747 +3911 +3658 +26664 +27386 +23416 +29871 +6989 +16792 +13584 +14726 +609 +29068 +23287 +22833 +7851 +6084 +32053 +11179 +32064 +14029 +16097 +12898 +23956 +22989 +15436 +18258 +31296 +20158 +24943 +26978 +24598 +21485 +7314 +8707 +32611 +21682 +14655 +16391 +25475 +4465 +28518 +25535 +15531 +20177 +29393 +6233 +10227 +26684 +3787 +30328 +24994 +24983 +6669 +3092 +19903 +21571 +20201 +1429 +725 +21332 +21434 +21547 +17157 +8977 +32650 +19825 +3922 +24492 +9990 +66 +16681 +28482 +32159 +15066 +22064 +23318 +22274 +32305 +23120 +27658 +21691 +23189 +7173 +9823 +19493 +29062 +5861 +174 +28821 +6358 +16495 +29222 +3526 +23297 +8982 +13319 +24200 +20683 +29582 +21087 +19365 +4120 +3158 +26629 +7956 +11280 +31623 +8659 +30561 +627 +3803 +25895 +1884 +21050 +2561 +13725 +28161 +22383 +29471 +13830 +12967 +26702 +8616 +24748 +12653 +20381 +31585 +21193 +994 +24649 +2991 +18245 +12788 +32322 +24867 +7344 +14107 +6296 +23880 +640 +10182 +20694 +25260 +10636 +773 +19359 +3372 +5064 +31865 +26248 +24709 +24386 +19065 +20277 +6424 +10333 +17542 +14262 +2814 +24398 +24049 +9251 +15180 +11476 +18635 +3447 +8104 +16956 +19725 +21931 +12300 +12436 +8201 +18707 +14042 +9007 +18448 +10493 +2849 +6489 +22629 +31623 +8494 +31580 +4450 +7361 +7511 +9907 +12521 +19716 +21763 +19853 +32526 +14482 +27134 +17797 +25346 +13423 +27644 +8609 +3139 +11391 +11371 +13193 +31746 +32481 +12413 +20488 +31444 +16523 +28022 +29384 +18077 +10022 +15155 +7498 +1210 +5164 +10492 +3364 +17518 +32064 +8331 +9599 +7567 +11725 +860 +10192 +14193 +7651 +11831 +6102 +17427 +23118 +3836 +26325 +15241 +14840 +14511 +16913 +25513 +23681 +8644 +8333 +28666 +11805 +30891 +27653 +17881 +27821 +15007 +24873 +12525 +27169 +30892 +796 +5070 +2061 +30463 +15917 +24817 +10378 +4722 +5589 +26583 +4176 +6232 +31217 +17014 +30225 +31877 +8000 +28391 +15128 +6562 +30496 +24914 +2338 +26543 +8837 +6679 +20861 +21721 +31802 +3134 +26975 +11390 +5724 +24609 +16265 +14463 +18196 +24152 +26396 +2245 +8340 +3813 +29627 +3350 +28756 +22689 +25315 +27930 +8590 +11494 +3719 +19113 +7928 +2942 +25839 +23127 +4033 +27340 +25042 +32322 +3023 +20537 +1202 +20251 +9014 +9442 +16505 +16243 +21756 +4736 +8274 +17735 +20748 +29847 +7625 +13775 +8568 +10722 +25638 +16260 +5875 +20991 +32006 +11888 +5262 +17239 +8763 +26298 +5811 +17744 +12518 +16753 +4447 +23223 +31187 +14232 +420 +10344 +27413 +1907 +20062 +17471 +20195 +16401 +21557 +30788 +7089 +24347 +14547 +17938 +4498 +27867 +24935 +13960 +8398 +17040 +10330 +16820 +21951 +26353 +11857 +23292 +17905 +11519 +25187 +28046 +14969 +272 +7580 +21770 +5014 +4120 +28082 +7791 +8583 +13627 +27398 +7492 +28332 +22929 +13790 +8455 +14048 +12856 +30434 +22234 +2069 +2208 +32468 +9068 +18482 +30995 +24980 +294 +7210 +21379 +10323 +11928 +27741 +2712 +30487 +14626 +563 +23802 +16752 +12262 +31478 +9436 +27257 +2798 +3057 +31177 +27665 +4762 +21447 +4275 +24923 +21326 +13590 +1593 +4212 +26969 +30284 +32568 +20340 +12583 +8905 +19350 +24743 +10155 +26934 +30539 +8717 +1799 +29476 +30128 +11280 +27518 +29161 +21260 +15236 +3228 +23736 +6236 +740 +22180 +7168 +19811 +16075 +28730 +7686 +17651 +10674 +30802 +4293 +8058 +10985 +2136 +15622 +12239 +23767 +18080 +16060 +11839 +18037 +5393 +5794 +26067 +25609 +10254 +20759 +18404 +23328 +4517 +15929 +4578 +30159 +3324 +30529 +29025 +16682 +5624 +11551 +21093 +27397 +6446 +31830 +17391 +15082 +18447 +16922 +7879 +16987 +23888 +11943 +23180 +8265 +23960 +4324 +15611 +29652 +8302 +5945 +20348 +23109 +11617 +429 +18162 +5193 +14713 +324 +18884 +11888 +20702 +16536 +16423 +18662 +30919 +20918 +6831 +23152 +21926 +32060 +15126 +2730 +8594 +11952 +27467 +32639 +32500 +31266 +3774 +14825 +29558 +30470 +31211 +24043 +5928 +27723 +7205 +460 +17397 +2497 +26533 +24725 +20806 +10922 +9171 +3021 +10228 +23966 +5587 +30835 +14964 +11684 +11091 +829 +11581 +26766 +5012 +18448 +15229 +24213 +29367 +26816 +9214 +22326 +6986 +7945 +10835 +14156 +31251 +13774 +30791 +5230 +8219 +17808 +27526 +12683 +5886 +20530 +7053 +8388 +27507 +6123 +9168 +1674 +6679 +19852 +32299 +14841 +19070 +29172 +31116 +15988 +1148 +1745 +6366 +21121 +19376 +27289 +26168 +4071 +19795 +31688 +1606 +22789 +3135 +24411 +6136 +3957 +14147 +1676 +11370 +20451 +5542 +20432 +25364 +12071 +13817 +24335 +30259 +13482 +19234 +2339 +17271 +3575 +25510 +28307 +7406 +14240 +26422 +8593 +28208 +5972 +1661 +29489 +460 +17214 +2345 +17388 +29427 +29344 +9784 +29525 +5987 +21424 +21124 +19226 +28055 +17075 +12690 +318 +23341 +7768 +5271 +11668 +18327 +13655 +13260 +20096 +24326 +2378 +3572 +14570 +2452 +25291 +6698 +3971 +25264 +29391 +14320 +7484 +15567 +32067 +2421 +12035 +32081 +18661 +9255 +18624 +23729 +20580 +17273 +20880 +22257 +28859 +27126 +4929 +22597 +4298 +7303 +10510 +29182 +32311 +9217 +14748 +9146 +31621 +242 +6196 +1226 +15218 +32173 +10562 +23012 +17814 +2707 +9743 +25354 +57 +20645 +7099 +28090 +23412 +9799 +16766 +30551 +22924 +21079 +544 +27607 +28811 +18798 +21686 +19631 +288 +20853 +16542 +19451 +24249 +14188 +10429 +10226 +9438 +887 +14840 +21130 +21969 +22314 +6385 +12647 +32356 +25110 +11011 +522 +23322 +6292 +5760 +11831 +14977 +6353 +22058 +7335 +6351 +27162 +31727 +18927 +12476 +617 +32490 +13744 +32159 +15921 +12438 +28672 +27340 +13927 +13652 +21273 +11309 +8401 +7200 +13633 +31774 +9875 +29072 +7929 +14991 +23799 +27150 +20841 +10581 +19580 +32599 +10507 +16848 +12834 +7475 +10391 +24515 +26357 +14710 +14384 +15728 +6616 +29495 +25805 +31987 +18324 +5455 +11241 +15072 +7457 +6166 +8046 +26144 +12339 +32346 +28127 +22793 +14856 +10656 +6853 +28605 +16497 +414 +29533 +6085 +22815 +2808 +2944 +5358 +29488 +18747 +20178 +30563 +21242 +2071 +29231 +32523 +11287 +26593 +20818 +26661 +1457 +18761 +1224 +23842 +21775 +29784 +15380 +2498 +31329 +5805 +10276 +2931 +3016 +29945 +500 +15078 +6825 +27575 +31104 +2804 +24371 +6961 +6384 +30896 +30255 +23216 +26623 +18636 +7431 +20226 +23468 +3633 +6170 +16434 +24101 +13786 +12095 +2691 +31473 +5106 +27799 +18094 +31580 +11822 +2456 +1374 +32551 +16236 +13911 +14824 +23921 +12429 +10006 +12367 +23009 +655 +5134 +10872 +31253 +26095 +6014 +170 +1872 +31550 +5619 +24905 +2143 +30978 +7386 +3027 +16332 +13008 +25413 +8988 +31302 +15783 +22778 +29382 +14672 +11662 +28610 +17411 +1578 +10353 +2800 +7567 +30973 +19001 +16687 +2792 +16458 +5675 +23697 +18128 +13460 +29059 +17621 +25862 +17484 +25425 +16377 +22336 +17406 +5524 +13569 +26988 +28347 +21396 +23813 +4393 +8902 +389 +3713 +11392 +9858 +18777 +3801 +3047 +412 +30949 +5675 +25464 +13940 +19769 +29018 +32622 +26578 +10041 +28248 +22496 +14022 +25984 +32435 +24514 +25824 +24438 +15459 +11033 +1681 +15791 +15570 +18558 +20961 +11143 +24109 +27094 +21843 +7676 +31466 +14416 +8982 +11212 +12186 +28575 +15469 +13007 +7921 +7290 +18784 +18071 +24595 +6737 +26788 +9286 +801 +11344 +9160 +10159 +22532 +19866 +21410 +32176 +25465 +5311 +249 +4046 +11869 +18047 +3444 +25875 +23355 +29634 +12483 +29733 +11795 +16087 +5644 +8871 +29293 +9196 +9624 +28117 +27551 +24783 +18110 +30811 +15195 +22500 +9744 +31094 +27260 +2662 +19397 +18765 +17 +1506 +3686 +1682 +21162 +24817 +11709 +4436 +32739 +9013 +8699 +22312 +13871 +13462 +27432 +11385 +15591 +12222 +27856 +12075 +26259 +13267 +8684 +28279 +22904 +4468 +13582 +21507 +23138 +28406 +18641 +2624 +1459 +16352 +31872 +23561 +8876 +11172 +30982 +18810 +31995 +16288 +4630 +19981 +28806 +2133 +18331 +5115 +4983 +28135 +13154 +4306 +10888 +28629 +12038 +18259 +21392 +7161 +15900 +10894 +4686 +23746 +2208 +24129 +11126 +31409 +29088 +20589 +31226 +27922 +5671 +26682 +10906 +22013 +16492 +17933 +2479 +17804 +6972 +20711 +20276 +8286 +12709 +3329 +5397 +17740 +1764 +30630 +25532 +20075 +21137 +25680 +218 +2370 +11529 +5894 +27763 +589 +14364 +6133 +14381 +16306 +4088 +31822 +9433 +1858 +4181 +8287 +12866 +19379 +14819 +3829 +3382 +7452 +17393 +4593 +2003 +14514 +9822 +10280 +2068 +5057 +10181 +23681 +6299 +32238 +15332 +14921 +1985 +13995 +15949 +23258 +16604 +4603 +21841 +18541 +19408 +2152 +2346 +12859 +7896 +20033 +23400 +11739 +11926 +19993 +27293 +472 +26714 +8829 +28236 +13714 +687 +27380 +5904 +25175 +20524 +6205 +7945 +450 +121 +3012 +5772 +13651 +31648 +9830 +14602 +17231 +17302 +8806 +22081 +17626 +2057 +21680 +7075 +16723 +22636 +12621 +18947 +13040 +8257 +12070 +9095 +12443 +22950 +26365 +7626 +14604 +8739 +2472 +9296 +23335 +7602 +2449 +30511 +14232 +21520 +4971 +29180 +6061 +29763 +12854 +18164 +5491 +10860 +14966 +31340 +4372 +29647 +22703 +10874 +28529 +7456 +24357 +28389 +24059 +22288 +11986 +23883 +6103 +3352 +22439 +32145 +26674 +27269 +19463 +14992 +26081 +14789 +17282 +6909 +9278 +2544 +10446 +20121 +21822 +18074 +12044 +23451 +6359 +11736 +27192 +30810 +30097 +20624 +1777 +23871 +13931 +2310 +32107 +6891 +10737 +5028 +23474 +16548 +32410 +13834 +801 +24325 +14439 +8278 +29986 +13031 +31674 +29877 +2856 +1162 +10612 +8490 +13801 +1800 +2131 +30622 +8161 +17404 +30602 +12329 +20228 +24430 +26274 +16800 +8642 +16386 +3728 +15455 +17217 +26465 +10264 +4952 +29398 +1768 +7009 +32604 +15045 +7312 +25817 +26793 +29242 +9246 +11084 +693 +9863 +10379 +17216 +1594 +18336 +16822 +7059 +13698 +13268 +19016 +20312 +5877 +32462 +23016 +22766 +4576 +4043 +20385 +8803 +22920 +29469 +30864 +28424 +21103 +31457 +7890 +23124 +24037 +2813 +3244 +26622 +14291 +11356 +20476 +24918 +21188 +17261 +18913 +31717 +24116 +1498 +22183 +1350 +25373 +2950 +6645 +4163 +8896 +5834 +15162 +24371 +9137 +28655 +7765 +1938 +6438 +28655 +25731 +2787 +4225 +5736 +16782 +24771 +4379 +18146 +28980 +11854 +6739 +2370 +22741 +9911 +11223 +27022 +8545 +20770 +17458 +21219 +21890 +12230 +406 +436 +20485 +1088 +20716 +26948 +1678 +11577 +22298 +10343 +31869 +22844 +148 +26997 +27163 +2770 +25381 +18831 +25609 +10719 +24063 +8981 +3819 +7745 +9218 +22376 +11088 +12199 +7241 +29661 +1509 +9903 +17659 +19970 +6107 +27459 +1104 +29460 +25493 +7221 +5090 +1728 +22935 +23577 +29238 +27930 +20907 +20323 +1675 +23515 +25685 +1986 +25313 +12000 +12409 +22716 +20557 +7135 +22859 +20874 +4477 +8555 +18551 +22582 +1927 +19755 +146 +8691 +9462 +13655 +3009 +1213 +23319 +16756 +21160 +24113 +28032 +7760 +26518 +2990 +22498 +31040 +4590 +12205 +12817 +24217 +9689 +16478 +15953 +22380 +29738 +7045 +3556 +8839 +24209 +7060 +26577 +9385 +23556 +27144 +24054 +27652 +31082 +2825 +15440 +25337 +8842 +24125 +16010 +3599 +16180 +4332 +14277 +28980 +28846 +15707 +6311 +30777 +31585 +13154 +32678 +32392 +10437 +9807 +16278 +21031 +11658 +15360 +2161 +19954 +24584 +14651 +7783 +26389 +19176 +18257 +19238 +18888 +26644 +3827 +30059 +24911 +4061 +9300 +2761 +26417 +26732 +129 +10169 +21943 +24939 +1021 +10723 +22953 +2036 +16032 +6316 +8004 +16057 +30898 +4096 +5759 +9845 +14659 +6497 +2688 +17044 +17869 +7985 +10329 +9758 +22285 +26172 +20743 +13545 +32543 +14729 +21165 +17663 +31961 +13410 +25869 +11341 +30825 +22177 +1351 +1679 +25905 +20286 +3286 +16248 +1250 +10518 +8136 +11557 +18392 +17918 +20030 +18116 +1718 +21512 +1315 +17280 +20803 +10516 +10800 +11696 +20100 +12443 +32545 +13889 +27162 +22456 +10289 +21601 +19165 +9080 +29148 +32110 +20153 +23907 +12757 +286 +1993 +586 +24389 +21999 +30387 +24403 +15942 +25041 +32324 +2371 +15008 +2834 +19532 +6668 +19907 +7563 +13243 +24727 +3076 +20489 +13308 +28371 +13596 +30206 +10641 +12798 +25566 +10601 +25585 +307 +14649 +30978 +7327 +20021 +7790 +26283 +2955 +25723 +31378 +16915 +5293 +25212 +30534 +11180 +19168 +22844 +12470 +19408 +17404 +15894 +27856 +2607 +31287 +6860 +13766 +20860 +14014 +10190 +29639 +11096 +16783 +15560 +25081 +16510 +21146 +17262 +31418 +2353 +24 +6284 +14104 +14819 +9771 +1864 +15758 +14375 +951 +19131 +23553 +9176 +2176 +16816 +26875 +16523 +4228 +16571 +26663 +19251 +2203 +11902 +3597 +2067 +14413 +22071 +32526 +5353 +11508 +7310 +26018 +19289 +531 +670 +15313 +16279 +757 +9026 +25584 +10073 +24970 +5793 +27806 +13564 +32382 +26620 +7166 +13045 +32411 +2487 +7734 +27515 +10592 +29607 +29480 +10355 +19683 +22427 +30576 +22427 +8932 +6189 +9374 +7931 +29491 +28106 +25781 +28041 +28484 +26112 +5348 +21531 +783 +10503 +4995 +12947 +5934 +12691 +30033 +1349 +50 +25305 +15853 +24236 +5958 +10464 +14226 +22862 +14343 +3850 +17943 +3564 +8099 +30946 +20774 +23023 +26928 +26920 +8636 +527 +9038 +794 +20194 +32070 +15105 +12805 +5546 +29684 +14281 +8972 +14444 +16211 +1283 +32056 +16706 +29982 +17540 +962 +17345 +19325 +26227 +3740 +31227 +24885 +615 +1350 +22706 +13837 +11714 +18383 +30429 +24451 +19278 +12841 +25697 +17840 +4117 +9650 +19465 +29817 +14726 +17664 +31943 +19704 +12485 +19949 +13870 +9001 +5970 +15844 +21551 +5081 +30942 +11370 +13843 +7884 +7786 +2032 +31929 +20781 +16034 +8407 +31762 +3132 +1913 +11973 +31706 +13363 +15621 +15399 +9112 +21369 +27037 +9223 +11737 +32266 +23345 +3600 +16041 +294 +27113 +5343 +31058 +11064 +17409 +652 +12632 +14346 +15076 +20345 +21173 +11560 +19847 +20314 +23889 +12946 +27657 +14469 +4037 +13221 +12424 +29052 +7505 +21579 +2374 +20664 +2843 +1634 +4093 +15032 +4266 +19307 +2688 +19018 +6051 +28276 +20627 +28441 +14018 +16967 +4876 +11896 +17436 +12244 +16426 +29294 +23187 +8412 +309 +4866 +28314 +4832 +3415 +1480 +20011 +24137 +19898 +24491 +10245 +32217 +3811 +5374 +30251 +25169 +15183 +9150 +26521 +7780 +23372 +5162 +9545 +30428 +22042 +31622 +3687 +8971 +12353 +27947 +18384 +18804 +17205 +1491 +15056 +1211 +10793 +32035 +24349 +31946 +24624 +27002 +27663 +24645 +19355 +8697 +19746 +18993 +12942 +27347 +30126 +24544 +21732 +22486 +28645 +13087 +10054 +4410 +17165 +13475 +27527 +26282 +3328 +17073 +8770 +23697 +27361 +8205 +4534 +8102 +3360 +24358 +24033 +2746 +4785 +3456 +28124 +10945 +1928 +11105 +6774 +27936 +8792 +15295 +25108 +25654 +7565 +30826 +7625 +20013 +18312 +30326 +29617 +18946 +9754 +18155 +659 +26323 +18755 +24496 +694 +31081 +10540 +22709 +22532 +25606 +11106 +18784 +20830 +15472 +11093 +21051 +4414 +31805 +8720 +7899 +23443 +10081 +18747 +27667 +17626 +5367 +21838 +24154 +32377 +17996 +8983 +13434 +15456 +30770 +29807 +8827 +28642 +23171 +6201 +24783 +21457 +6644 +6555 +15295 +1497 +10268 +21120 +12053 +10527 +28100 +32078 +23051 +19994 +21360 +8677 +22388 +7089 +19503 +31192 +17961 +30102 +20128 +10223 +3511 +7138 +26694 +24285 +11078 +32753 +22285 +21310 +4812 +19072 +21788 +5332 +28788 +20230 +733 +11011 +22089 +26704 +6986 +4234 +8743 +31328 +24187 +27268 +10212 +5510 +24174 +5790 +27578 +30400 +6677 +27802 +30968 +24912 +4774 +20229 +8425 +3484 +18206 +26420 +11781 +10570 +16919 +10373 +22359 +9372 +9676 +30420 +46 +18697 +25194 +3132 +4103 +21789 +665 +31247 +28346 +6546 +14923 +24856 +28901 +21424 +9156 +15632 +16534 +16610 +22250 +24414 +3644 +10137 +18127 +29972 +5584 +20838 +4476 +13350 +17471 +12883 +11777 +3052 +2332 +14722 +9402 +29915 +8323 +1801 +15843 +15232 +24912 +781 +21087 +25278 +23426 +4637 +10948 +31048 +21225 +25296 +6315 +32353 +25112 +4258 +13880 +12756 +20870 +6156 +30693 +27438 +28422 +22500 +31891 +21571 +29034 +7156 +18386 +8928 +13428 +27869 +21104 +11725 +22781 +8493 +7489 +30983 +5481 +27583 +12846 +5436 +16970 +25427 +16257 +28295 +28499 +16239 +14704 +26220 +3200 +18037 +11751 +21783 +29571 +10501 +13978 +19921 +23922 +18070 +13643 +17091 +4272 +5968 +18009 +25584 +21273 +14124 +5514 +21868 +27762 +20046 +282 +6370 +17679 +21154 +14084 +17990 +27846 +24246 +14479 +28630 +5652 +6616 +28700 +19799 +20878 +28017 +17712 +2701 +5515 +928 +23229 +21756 +24080 +19226 +25525 +1247 +28924 +31809 +14801 +32101 +4725 +23427 +8863 +8243 +13714 +13558 +28362 +28694 +30025 +19761 +24494 +16136 +24988 +17261 +32540 +871 +27904 +8413 +21866 +12401 +1549 +4427 +10687 +11779 +10605 +244 +14493 +19346 +30718 +7077 +3248 +19050 +7498 +26901 +26069 +23335 +4649 +646 +23150 +10865 +1973 +7576 +7909 +22780 +1646 +26733 +8063 +31423 +3503 +29443 +22627 +31091 +16209 +8654 +6122 +30287 +25501 +26005 +5929 +1795 +20855 +13454 +5308 +27123 +1737 +189 +24021 +3509 +32046 +10122 +29062 +1997 +1760 +5793 +10827 +22184 +16356 +8719 +6619 +2774 +24436 +18330 +817 +13196 +30125 +23393 +7893 +10842 +24954 +22965 +5488 +6696 +2752 +23094 +23695 +23927 +11466 +24626 +25015 +4055 +15608 +1082 +12203 +28323 +14756 +13062 +31225 +25860 +27989 +32139 +15051 +24358 +29223 +13915 +20204 +16564 +378 +22589 +15385 +6810 +23514 +29196 +3466 +31739 +21807 +5077 +29377 +31344 +20774 +31020 +3218 +19843 +15327 +27855 +5236 +6507 +19159 +8574 +18951 +17674 +4633 +31770 +21221 +30501 +14753 +2812 +30893 +5858 +24336 +9880 +29005 +27528 +28567 +30547 +7569 +14194 +1565 +23713 +27113 +27220 +6579 +29027 +15743 +18098 +2106 +10624 +9081 +5789 +18771 +17602 +6796 +19377 +21895 +4851 +14018 +9804 +3512 +17720 +396 +16400 +11976 +18605 +17418 +5531 +7559 +26177 +10138 +27526 +5859 +9173 +22688 +10908 +4171 +8848 +6038 +3932 +21603 +30341 +25684 +18609 +10223 +13193 +12192 +25072 +761 +11086 +16121 +5139 +10822 +6340 +11936 +23092 +13560 +13489 +15848 +25933 +19076 +28559 +20928 +19246 +9431 +19622 +22910 +3263 +8900 +6762 +494 +20344 +30385 +1047 +25242 +26142 +15747 +14475 +4444 +1216 +2502 +8803 +18466 +15345 +12065 +27994 +2306 +5959 +23034 +21726 +27774 +31508 +16229 +30708 +1561 +7524 +29011 +11854 +2842 +13879 +8952 +6826 +10143 +17152 +27004 +30317 +11750 +31069 +17638 +21120 +3032 +17689 +32070 +18795 +13015 +28000 +8227 +24241 +24009 +15681 +10788 +1899 +24933 +19305 +10498 +6184 +29373 +15646 +25005 +5123 +4108 +8314 +18109 +6406 +30658 +14826 +19228 +26047 +22990 +24806 +23794 +13345 +12075 +18418 +5330 +26013 +25518 +19414 +25890 +15489 +15886 +9754 +21968 +7825 +12852 +7876 +6195 +7395 +2501 +6485 +32575 +15616 +3821 +6401 +10221 +16184 +9583 +6191 +24042 +24134 +32234 +20273 +2174 +17445 +20334 +17989 +11200 +12338 +17215 +20172 +18936 +2691 +32488 +16329 +12629 +24710 +30852 +4509 +464 +1758 +328 +13569 +30559 +23674 +12885 +16708 +17503 +27384 +10173 +21959 +2108 +24633 +13779 +19126 +11874 +7493 +1208 +3336 +16745 +22113 +15907 +16826 +32380 +110 +14704 +3143 +13578 +1924 +20972 +5228 +16049 +2768 +21344 +10010 +7015 +6571 +10459 +3771 +32235 +11772 +14789 +32426 +21611 +24528 +8481 +11757 +6518 +3639 +11042 +32053 +31013 +31074 +17650 +17431 +5766 +2554 +19134 +8588 +32073 +16835 +24581 +27560 +2990 +4465 +15906 +6807 +24750 +4042 +9496 +19166 +6761 +19966 +23198 +13007 +28879 +17732 +25451 +10061 +30867 +6581 +25283 +3009 +6733 +11885 +19523 +18781 +2542 +18144 +21481 +10640 +19049 +12665 +18535 +12234 +2463 +14202 +17321 +20082 +24716 +19984 +23972 +4900 +17329 +17589 +19809 +9775 +12225 +27851 +9290 +14671 +24207 +30327 +4021 +16807 +4151 +32443 +19630 +6402 +13452 +2775 +14858 +25163 +194 +27873 +13481 +19786 +15709 +19874 +10762 +5537 +22617 +22452 +3350 +22790 +1947 +16346 +6437 +8387 +1943 +9888 +3925 +14955 +16963 +3891 +23053 +15326 +27197 +26499 +17101 +20095 +22072 +23959 +9784 +7605 +10412 +32304 +21091 +1184 +4030 +22689 +31584 +22301 +10605 +9198 +29190 +25084 +22527 +8484 +2307 +32385 +4779 +14072 +21541 +21785 +32392 +675 +11749 +11101 +23477 +23037 +12085 +22860 +4810 +31448 +1420 +16837 +28287 +25503 +21294 +27204 +19867 +4400 +1473 +3550 +22816 +7670 +20237 +18302 +2741 +32331 +11283 +12129 +3923 +22029 +9810 +2000 +21044 +9087 +15189 +21789 +15353 +15202 +5761 +31969 +29210 +21075 +2333 +18548 +8851 +3943 +27810 +26285 +10189 +25606 +23365 +18651 +4298 +9477 +27331 +30468 +22933 +8456 +21868 +14173 +24553 +12310 +15731 +9481 +24608 +30845 +30324 +4630 +1631 +25833 +327 +20662 +24576 +1983 +9732 +16314 +14656 +26560 +22614 +13908 +13098 +29147 +20997 +11022 +7619 +3154 +4031 +12805 +25207 +1809 +7207 +11883 +2756 +25931 +21792 +21309 +12069 +15447 +5979 +20288 +23105 +9162 +31775 +16450 +11349 +29397 +5464 +18831 +19167 +18144 +21475 +27057 +26764 +3944 +1049 +27501 +29028 +6934 +3226 +3579 +10036 +25121 +23387 +16516 +14908 +2533 +11506 +3298 +10778 +24004 +6689 +3475 +31478 +14653 +6050 +2814 +2799 +8012 +21554 +7147 +5062 +31489 +8417 +25916 +9417 +17764 +20376 +21745 +8451 +3207 +13291 +29788 +3490 +6125 +12833 +11680 +15528 +9755 +2177 +8304 +8150 +32637 +16095 +25094 +20438 +23163 +26728 +17506 +5031 +19676 +9130 +197 +29774 +18010 +1255 +24941 +10427 +20615 +22171 +18066 +26105 +4064 +23627 +8865 +24474 +16943 +912 +18871 +1122 +13862 +12132 +12385 +17203 +30777 +2477 +30099 +25657 +12475 +1800 +21478 +16982 +28477 +2263 +22038 +28880 +24356 +18829 +27324 +6457 +8585 +32569 +13128 +7583 +18518 +24657 +10817 +19189 +11934 +30401 +31937 +10177 +10812 +27956 +13099 +11016 +21168 +17058 +1328 +26487 +22838 +4123 +29954 +30419 +11816 +19666 +3542 +12706 +28566 +15468 +24992 +32539 +23843 +29579 +8714 +18763 +19747 +7830 +28854 +24970 +24306 +30412 +17077 +24861 +26263 +4489 +29512 +21037 +19866 +30167 +25046 +11496 +25891 +9272 +14125 +29941 +25940 +31922 +11773 +798 +5608 +12060 +31378 +18233 +23564 +8616 +11729 +3671 +10621 +31154 +12150 +6448 +2276 +13000 +11149 +3790 +17263 +28666 +3886 +6010 +23472 +29539 +28796 +11236 +22970 +26616 +32224 +25750 +9337 +27024 +20611 +21914 +25682 +30516 +15882 +17003 +11005 +15273 +1430 +13850 +23711 +22588 +29690 +19393 +5675 +7630 +23359 +13101 +3322 +24607 +31062 +15815 +9129 +20319 +10780 +32707 +12339 +1010 +147 +20877 +12112 +10371 +9055 +15728 +24845 +28237 +2176 +9609 +2732 +14246 +27727 +11755 +22974 +9421 +8122 +14100 +9343 +28405 +2500 +29840 +882 +15761 +30775 +27628 +61 +25058 +7084 +26589 +21959 +9407 +19134 +11185 +32144 +4772 +26763 +29431 +1616 +29183 +2667 +2411 +28627 +20406 +14580 +1828 +2068 +19964 +26670 +32001 +1433 +8533 +787 +7504 +23310 +26600 +9803 +11457 +37 +18181 +26149 +18315 +11181 +31479 +15321 +18140 +15089 +17675 +30205 +21127 +16980 +25568 +18501 +27369 +810 +498 +22143 +30492 +17112 +18018 +22222 +9055 +16176 +29704 +10022 +7109 +15367 +17083 +29192 +28446 +26136 +24287 +15999 +9763 +1821 +15153 +1884 +23269 +18220 +8399 +13742 +23672 +30543 +10635 +6788 +10971 +8551 +4209 +17382 +22315 +22851 +1174 +18705 +5128 +2812 +27172 +27123 +584 +17044 +13731 +7655 +1499 +10446 +19849 +28082 +12030 +12624 +7685 +13502 +932 +13816 +19209 +9621 +13601 +31611 +11414 +11681 +3609 +23364 +332 +5154 +9385 +3724 +817 +28784 +7379 +22198 +19137 +21363 +1839 +32493 +11319 +16480 +10192 +29440 +31515 +20662 +12661 +26493 +24589 +8056 +16625 +20237 +11472 +22444 +9436 +6416 +23194 +532 +15739 +30073 +7834 +28203 +238 +6635 +16587 +21091 +28569 +17428 +8440 +32670 +1236 +30026 +5648 +17387 +28630 +9061 +5036 +22658 +8414 +23260 +16862 +30466 +30372 +3619 +29501 +29161 +6145 +3652 +9518 +27732 +17882 +26812 +30324 +3321 +12626 +9880 +16379 +18530 +8752 +10449 +15329 +7788 +31117 +7652 +26310 +26367 +23747 +19637 +1877 +2575 +5267 +12454 +2067 +16084 +27798 +8947 +3943 +11845 +7910 +3409 +491 +5339 +6156 +25031 +23282 +16260 +7981 +21452 +1881 +32741 +11889 +3746 +11923 +29653 +1972 +25842 +5616 +15382 +20849 +13737 +2605 +32341 +18411 +530 +31554 +20069 +20125 +28980 +13927 +23224 +28132 +15470 +27240 +30751 +2283 +16721 +25131 +26819 +22487 +13502 +8575 +31331 +29236 +13121 +20519 +22480 +30112 +10925 +7974 +10662 +5302 +22776 +5197 +25164 +6717 +23640 +26627 +20783 +11410 +4255 +24917 +22842 +23891 +13780 +23614 +26265 +20813 +7187 +26167 +32687 +3240 +20647 +7426 +3414 +12113 +2149 +15284 +13910 +11689 +17227 +513 +27176 +20844 +25946 +25036 +30444 +3811 +16561 +7919 +18088 +31309 +19691 +19784 +8131 +27019 +1978 +22788 +1217 +3596 +15044 +1327 +3905 +4857 +8893 +3197 +25140 +2977 +13255 +20563 +3935 +15910 +30470 +16921 +3092 +5737 +15752 +29379 +4396 +19764 +9300 +29854 +585 +4007 +9680 +31576 +14410 +13029 +13400 +26195 +19215 +16383 +6684 +8491 +13934 +25632 +6715 +1670 +30326 +4346 +3869 +12571 +30435 +22897 +534 +26373 +29153 +22151 +30776 +2890 +6662 +8328 +28793 +16807 +11146 +10358 +20230 +12446 +16584 +32183 +12775 +3523 +1530 +19453 +27348 +24643 +10289 +7543 +6742 +9653 +7059 +11574 +10273 +17701 +5338 +21985 +5297 +31838 +21001 +26781 +24613 +13176 +3696 +30775 +600 +25251 +15842 +25748 +12358 +30258 +27445 +12891 +27293 +23787 +22012 +31456 +4514 +11405 +11137 +84 +31304 +2211 +30469 +12843 +16523 +14217 +9531 +11726 +21265 +4540 +14082 +1923 +29700 +14182 +32611 +26521 +11050 +14377 +2251 +18392 +25927 +6443 +32137 +23847 +15541 +25955 +12171 +31103 +10049 +13348 +6997 +29201 +1351 +20968 +578 +21939 +19985 +30558 +30719 +32656 +21870 +15029 +32581 +21009 +26255 +10027 +4566 +9734 +12326 +9938 +12219 +14873 +15809 +10914 +20924 +11893 +31332 +15557 +23328 +22706 +30822 +26910 +26278 +31748 +31374 +10267 +2755 +12709 +31341 +14268 +28958 +3456 +10238 +3812 +23882 +19231 +7805 +22240 +32451 +3798 +19077 +5941 +10795 +1841 +15725 +32687 +21957 +31388 +27108 +31910 +30003 +3409 +1483 +403 +4204 +19335 +3410 +13780 +12800 +17369 +9047 +28604 +2192 +15860 +19195 +10719 +22409 +22917 +13958 +24220 +4896 +8545 +10110 +30187 +17299 +24311 +7170 +12649 +2974 +14835 +17772 +17057 +28219 +28724 +1063 +30621 +12191 +12785 +25805 +10669 +28017 +28198 +23173 +23158 +19021 +6981 +12957 +11071 +18553 +18459 +32099 +6776 +12262 +256 +26697 +13196 +7019 +21827 +17720 +7400 +2365 +2260 +15156 +12364 +2738 +15923 +23602 +2385 +28470 +9370 +7222 +13883 +1678 +30310 +26033 +30466 +22092 +21451 +18202 +13979 +24211 +17849 +30155 +10891 +18957 +29961 +8734 +17583 +9514 +25069 +22728 +25413 +30875 +10134 +28021 +27455 +25358 +6183 +10917 +14537 +3627 +15577 +17094 +4633 +6862 +1648 +16019 +2166 +24711 +14815 +25772 +29580 +7248 +25911 +22134 +29422 +27277 +26838 +24118 +8684 +10313 +24781 +10857 +27032 +6063 +31377 +29286 +7443 +25544 +742 +16439 +19485 +24436 +14344 +23476 +30685 +7082 +11292 +4833 +5613 +12532 +17367 +23434 +3497 +22565 +7533 +2589 +7097 +11870 +27581 +6600 +18397 +16449 +4539 +16851 +22776 +14451 +2589 +21567 +29536 +19800 +26441 +8608 +19813 +18954 +30590 +24120 +9759 +20123 +22850 +17493 +27261 +9100 +3085 +28653 +13451 +15501 +18740 +12151 +4355 +18039 +12568 +17932 +14103 +23687 +6287 +23231 +7806 +16605 +658 +4409 +8125 +13365 +4649 +1945 +2744 +18661 +148 +13706 +24440 +19734 +25531 +26790 +5438 +10311 +20695 +23051 +7113 +18431 +10082 +6460 +741 +30673 +4157 +18491 +29749 +16534 +32033 +25827 +27457 +10983 +13384 +7051 +22467 +217 +13404 +24281 +5678 +27388 +31904 +16611 +27264 +1174 +1373 +18829 +26954 +17180 +29839 +17951 +31484 +19698 +23249 +20005 +25974 +7012 +1158 +31116 +1997 +997 +11081 +1018 +13402 +1159 +5015 +22893 +21769 +28602 +25275 +18456 +17888 +21321 +14587 +21370 +4558 +13969 +23553 +25793 +32182 +3077 +32140 +21598 +3516 +29151 +27223 +2281 +28879 +7720 +11594 +10039 +32375 +4587 +29407 +4025 +13025 +28597 +14552 +9496 +21800 +4433 +5663 +6158 +13286 +14530 +9981 +13448 +9211 +30849 +27007 +27642 +11677 +12024 +5670 +6402 +5024 +12606 +16590 +14400 +8455 +277 +19936 +4724 +26828 +10785 +1980 +5082 +25581 +8811 +24673 +19651 +6583 +18966 +11103 +22388 +15959 +26208 +23550 +8003 +29598 +13276 +5040 +17648 +6164 +27630 +3252 +7234 +20545 +22919 +11533 +32482 +13879 +22818 +19874 +28796 +23396 +24575 +438 +20500 +2198 +26271 +27275 +4774 +26703 +21121 +25426 +17153 +1868 +15131 +4439 +17126 +22352 +9755 +9322 +2396 +8246 +5855 +21392 +23126 +2870 +3378 +25067 +13192 +13431 +20297 +14311 +27270 +28374 +6909 +23719 +14367 +9718 +6731 +23471 +11513 +2696 +14089 +25298 +19310 +29916 +10731 +9310 +17062 +10665 +24758 +18823 +1781 +27929 +6082 +273 +17271 +4120 +17078 +30274 +24809 +25566 +8320 +15367 +7627 +16315 +5779 +30821 +29620 +1314 +12133 +23587 +17909 +19961 +22567 +12982 +5490 +12576 +14791 +5741 +13757 +18752 +18724 +5341 +16243 +27093 +27281 +20367 +15324 +11902 +17548 +25833 +17854 +20613 +7616 +11610 +7042 +28330 +25144 +6346 +24202 +13109 +11237 +14401 +31697 +1083 +27220 +16342 +31173 +10799 +1448 +3290 +10081 +6317 +6366 +31814 +26767 +17795 +8002 +7522 +7101 +14849 +12588 +3256 +21694 +19075 +11264 +824 +26851 +8252 +24933 +26029 +2137 +324 +10693 +24671 +24774 +741 +30214 +23306 +1311 +4642 +15494 +20735 +5837 +32393 +23901 +22937 +27648 +29499 +22990 +27875 +12115 +2617 +31502 +12423 +13473 +26097 +17466 +22778 +32550 +32008 +19347 +27365 +13530 +1130 +22268 +26839 +31499 +9104 +22453 +14634 +30777 +24337 +8537 +20531 +30518 +25964 +30743 +27310 +26494 +10772 +21037 +25704 +14037 +31421 +26794 +30510 +16415 +31462 +29540 +28150 +19332 +12711 +11319 +6220 +23492 +5565 +30081 +2560 +17624 +17363 +16347 +29454 +18378 +19219 +2841 +7118 +12246 +15341 +7812 +20828 +11458 +25895 +21591 +20042 +26235 +27430 +5239 +27525 +1521 +9595 +23159 +9605 +12084 +28337 +25292 +16825 +10447 +21077 +23373 +8242 +11365 +17735 +13038 +1422 +7306 +21569 +25790 +26919 +7140 +29861 +23070 +4989 +16771 +25483 +16451 +6369 +26237 +16139 +27887 +31844 +18638 +17863 +11883 +1791 +32622 +26813 +8905 +7940 +31668 +6987 +29272 +11205 +5099 +3460 +2408 +20866 +21298 +15538 +11583 +4504 +2713 +1579 +2139 +6888 +24441 +10329 +2538 +22150 +21268 +24069 +13448 +31907 +32622 +32739 +14392 +15805 +1387 +22628 +29605 +19461 +26666 +5559 +14490 +20752 +20897 +1569 +28607 +7106 +31865 +2687 +30613 +4728 +16172 +27416 +23221 +13685 +29789 +31401 +14661 +15759 +15479 +13227 +443 +8987 +21642 +15335 +21718 +6421 +32354 +31293 +12505 +18580 +13801 +10928 +16394 +22637 +12223 +7350 +26219 +3367 +23831 +1983 +27320 +3359 +28885 +8708 +22178 +5372 +8678 +26002 +27210 +10326 +9951 +12182 +16127 +2722 +9945 +9706 +30012 +3169 +7051 +3809 +2525 +30857 +24746 +1871 +11938 +11828 +27774 +17116 +16870 +12935 +28101 +17035 +16800 +18149 +19148 +11654 +21914 +20309 +15820 +14380 +19697 +5425 +2691 +17757 +10958 +12817 +2323 +11781 +7779 +12023 +543 +23271 +553 +9148 +6180 +7340 +15960 +25275 +14869 +28203 +10918 +31932 +23354 +3323 +19269 +10530 +27722 +5175 +1303 +24153 +20935 +1424 +9524 +9850 +21403 +27801 +22430 +31809 +16881 +2127 +26947 +15409 +19285 +9960 +28980 +30214 +16399 +8157 +15653 +10843 +16060 +6202 +7461 +16540 +1582 +32038 +27294 +16687 +26758 +24750 +26256 +8158 +7056 +9430 +19209 +8840 +25183 +8418 +11241 +12296 +19498 +11489 +724 +4966 +1125 +16251 +632 +32573 +28707 +2557 +3329 +23916 +5291 +16034 +27097 +14081 +858 +27940 +5796 +16482 +18105 +8579 +20348 +21949 +3294 +12565 +10857 +29619 +2824 +25039 +25125 +30784 +22134 +22482 +11278 +14318 +11912 +30009 +13675 +13114 +29721 +6178 +9187 +30790 +18971 +25339 +13627 +31937 +7029 +31502 +23119 +31764 +537 +26960 +26964 +9679 +19306 +2406 +17228 +10322 +5581 +13049 +2250 +25536 +17293 +2363 +14824 +20769 +16117 +7354 +23942 +27094 +19368 +19301 +3013 +6978 +24900 +2780 +30658 +4790 +19255 +2300 +21655 +28062 +2528 +20139 +12688 +6634 +12523 +20704 +10666 +29375 +16102 +7159 +594 +25951 +10792 +1332 +5468 +10838 +7908 +3733 +8769 +24295 +10888 +26845 +25245 +2742 +20572 +16349 +32232 +23991 +17240 +15621 +14452 +12886 +16710 +27692 +31144 +8168 +19225 +28316 +1403 +10577 +13964 +10338 +1331 +21495 +21758 +21460 +15200 +13031 +11149 +10083 +32531 +12871 +30834 +31138 +23140 +12028 +413 +3991 +26659 +9884 +26769 +322 +19677 +2966 +32641 +24684 +26387 +2463 +23468 +3506 +4790 +18016 +8438 +26577 +7143 +27231 +17096 +16692 +15596 +32300 +13865 +18363 +17270 +26572 +20765 +19150 +14610 +5226 +21310 +2978 +10988 +6717 +21401 +971 +27852 +24244 +4043 +19971 +29514 +3305 +22621 +7481 +8533 +26692 +5724 +28125 +9444 +18287 +9789 +23915 +16122 +17275 +1007 +21558 +4832 +26448 +1090 +28023 +22686 +27482 +6008 +18837 +3771 +18801 +20777 +14007 +1847 +13578 +12636 +23432 +27590 +17309 +27363 +20554 +5454 +20822 +8951 +21022 +21155 +28159 +26133 +31890 +31361 +24109 +19992 +13675 +25802 +31914 +5527 +14005 +9986 +2083 +5249 +25353 +12296 +10514 +25079 +20510 +7959 +15343 +5994 +13204 +29181 +11154 +28918 +7676 +26266 +26604 +18174 +12331 +11163 +17639 +7432 +14016 +15480 +19866 +16859 +22515 +1196 +22450 +15574 +16289 +9780 +25372 +1171 +30102 +32587 +4600 +15037 +18969 +19300 +17594 +26927 +1214 +31591 +9890 +31823 +16744 +8496 +13919 +30377 +10140 +2630 +5887 +6607 +26638 +26072 +13594 +112 +11366 +4606 +3135 +26038 +25939 +27693 +6303 +5606 +8914 +16635 +16633 +17459 +25280 +14101 +17605 +16866 +415 +20862 +31396 +21157 +14757 +25866 +27400 +6705 +23563 +7450 +4895 +24353 +12435 +27545 +23558 +7951 +10075 +55 +4651 +12272 +18658 +8933 +26883 +27312 +4184 +3473 +22254 +6928 +7210 +8483 +21863 +12476 +24782 +4536 +20848 +28080 +18892 +26142 +22589 +3532 +29965 +26256 +19487 +9142 +29800 +22195 +11700 +9969 +16747 +5841 +17741 +28475 +20326 +2132 +14496 +6443 +26558 +20869 +22703 +4108 +15472 +23687 +13304 +14580 +23780 +11663 +14558 +31528 +30964 +27749 +29783 +8629 +7741 +15648 +14552 +21063 +23461 +17438 +14718 +5453 +30509 +28994 +25981 +11087 +8697 +28273 +4046 +11151 +22173 +19791 +12052 +10207 +19882 +20535 +16848 +20930 +13432 +27257 +8902 +23750 +4662 +21463 +22959 +6689 +1841 +19266 +13344 +2443 +21089 +25809 +12986 +23387 +18746 +32515 +5780 +8165 +11696 +15158 +6885 +8210 +3724 +5479 +9974 +6977 +7663 +30507 +1095 +26206 +10787 +25070 +25856 +10306 +9386 +3180 +18076 +12106 +25473 +3949 +31953 +7226 +2229 +32197 +28866 +24148 +15401 +907 +24680 +15540 +9126 +26777 +10813 +26862 +17700 +4676 +28971 +22251 +16215 +24669 +9397 +22017 +1149 +360 +14693 +10066 +871 +6684 +7541 +3431 +27334 +23579 +13761 +4365 +29368 +26610 +28396 +30574 +22675 +5716 +11986 +9588 +30961 +1171 +12846 +27739 +13308 +96 +8845 +31637 +2043 +11972 +28786 +29666 +3613 +2654 +15819 +22448 +17798 +5342 +25748 +21680 +22680 +22466 +26058 +8890 +18563 +4176 +19602 +29668 +11023 +8916 +20906 +12765 +26281 +12572 +19217 +1167 +6317 +28721 +13298 +24053 +4595 +6487 +22743 +1850 +5532 +4679 +29707 +27411 +17950 +10411 +18000 +6494 +27790 +31963 +30658 +16380 +1581 +30679 +19723 +5355 +17462 +26756 +31945 +28072 +27111 +9259 +12604 +32708 +13518 +17968 +564 +1733 +15190 +27407 +29498 +19263 +28049 +668 +16894 +18227 +9288 +5499 +4353 +25512 +27201 +6622 +14979 +2952 +27599 +13182 +22447 +4029 +14496 +31452 +18437 +6284 +17347 +10170 +17672 +8241 +19960 +15060 +20010 +12988 +9789 +740 +30964 +28459 +27797 +6357 +29050 +1481 +17179 +12102 +14078 +12231 +6472 +20802 +24804 +23576 +32129 +27710 +30678 +3473 +8420 +16724 +12088 +9794 +31060 +6591 +2766 +7183 +11715 +23191 +15531 +21139 +14527 +21453 +18270 +5686 +27968 +26218 +12377 +29836 +18864 +24068 +20129 +28145 +17724 +6529 +444 +15459 +858 +24336 +23768 +11168 +6555 +30564 +4664 +16000 +21427 +27699 +10980 +7573 +8646 +1519 +22161 +2816 +7413 +25796 +24526 +22422 +20009 +20690 +4209 +5429 +8991 +7596 +4673 +608 +15796 +15633 +6117 +27426 +2419 +23785 +23053 +31521 +17244 +11395 +13535 +15616 +24567 +9486 +29092 +17147 +31641 +29013 +2227 +13502 +16630 +20671 +26526 +16005 +29160 +4487 +1948 +7546 +32383 +32311 +24631 +17739 +22089 +23147 +566 +23307 +24547 +19140 +26317 +332 +17088 +17451 +16131 +12666 +28473 +24136 +20324 +7801 +4310 +9537 +9193 +23682 +22235 +18103 +10277 +19003 +16150 +13823 +28593 +30485 +20200 +9117 +15065 +747 +26259 +25607 +903 +13016 +6851 +8600 +7792 +14169 +16478 +30162 +15486 +24484 +5776 +17880 +22654 +13896 +15122 +32299 +23819 +17158 +21692 +2468 +3770 +28142 +8267 +8115 +1671 +16318 +19316 +17878 +18560 +31607 +18985 +8285 +17072 +19777 +4650 +28252 +16462 +2689 +26831 +19697 +7463 +16184 +12053 +7607 +17737 +1183 +22504 +11403 +19697 +23809 +29872 +28798 +11447 +4312 +1054 +1050 +28152 +18731 +28472 +12506 +21380 +25383 +24739 +10724 +19081 +14589 +25137 +21001 +12224 +23547 +27819 +10495 +13526 +31726 +21984 +15325 +29213 +30646 +18670 +13528 +28787 +21291 +13520 +26173 +14195 +3632 +23848 +27822 +11227 +6422 +31055 +17568 +19006 +25140 +3482 +28437 +2538 +14532 +27375 +407 +29724 +255 +137 +15734 +15203 +30076 +27656 +2626 +24402 +29126 +29628 +28555 +10346 +573 +22323 +27096 +2118 +13615 +8705 +14053 +10760 +26935 +27855 +29986 +16132 +5333 +14502 +12904 +21420 +17230 +20605 +17918 +14523 +17094 +23810 +4556 +19622 +16284 +5798 +1758 +12608 +18694 +16875 +2332 +14764 +31470 +25074 +3656 +7304 +18700 +19775 +5177 +13911 +10052 +4304 +19030 +26671 +2882 +19807 +2645 +24229 +852 +31475 +31797 +19702 +24199 +16045 +378 +26743 +8709 +16081 +17321 +12351 +18351 +8467 +515 +19730 +502 +7972 +31365 +5521 +255 +23933 +2592 +672 +29943 +28779 +24629 +8216 +18867 +15195 +24916 +17838 +22413 +5736 +5430 +9251 +1402 +26147 +15352 +29358 +6256 +4514 +26266 +18599 +11255 +715 +11960 +28532 +4110 +7394 +27015 +14521 +2112 +21841 +29203 +9403 +10247 +23224 +26295 +25878 +18529 +30261 +30173 +1952 +21169 +4853 +5623 +21916 +23768 +6139 +17598 +13091 +21140 +48 +10666 +2768 +10264 +23724 +14258 +4523 +20973 +11587 +10822 +28504 +32264 +15188 +31113 +5760 +18989 +25294 +8659 +22912 +29571 +30083 +23143 +1873 +15224 +9393 +6001 +7352 +32216 +7374 +29507 +21934 +13353 +16276 +23249 +11026 +25161 +10317 +6506 +2189 +10315 +26209 +8121 +18118 +30094 +6685 +8700 +13768 +6431 +24517 +27011 +17328 +11090 +13534 +30059 +2971 +3227 +17333 +18076 +22734 +30130 +16691 +29441 +27176 +21735 +18661 +23559 +453 +29891 +25415 +9304 +3316 +10209 +8785 +16601 +28763 +30219 +69 +16610 +17513 +1688 +27831 +10685 +3581 +17412 +13277 +353 +16212 +29906 +11288 +25712 +3384 +17823 +21955 +17262 +25703 +135 +22844 +9027 +2881 +28093 +3889 +31988 +15287 +6501 +32557 +6302 +16752 +31413 +99 +32692 +26684 +14413 +26810 +25210 +18111 +1491 +30232 +3265 +12630 +22227 +24051 +17892 +24909 +25302 +12054 +14339 +7236 +14016 +29105 +14975 +26591 +20335 +12708 +7094 +5549 +31122 +24333 +17920 +13147 +29382 +12560 +23530 +11034 +2040 +30438 +10162 +8269 +11511 +809 +31235 +21624 +18776 +7518 +21489 +8293 +13967 +9667 +30776 +19864 +11083 +22363 +16305 +23541 +4114 +21560 +19734 +32688 +31005 +26632 +31735 +25462 +16758 +11491 +9980 +31449 +848 +32340 +8540 +28929 +27046 +26277 +32670 +32657 +5912 +29296 +2959 +14808 +7682 +5731 +32644 +6202 +17886 +4947 +25810 +20445 +6620 +1156 +12683 +17047 +31936 +1079 +378 +4887 +15867 +4725 +1633 +10579 +27661 +10779 +2930 +13106 +24602 +12327 +10251 +28027 +16076 +10562 +32182 +16638 +27240 +24973 +7521 +1 +8755 +29360 +28634 +20461 +19208 +21537 +15758 +2874 +7474 +25010 +12675 +10136 +13199 +1118 +29587 +27743 +14312 +26964 +13802 +1337 +10379 +29509 +20930 +15629 +29482 +20971 +20318 +27951 +24824 +27610 +30021 +27847 +4098 +1675 +15041 +3199 +30155 +22694 +14743 +27249 +10027 +29328 +31496 +10831 +24938 +10549 +15368 +24020 +4248 +28439 +1213 +10604 +20271 +18327 +12091 +28959 +6892 +16516 +14719 +6595 +15083 +7650 +32425 +10851 +4865 +9211 +13182 +23018 +24671 +11180 +16926 +21780 +7012 +27881 +24834 +18582 +31426 +11155 +313 +31628 +21461 +12923 +28643 +1572 +21568 +18614 +18158 +28809 +20682 +3364 +2320 +17939 +9591 +25659 +1285 +26796 +25322 +25625 +23562 +12421 +17659 +27338 +18330 +9211 +11924 +19158 +31336 +21444 +9937 +14863 +14493 +10078 +4952 +28313 +852 +9657 +11254 +5690 +29522 +1571 +25466 +5092 +7946 +5493 +16855 +12160 +10193 +15228 +27509 +9213 +19038 +11434 +20951 +14233 +3717 +5118 +18804 +19055 +29236 +16689 +206 +1858 +11182 +10018 +5336 +8840 +24327 +13956 +16007 +21434 +25313 +24774 +21942 +29915 +28773 +20290 +9536 +29767 +23172 +6826 +19544 +1214 +10351 +3760 +10540 +14257 +12117 +17909 +2234 +28107 +1884 +10805 +6130 +18883 +30690 +9392 +21005 +4449 +14069 +2779 +26669 +10447 +6161 +4936 +24118 +5154 +1561 +24275 +22764 +11049 +25752 +25102 +22861 +27509 +13368 +15087 +24881 +5289 +5763 +16056 +15648 +31491 +3290 +19496 +28532 +15403 +3763 +11744 +30896 +16956 +21271 +6423 +31007 +16656 +26971 +5250 +26544 +6609 +32029 +21374 +23058 +20669 +24963 +20864 +6667 +313 +16304 +14783 +1054 +31769 +1159 +26400 +27486 +31791 +27044 +2146 +32396 +7442 +13719 +13450 +27256 +48 +3939 +31633 +13718 +19478 +310 +16204 +4318 +29183 +1643 +24733 +6634 +26012 +16574 +3288 +19019 +13091 +12494 +14200 +4140 +8090 +3544 +3075 +19498 +16229 +6322 +25659 +12402 +12047 +1543 +3718 +15645 +23125 +23505 +28832 +21960 +32121 +24092 +21119 +11384 +19653 +26361 +23942 +32173 +28253 +17856 +7151 +22980 +12874 +395 +1138 +30610 +13508 +6896 +24123 +19518 +22208 +10494 +2315 +25695 +14522 +28026 +30124 +14935 +9156 +15451 +23195 +1519 +3280 +21123 +28913 +16692 +7738 +30656 +17811 +24209 +29593 +2051 +27291 +27694 +29639 +16351 +5381 +8328 +29999 +26693 +29342 +3153 +6230 +15742 +17450 +28042 +1196 +11626 +2005 +24543 +29589 +18679 +16348 +26179 +13747 +1252 +8572 +2508 +7799 +9656 +14363 +2513 +488 +29437 +18613 +22849 +12466 +3522 +394 +25927 +7793 +1616 +16902 +24860 +7744 +3372 +1776 +4908 +24957 +23373 +18135 +24428 +9439 +11679 +19130 +2811 +14268 +28599 +20214 +29943 +18835 +29145 +30838 +16546 +10721 +17960 +27157 +11446 +26146 +8492 +1623 +5126 +29221 +22921 +10569 +21334 +18069 +25342 +26294 +4219 +8645 +24732 +6283 +7863 +22203 +10825 +18829 +31823 +22144 +24948 +18489 +9582 +24487 +28954 +28155 +14398 +28 +5370 +26260 +9796 +21807 +17428 +965 +28413 +13793 +6760 +26945 +8119 +13166 +7661 +7378 +5297 +7194 +31439 +18122 +14198 +27713 +4845 +11948 +13943 +22937 +31891 +16412 +29160 +25803 +19572 +9220 +6620 +7474 +18155 +14856 +14756 +754 +21619 +32301 +11364 +13117 +21860 +9925 +14071 +19170 +12528 +1693 +17158 +11031 +15198 +32618 +30563 +3208 +20357 +4209 +10668 +3231 +14219 +19831 +25885 +8470 +16607 +18920 +693 +7611 +6005 +17483 +3725 +14467 +17473 +7653 +30324 +14290 +27383 +27309 +15823 +14090 +8961 +9584 +12976 +11602 +1984 +21573 +24630 +8872 +23559 +10547 +14885 +16170 +23766 +27425 +15813 +8353 +8019 +13055 +1024 +8782 +5646 +18740 +183 +761 +6518 +12103 +27492 +5432 +3991 +8656 +3318 +26109 +3862 +7842 +28393 +1379 +6511 +15154 +10150 +23994 +18541 +22347 +16410 +17617 +2794 +30708 +28313 +13187 +19656 +22177 +8949 +20356 +9776 +28826 +8154 +13165 +28170 +8874 +7533 +8454 +19389 +7432 +12581 +2516 +9256 +15242 +30441 +6628 +32225 +3592 +14187 +12502 +14509 +7439 +1988 +29996 +13375 +14023 +7760 +28117 +16950 +20519 +22732 +19957 +32593 +18007 +12207 +24311 +28660 +3173 +4806 +13525 +31713 +4396 +27411 +6311 +9519 +27010 +15846 +21866 +5775 +2721 +11581 +21267 +25792 +8408 +20826 +11220 +8015 +20082 +10147 +10158 +3220 +24295 +4798 +19000 +11498 +14914 +10221 +24238 +24878 +9426 +17831 +11837 +20602 +5908 +12152 +19597 +26915 +14817 +11034 +9872 +6385 +21204 +23253 +16266 +6301 +11518 +20756 +18529 +26257 +18894 +6472 +32039 +19675 +26170 +12802 +29925 +3698 +8243 +13388 +20394 +6062 +18504 +9288 +28372 +19970 +11161 +9996 +9119 +23291 +25086 +6588 +32747 +3710 +27769 +17897 +13650 +13374 +12250 +12074 +11882 +30844 +6065 +13817 +20055 +14339 +28025 +3024 +661 +22371 +12290 +13444 +4868 +32109 +30495 +4322 +23605 +19695 +12177 +11912 +24564 +31153 +15155 +22789 +22550 +21680 +16744 +10292 +14212 +11161 +15298 +2005 +17800 +6025 +2804 +29806 +16215 +5892 +8186 +26977 +11232 +3891 +1415 +15438 +19924 +4194 +21935 +25004 +24566 +31162 +26581 +22179 +1957 +22587 +17111 +11308 +10663 +7421 +8057 +28523 +3383 +1703 +1807 +27468 +31058 +23088 +23151 +32605 +14399 +18133 +19734 +2028 +11613 +4443 +8346 +4962 +26929 +25223 +11344 +24798 +26544 +21723 +32061 +25621 +25801 +7570 +6722 +19049 +29494 +27870 +14468 +15688 +16772 +24928 +27674 +24008 +14689 +10985 +8443 +13696 +25894 +14448 +26662 +6313 +18341 +3411 +25875 +13686 +4660 +6610 +26458 +19633 +25850 +13001 +31906 +20375 +1401 +1198 +1740 +24308 +14172 +7627 +8801 +26498 +9091 +27580 +26938 +22400 +31053 +18475 +23918 +10639 +13861 +28875 +2177 +16593 +16207 +1683 +6858 +21060 +14836 +28732 +5925 +22364 +19821 +15358 +22234 +17887 +15308 +23686 +29134 +2310 +31921 +23867 +22248 +30674 +17995 +27059 +8390 +17580 +12461 +17520 +29345 +8768 +24403 +2271 +27006 +6555 +23796 +21651 +28055 +19843 +5514 +13245 +28681 +10007 +6816 +27888 +24767 +10152 +7643 +2068 +26782 +23510 +19916 +11432 +13298 +11247 +245 +13116 +22808 +1412 +23321 +1582 +10093 +6733 +22729 +11684 +27255 +12351 +27948 +8906 +27986 +16108 +7694 +17997 +19038 +22042 +18988 +5656 +21287 +2471 +1470 +32334 +7317 +24221 +14662 +24968 +31573 +30097 +28312 +13392 +31879 +28225 +30762 +18398 +9897 +16493 +24222 +8209 +3779 +1526 +16526 +28849 +3540 +29237 +4247 +7652 +8829 +29342 +23976 +23534 +19180 +13462 +4492 +18989 +25355 +3217 +20918 +9556 +21226 +31344 +28237 +27879 +6507 +18202 +2936 +6136 +32556 +30553 +28907 +13600 +32186 +4087 +11186 +4544 +9971 +26393 +28221 +17529 +6332 +32475 +23213 +14058 +18661 +9516 +9054 +2729 +13657 +21740 +11701 +30084 +17546 +5189 +9003 +28921 +25115 +19527 +7322 +22771 +9168 +21960 +21448 +21959 +692 +14202 +1841 +11631 +29833 +20813 +31770 +22533 +29044 +28935 +19155 +29571 +12777 +3106 +24907 +29370 +12501 +6886 +26586 +9104 +15883 +20679 +29771 +26750 +11505 +11777 +14121 +16713 +27500 +9842 +3916 +32511 +3337 +22967 +12195 +16182 +5740 +6283 +17219 +2689 +5374 +13148 +15281 +12851 +20178 +20015 +13676 +18775 +5849 +13749 +7870 +21743 +4423 +29102 +3269 +3949 +29764 +4223 +27325 +23408 +4312 +26639 +28559 +16832 +12305 +18407 +1439 +5772 +4214 +22666 +4307 +8674 +4016 +9233 +16095 +26480 +19575 +1035 +19929 +27001 +19643 +28819 +29945 +795 +29717 +27827 +23472 +13759 +22125 +3065 +19181 +1505 +13036 +19800 +1195 +17154 +8996 +18241 +28094 +22250 +19070 +24834 +30175 +30755 +4580 +5470 +27127 +23475 +15280 +31342 +7337 +16921 +23509 +2744 +4386 +31626 +76 +27533 +5156 +16236 +5570 +11432 +28497 +29460 +21632 +15620 +8885 +15292 +16794 +4350 +20632 +30664 +4187 +13740 +18306 +31547 +28657 +19836 +22159 +11123 +4437 +12817 +22516 +22061 +29054 +14170 +7634 +24501 +13254 +19445 +11579 +9324 +6300 +29379 +29570 +10624 +23660 +20939 +25032 +30952 +2763 +21076 +6852 +17566 +4583 +3647 +7890 +11553 +8750 +1698 +8767 +18218 +9790 +24491 +31187 +15533 +24333 +7603 +18848 +9492 +28762 +8097 +25098 +28855 +26963 +21122 +30488 +927 +5512 +23142 +7674 +23420 +8719 +11390 +15578 +23780 +25337 +22131 +22759 +9166 +17653 +28425 +28320 +29518 +14147 +27636 +16478 +8339 +6620 +22778 +18213 +5406 +31712 +11339 +12716 +17477 +13888 +13342 +7594 +12263 +11948 +22924 +30563 +22641 +20159 +13489 +11123 +13329 +31593 +11777 +5851 +2362 +6301 +10471 +24905 +18521 +25916 +29605 +11692 +16597 +15170 +30824 +19704 +19789 +48 +27562 +24375 +21261 +20921 +29645 +3793 +12497 +15024 +1526 +21020 +30911 +31793 +29735 +24359 +4511 +14095 +26783 +15811 +7005 +382 +19062 +9171 +12993 +13570 +18293 +2006 +28780 +151 +32564 +5554 +16151 +2850 +2935 +29123 +25864 +12823 +25034 +30244 +23765 +12396 +19034 +22077 +22877 +14783 +26647 +21645 +4356 +21955 +3592 +30393 +11310 +2032 +24046 +25558 +29438 +3947 +27676 +22771 +5712 +19251 +25750 +24555 +12277 +3726 +28009 +13417 +22062 +29107 +16970 +828 +24171 +27321 +17778 +28637 +11077 +15039 +441 +3134 +8633 +31581 +23025 +11989 +8614 +22603 +24965 +21225 +7562 +16720 +6739 +28444 +11641 +8302 +5062 +28218 +14687 +24652 +10040 +13889 +5751 +20196 +19847 +27056 +13323 +10349 +18933 +20245 +13165 +22155 +9798 +2769 +1846 +12213 +15380 +5935 +30142 +17127 +18293 +9893 +6876 +31626 +16081 +23657 +17631 +10656 +27645 +1847 +18636 +14900 +669 +19042 +10714 +11265 +12216 +24857 +12332 +3170 +24220 +26620 +19150 +2170 +12020 +22751 +22770 +24228 +22568 +9438 +13932 +15388 +30198 +6305 +10091 +21231 +31310 +30449 +32633 +13346 +16498 +30076 +8118 +14878 +32078 +2021 +10321 +3940 +2325 +9487 +31047 +7534 +15902 +29355 +24160 +28643 +26878 +768 +614 +22528 +1510 +4346 +1448 +23619 +18238 +26230 +21424 +16473 +8579 +22733 +5184 +12618 +22622 +1950 +21395 +25059 +18693 +18913 +15826 +9060 +28119 +29993 +2516 +18027 +22323 +27449 +28442 +20512 +5529 +6603 +17163 +20386 +20741 +22684 +6508 +24498 +2439 +20923 +1059 +8351 +15654 +24596 +20013 +13937 +28407 +4152 +19932 +5977 +19322 +12143 +10838 +13913 +26165 +5376 +12363 +22063 +19604 +4543 +4598 +4232 +27135 +12760 +11863 +23907 +31037 +15580 +15278 +9922 +32520 +8201 +28987 +13464 +2546 +11998 +3125 +31984 +13175 +26080 +19465 +9306 +7780 +7078 +16853 +15003 +28264 +19499 +3876 +32660 +29943 +27221 +28650 +15475 +3943 +25537 +11203 +32025 +29254 +17105 +19048 +13772 +24058 +6904 +10098 +8478 +30876 +11077 +16723 +25117 +18710 +25390 +24466 +14012 +3963 +13727 +27718 +18049 +30374 +26179 +7382 +22897 +23319 +15634 +17903 +825 +8970 +19483 +30406 +3742 +25561 +13204 +14224 +13606 +20628 +4127 +1854 +28424 +11742 +32607 +29822 +26449 +18186 +26299 +28142 +24665 +8311 +26737 +9635 +5222 +25385 +13023 +9178 +24222 +15785 +5646 +25853 +14386 +13855 +2945 +7898 +21960 +10669 +7228 +2335 +28970 +29966 +20759 +17688 +2862 +623 +6468 +16557 +12773 +14477 +21279 +12439 +5895 +1809 +25398 +32226 +671 +3112 +1432 +17064 +28147 +3943 +17763 +12812 +21174 +19934 +18056 +1909 +31345 +21370 +19938 +22796 +23087 +23968 +13175 +27000 +18024 +776 +11021 +21721 +2864 +7383 +3825 +13571 +13472 +11520 +6403 +6396 +4997 +15836 +13830 +27576 +19016 +30472 +24358 +9747 +28189 +25471 +9675 +26640 +2160 +9465 +23965 +21841 +1164 +4227 +4312 +20694 +21902 +28767 +10962 +29690 +24713 +26398 +1225 +23723 +30459 +12284 +16626 +12009 +28016 +14460 +8128 +25986 +6773 +20292 +15218 +19980 +18879 +25659 +21984 +19491 +28573 +5601 +9350 +16356 +10395 +2030 +18129 +11178 +20856 +16174 +21162 +29960 +17226 +32412 +9025 +23815 +32752 +25022 +22043 +2977 +23224 +12352 +8799 +19069 +26962 +9940 +30301 +19181 +18677 +12617 +1887 +4901 +975 +20970 +16309 +28350 +8883 +12825 +14075 +32363 +14078 +6189 +8365 +17146 +26826 +16008 +23791 +16270 +21847 +18429 +6037 +3867 +18870 +19809 +8570 +2339 +9655 +16495 +28671 +20911 +29461 +8161 +28385 +28816 +31968 +14541 +4161 +19415 +29484 +28989 +18158 +8594 +26360 +22546 +22261 +23754 +10849 +30235 +10347 +25018 +24840 +7281 +2169 +11601 +19648 +11286 +1194 +25578 +8828 +4813 +19569 +11082 +29560 +31036 +17662 +27610 +30375 +24129 +15170 +21799 +15966 +7057 +24641 +16791 +9790 +3991 +31640 +21870 +1383 +26764 +78 +29953 +28891 +19667 +28639 +28217 +6703 +23703 +14214 +29003 +5754 +18599 +29643 +13493 +6519 +31377 +17997 +24700 +28924 +2558 +10706 +7333 +19617 +31566 +28812 +24306 +7593 +884 +22702 +21471 +6964 +19731 +25391 +32476 +13992 +31449 +22750 +28108 +3164 +25372 +10663 +7101 +7303 +16564 +4644 +24298 +22633 +21784 +13159 +32238 +20408 +14268 +2310 +18507 +2637 +20138 +26984 +19995 +23055 +11359 +31824 +4885 +12576 +20200 +21415 +22723 +18503 +31806 +4750 +23553 +8606 +14302 +20132 +8634 +13180 +3500 +6037 +11999 +18341 +11786 +20707 +18344 +23217 +5940 +18937 +4623 +1978 +18399 +16493 +14217 +19530 +14098 +14485 +25095 +12419 +3396 +22606 +12333 +8080 +23223 +12297 +31954 +31820 +18196 +7702 +5560 +15922 +30280 +14389 +15757 +8837 +7838 +26458 +5410 +15808 +3101 +8641 +18410 +31040 +3364 +28467 +6070 +18736 +1092 +9110 +9135 +9909 +7006 +31675 +1684 +6747 +21502 +2148 +10293 +25280 +28919 +5013 +24112 +895 +30015 +27677 +14316 +18528 +13324 +17252 +4563 +2237 +11824 +2422 +19412 +14135 +14514 +29520 +16152 +2459 +10414 +5995 +20227 +17679 +111 +19591 +12654 +31361 +22986 +14010 +18980 +16209 +2493 +11960 +13722 +11837 +14665 +28516 +24307 +15501 +28557 +13720 +15668 +12161 +18724 +15921 +5060 +15864 +22720 +20063 +21032 +10849 +27911 +12843 +28412 +24807 +14253 +23881 +23092 +26072 +4564 +6688 +25237 +8279 +22944 +29464 +10862 +19779 +9503 +16931 +1948 +9830 +18008 +4750 +27325 +2530 +23729 +16650 +10676 +11737 +28550 +1526 +18781 +11356 +19975 +21999 +8850 +29590 +12370 +17562 +32350 +26170 +21970 +21937 +1408 +14378 +7384 +26700 +7972 +21352 +20343 +10354 +6877 +20802 +8613 +13024 +16870 +21434 +7311 +22296 +11162 +19251 +29501 +9133 +28977 +29795 +31847 +10446 +7357 +6773 +19862 +7442 +28516 +27005 +13182 +20611 +23263 +23842 +923 +6637 +18995 +6022 +780 +10856 +5551 +11385 +24236 +29475 +15911 +11487 +28791 +2420 +19311 +32351 +19995 +13597 +27162 +19278 +23773 +5345 +9332 +5850 +26287 +1352 +21181 +16763 +27792 +13742 +7848 +2455 +12835 +6034 +13844 +21620 +16019 +5149 +2314 +19299 +20134 +13298 +12023 +6443 +29728 +9525 +20267 +21427 +24155 +19422 +10385 +24052 +2083 +18496 +5296 +19999 +18135 +8148 +8675 +9226 +30398 +29771 +8405 +23521 +16552 +29908 +16704 +10506 +13510 +30123 +6630 +25944 +14026 +23010 +14287 +116 +30530 +15220 +4293 +31625 +30258 +32135 +29966 +15663 +19185 +13570 +23657 +18842 +11590 +4943 +10828 +11012 +31682 +16242 +17756 +5720 +15200 +18763 +7724 +6176 +19548 +8999 +314 +21936 +20561 +19854 +20519 +11924 +32150 +8520 +32311 +19000 +23514 +25521 +27657 +24022 +9726 +4415 +32407 +13989 +19762 +2641 +3441 +21568 +22868 +3642 +1078 +8020 +8837 +12430 +21331 +2190 +8205 +13484 +3072 +7108 +18545 +31628 +17271 +21346 +16083 +28618 +6519 +14360 +18826 +7156 +32250 +6337 +19970 +22288 +4658 +26263 +19925 +13169 +16586 +406 +8490 +7100 +26970 +301 +27214 +18997 +15148 +17708 +32402 +1616 +6958 +23274 +16485 +21620 +12599 +694 +9905 +1042 +30846 +24960 +28026 +18406 +28504 +10953 +11189 +17549 +16946 +20168 +19046 +16712 +3534 +30942 +6398 +26383 +5314 +27196 +31476 +14810 +1070 +31954 +27298 +14379 +9149 +23163 +19810 +19679 +3295 +13416 +21737 +32567 +17732 +1738 +27107 +3362 +22684 +13508 +23504 +23501 +19854 +2192 +21022 +27245 +4599 +25583 +14984 +13132 +14948 +11479 +12462 +10002 +12498 +16984 +6901 +11862 +11941 +1488 +30882 +23909 +7654 +17488 +7474 +18002 +15809 +3149 +21756 +5438 +9790 +15243 +12042 +25321 +1855 +20807 +26676 +27001 +16059 +20644 +13182 +1931 +8761 +16216 +23476 +15736 +6032 +3223 +31300 +4329 +22749 +27711 +16220 +669 +32709 +29254 +1860 +634 +13292 +31329 +14589 +3539 +6326 +10230 +10779 +25592 +22077 +2629 +992 +32004 +22931 +12498 +26010 +12003 +10297 +15381 +16447 +11426 +25312 +13925 +10054 +19451 +21343 +16674 +4808 +15648 +8692 +25122 +20183 +8392 +3519 +32094 +5151 +10360 +17532 +18142 +1468 +11539 +13696 +14562 +4186 +26533 +31735 +23122 +26259 +14444 +15452 +24936 +5765 +10280 +4409 +32411 +29875 +4005 +25377 +23503 +22559 +4485 +18411 +7100 +25508 +21075 +17712 +26012 +22681 +6854 +4615 +18713 +11940 +20562 +13312 +1654 +27867 +28661 +4958 +1788 +34 +30527 +25242 +4519 +2752 +26531 +29973 +2066 +26948 +20478 +24860 +14240 +26775 +2149 +2337 +2796 +26978 +3124 +26680 +10100 +27811 +7764 +15824 +17281 +17803 +9164 +29876 +16473 +27802 +24715 +24898 +21672 +12286 +628 +13034 +21292 +15656 +9899 +13546 +22944 +16304 +17695 +14920 +29676 +4459 +11864 +20752 +32651 +14282 +1922 +6351 +23356 +10870 +28859 +22607 +12012 +7977 +16793 +11925 +22499 +22224 +2048 +31513 +17711 +10207 +13602 +22853 +20558 +16884 +9431 +19249 +24095 +26287 +27423 +28572 +21515 +5072 +5109 +24366 +11631 +23187 +16726 +3308 +15693 +24649 +21394 +17916 +26676 +17463 +2003 +11419 +25197 +26291 +14571 +19036 +15975 +19837 +11874 +5539 +22373 +8540 +9664 +1634 +25702 +249 +535 +5650 +16212 +9472 +19925 +18164 +11377 +4469 +31432 +3721 +11775 +20564 +3186 +16207 +12336 +29036 +6287 +19902 +6477 +19325 +18917 +3203 +2601 +14993 +20811 +15356 +23241 +22424 +28925 +2292 +8012 +25927 +3615 +22176 +16673 +28210 +29839 +28634 +30826 +20520 +14575 +31644 +12715 +12495 +25843 +20672 +11191 +6017 +23016 +1270 +23005 +10342 +5509 +21254 +22094 +15570 +17654 +13384 +28882 +21729 +21031 +18785 +9643 +7760 +22350 +28223 +2249 +3231 +9403 +5463 +28977 +15973 +17636 +17950 +28839 +11251 +10924 +23238 +25507 +23341 +30196 +22842 +9587 +5284 +31332 +860 +13485 +22008 +29819 +31358 +21464 +32110 +6357 +4639 +29274 +27341 +27068 +11751 +27044 +4478 +32499 +18149 +23197 +14307 +11198 +29703 +14157 +24567 +12085 +4570 +17611 +5416 +23243 +25988 +8553 +7025 +23322 +22271 +6941 +15292 +3825 +7831 +25139 +10615 +6304 +423 +25649 +15733 +5507 +31376 +23307 +519 +10189 +26618 +23688 +19546 +16022 +8015 +30196 +24340 +18472 +32372 +8199 +21034 +14982 +22730 +5909 +15365 +7742 +23397 +25464 +22485 +1905 +17547 +7739 +9525 +10528 +2673 +15880 +15616 +28344 +19761 +30804 +22386 +18401 +12303 +713 +16259 +4740 +30189 +16627 +12160 +20251 +32012 +10799 +21228 +2877 +30213 +29649 +27030 +11881 +29191 +19349 +18427 +5394 +9298 +11848 +12510 +9708 +29428 +9911 +17446 +19830 +12996 +216 +32504 +3016 +10908 +15671 +2325 +159 +14810 +20644 +19318 +8614 +15897 +31771 +3109 +1799 +5165 +18676 +2910 +31282 +20573 +30028 +24039 +13037 +2532 +23730 +173 +28316 +21930 +10518 +24992 +19923 +19519 +22511 +22992 +9241 +14105 +24492 +21704 +9727 +16654 +350 +8491 +8546 +17941 +4771 +9869 +11260 +7737 +19414 +31892 +29746 +32734 +26228 +8016 +8217 +21817 +6098 +15575 +26313 +8457 +13309 +22565 +20455 +20123 +1266 +15666 +17774 +2301 +8703 +597 +25533 +30081 +21369 +4825 +13286 +28022 +20127 +32477 +15414 +4898 +21966 +3185 +4864 +24068 +2279 +17902 +24495 +31304 +29182 +406 +30219 +6026 +6725 +7789 +30667 +719 +13111 +29271 +10332 +10177 +8200 +9587 +24305 +21803 +27469 +30391 +17099 +24757 +29928 +9676 +15818 +1505 +25654 +32300 +20789 +7237 +10876 +16250 +14534 +266 +8592 +24353 +2042 +20389 +4804 +24369 +11671 +17877 +12824 +13942 +2429 +28382 +22943 +1498 +178 +29188 +4402 +5885 +15273 +8266 +11860 +24594 +31443 +7532 +6245 +2301 +11625 +16410 +32012 +11691 +13943 +1399 +222 +22961 +3116 +13266 +14419 +31016 +7522 +2211 +29931 +15047 +10601 +3529 +12956 +8003 +30233 +29187 +12672 +12772 +4119 +172 +1980 +9832 +359 +5307 +14259 +22556 +10803 +8955 +5741 +26169 +10202 +14215 +3650 +27005 +30268 +648 +2507 +32522 +14149 +20531 +4874 +9347 +19640 +2045 +29400 +8548 +12349 +3873 +23695 +31139 +13742 +10837 +29177 +9605 +9118 +15048 +11129 +2754 +20011 +29280 +28792 +29404 +8198 +23345 +27666 +31421 +15808 +20033 +27138 +14224 +12119 +13691 +18379 +3297 +15360 +13553 +17961 +28664 +25655 +5974 +18103 +5234 +9733 +6587 +16865 +15905 +30609 +29322 +269 +13350 +9194 +12224 +26885 +4429 +30228 +18543 +24744 +28073 +24145 +32115 +8146 +7537 +32177 +25972 +29320 +281 +17372 +16412 +15464 +8884 +2847 +27802 +18512 +7305 +24245 +8023 +12366 +1269 +22360 +13048 +27080 +23425 +14856 +12436 +16876 +13123 +17691 +27447 +22107 +5754 +22406 +19095 +22033 +24421 +24170 +8469 +5784 +612 +13538 +10487 +18797 +1362 +25100 +1253 +23987 +8225 +24917 +24481 +23063 +17080 +24842 +1803 +15106 +31753 +8988 +7764 +8454 +32375 +27700 +17282 +23427 +15719 +11511 +17445 +7065 +24612 +20891 +15704 +23379 +1529 +25515 +17146 +17681 +6025 +27158 +27182 +10038 +8562 +13182 +21265 +16403 +29730 +30400 +3515 +28180 +1272 +30143 +30328 +4137 +19616 +3702 +25928 +8824 +7848 +26174 +19604 +25409 +13927 +7004 +9011 +3089 +29968 +10446 +13725 +27434 +3345 +26710 +14958 +26930 +5810 +24264 +17950 +18204 +18923 +16017 +31231 +8276 +22918 +19593 +2680 +32047 +11126 +4858 +30848 +402 +27254 +3825 +6750 +992 +11493 +17348 +20383 +6186 +11489 +24803 +31832 +23442 +19875 +26084 +10141 +3072 +27163 +28874 +22850 +14345 +10444 +8854 +4817 +4892 +20713 +17937 +32716 +14830 +23729 +9432 +14628 +29481 +17672 +13992 +14329 +14416 +16983 +5867 +21396 +4854 +32421 +27780 +26274 +6688 +29942 +12247 +30643 +7159 +31204 +31517 +243 +16306 +10620 +20710 +13095 +11202 +13915 +1263 +20459 +31808 +22026 +13095 +30506 +5525 +18070 +28924 +990 +8040 +10611 +9451 +21514 +13261 +12179 +12359 +6132 +3755 +21187 +22344 +1192 +18798 +6213 +4952 +1450 +28399 +6324 +15258 +18938 +29600 +18708 +12221 +18510 +24060 +16696 +28927 +5771 +11054 +31577 +21892 +12421 +15360 +18676 +16857 +2552 +22023 +30948 +5316 +1991 +1293 +27328 +12623 +15475 +26815 +2935 +21268 +991 +15000 +30506 +6346 +23106 +6157 +15434 +28944 +2669 +23802 +31731 +21882 +3903 +6732 +25480 +32729 +17510 +29936 +15247 +1488 +16984 +30972 +1998 +1684 +400 +11549 +29863 +22275 +8462 +29249 +3505 +22504 +27657 +31621 +31128 +25229 +31479 +27232 +14135 +30594 +3008 +23313 +6132 +7085 +27966 +27975 +29531 +3987 +6648 +5392 +20478 +19686 +24096 +16389 +32140 +30287 +9418 +6835 +23599 +9596 +18543 +587 +19756 +17261 +674 +28302 +2230 +22268 +22289 +24563 +21778 +30123 +5566 +7707 +23282 +17075 +20607 +21112 +4875 +10313 +24500 +19256 +2296 +14131 +21065 +29304 +28499 +22668 +25836 +17831 +16657 +15827 +23695 +22839 +27678 +15163 +24608 +13451 +16698 +30766 +11655 +4637 +9492 +8739 +17889 +20463 +16037 +3490 +27900 +7221 +7886 +29076 +6163 +10817 +7477 +10448 +10186 +31662 +26205 +9699 +2413 +2513 +30468 +1312 +7013 +23388 +193 +26857 +28924 +21076 +29662 +3132 +20818 +15926 +10868 +14209 +3487 +32357 +28869 +914 +2731 +16600 +26335 +5899 +6538 +10497 +30574 +18901 +31645 +27392 +24545 +23278 +11718 +9993 +1472 +9338 +22251 +4370 +5453 +31247 +30126 +12482 +9562 +7485 +10602 +17814 +23658 +29789 +12913 +6997 +21259 +28572 +1413 +23223 +12147 +18503 +3732 +8785 +13914 +1625 +32440 +29636 +19735 +30786 +16751 +16679 +10494 +2298 +29975 +9905 +10232 +8262 +685 +7339 +3684 +31050 +12487 +11669 +9774 +6992 +19919 +31896 +31534 +24792 +19841 +10284 +12484 +14560 +30120 +21770 +11441 +3701 +30229 +27988 +4919 +634 +2016 +24579 +20597 +25527 +28642 +27793 +11004 +4390 +115 +18152 +7094 +12923 +30305 +8075 +26361 +29426 +19761 +23556 +13031 +10845 +26265 +2957 +5897 +8301 +8509 +25602 +24875 +22080 +15018 +21255 +2938 +556 +6288 +28533 +8157 +10698 +21828 +22283 +1169 +1607 +11126 +17490 +28168 +7911 +7471 +26833 +29186 +17882 +29198 +22386 +30701 +25411 +26819 +2868 +634 +14982 +14284 +22035 +3713 +5587 +14703 +17460 +792 +1008 +24313 +16213 +28398 +5195 +18229 +32373 +3821 +15679 +5167 +3520 +23056 +22694 +23594 +31421 +3714 +25249 +20959 +28858 +31736 +26276 +32761 +20856 +1872 +18117 +13261 +5651 +9067 +18757 +29534 +1077 +15175 +6239 +6801 +892 +18785 +8273 +31661 +7976 +6218 +30633 +7958 +9 +26760 +15826 +32330 +27304 +30639 +7134 +22044 +3509 +9408 +21397 +27697 +11441 +11714 +2239 +25528 +29404 +17055 +12463 +32110 +31329 +26945 +21521 +24273 +21440 +28397 +3828 +15523 +6525 +25311 +31515 +1187 +23559 +22055 +28800 +25223 +29163 +23747 +18474 +15421 +30777 +3070 +3377 +355 +3895 +29192 +18447 +27141 +8005 +17111 +20521 +150 +12816 +13885 +20381 +4913 +11259 +21323 +25934 +26640 +29130 +9445 +4397 +20813 +18065 +5030 +22219 +31705 +28124 +24822 +16924 +5562 +24096 +32617 +14990 +10121 +3938 +17499 +20554 +15659 +12838 +11978 +28618 +14799 +23194 +16244 +10140 +29480 +27651 +7729 +27764 +28652 +20584 +2195 +1912 +25998 +18558 +17851 +6856 +20791 +24533 +7038 +26701 +18443 +20800 +186 +18116 +23193 +26506 +2290 +28939 +10147 +9814 +17713 +7082 +31249 +18263 +5661 +31909 +3632 +22450 +11097 +12673 +23087 +432 +11297 +12180 +30172 +20136 +17697 +10898 +32155 +27948 +6037 +7509 +3239 +18291 +17831 +24812 +10893 +30215 +6149 +32232 +18405 +23215 +30914 +9186 +9812 +28575 +16240 +29521 +18367 +5855 +2683 +1419 +16593 +30201 +8647 +24344 +2736 +10726 +7821 +14399 +12283 +24379 +21619 +18379 +28935 +6800 +14314 +31774 +15195 +15665 +15821 +20089 +4201 +4616 +28727 +7306 +14223 +28362 +13477 +13367 +22350 +13665 +32589 +32170 +20937 +16794 +28606 +28573 +129 +3856 +4793 +14823 +11088 +9048 +17742 +21064 +22179 +2158 +30011 +20337 +17660 +25440 +14977 +15959 +18343 +29497 +1608 +23994 +15035 +1072 +25333 +27632 +18517 +8978 +393 +29431 +20241 +7405 +4157 +16059 +1993 +5886 +5724 +27044 +18065 +19165 +20832 +11107 +29427 +13031 +20304 +22014 +4967 +13036 +16985 +11546 +2070 +2330 +18860 +905 +20689 +4906 +11159 +19220 +31308 +13257 +15591 +649 +3743 +25673 +29052 +11784 +9470 +16009 +21038 +17803 +27832 +2849 +21472 +17845 +20334 +8146 +19427 +20188 +1686 +6702 +32142 +32345 +16432 +17028 +32027 +28175 +11975 +8974 +25539 +1594 +8362 +8030 +4381 +3450 +31340 +6150 +30132 +8991 +12442 +26247 +8936 +4023 +7355 +15740 +7175 +6101 +18830 +14599 +9387 +15652 +4735 +11132 +2135 +6573 +12907 +29261 +5965 +16741 +7573 +24374 +21682 +22010 +17128 +425 +4581 +14559 +4207 +23676 +29468 +1942 +22291 +21457 +6465 +20029 +27028 +24390 +27916 +7260 +4809 +19550 +18273 +26606 +16155 +7472 +29420 +27309 +30016 +20302 +17147 +26019 +31285 +5880 +15259 +30446 +15487 +23170 +1782 +28114 +25250 +31235 +13292 +18694 +6369 +12095 +31217 +19256 +31289 +4567 +32295 +20962 +12440 +2991 +21948 +23121 +10338 +18848 +16773 +24818 +29479 +29791 +24284 +1760 +13725 +15790 +18870 +10667 +15589 +3521 +27657 +22891 +5883 +23795 +30301 +22790 +19070 +1450 +15793 +5310 +2466 +6791 +31376 +15102 +31859 +3282 +9588 +25445 +32332 +12070 +27739 +28692 +27287 +24665 +32168 +5428 +21703 +27310 +9276 +13004 +18322 +25406 +28885 +27842 +26484 +5540 +27814 +11567 +5217 +18408 +4408 +31975 +26313 +25262 +384 +24136 +9170 +18848 +16450 +5699 +1233 +28696 +24485 +4010 +28169 +30226 +26135 +17593 +28841 +22866 +25700 +23271 +13312 +1746 +30994 +23790 +8707 +22638 +15615 +16152 +29441 +19155 +21822 +6604 +29860 +30628 +9774 +18010 +10284 +8175 +25564 +18947 +5096 +21200 +31644 +15180 +25590 +31844 +4834 +3461 +13883 +26865 +5990 +28308 +11685 +2131 +7288 +8967 +10400 +32169 +417 +3162 +14039 +18241 +7803 +17797 +10797 +2754 +28627 +457 +24314 +20888 +509 +6588 +6026 +16805 +5238 +29331 +1748 +7717 +12992 +11184 +26231 +7394 +15995 +15980 +13306 +23450 +9920 +31782 +28997 +430 +18627 +5772 +1115 +23052 +13736 +7721 +4698 +29022 +22949 +9008 +29108 +1140 +16474 +25735 +4015 +19183 +29293 +14615 +25883 +27183 +10346 +8019 +22100 +7295 +20186 +7943 +6775 +22656 +6049 +26979 +1512 +1235 +5277 +25415 +21508 +1035 +6013 +1489 +19492 +9425 +21214 +16677 +24018 +16985 +30893 +19836 +4175 +8454 +20921 +5743 +24901 +21337 +2711 +11397 +28361 +13087 +12731 +26876 +2196 +15067 +8916 +12245 +1155 +19313 +23400 +31779 +29260 +10773 +29872 +8852 +2690 +17012 +16054 +30272 +29900 +31009 +14509 +15282 +16738 +6722 +25232 +5684 +12744 +12411 +9215 +23392 +11471 +20506 +17494 +30948 +31177 +8837 +12303 +22677 +7948 +15841 +1882 +28343 +32681 +5380 +12795 +24203 +5230 +2973 +29795 +24858 +23578 +31394 +16914 +23105 +24287 +12539 +18732 +18430 +24862 +15469 +29530 +30713 +8542 +1736 +22500 +12118 +15757 +4948 +23308 +12474 +7035 +26746 +30381 +19611 +28820 +29103 +26645 +26573 +17630 +26022 +16159 +9291 +3379 +31926 +2709 +6210 +14527 +905 +7621 +16228 +19901 +5638 +11105 +4714 +29038 +3713 +12700 +28907 +30554 +29986 +29571 +18781 +21450 +31635 +31641 +11113 +3461 +20718 +25526 +12403 +2763 +23014 +24098 +26218 +21904 +6452 +15341 +10445 +13051 +21572 +27793 +5118 +10782 +16416 +13003 +32459 +22006 +17054 +2743 +9786 +7846 +5062 +32042 +30613 +13808 +19334 +23637 +9399 +29428 +10137 +9623 +28309 +26925 +5556 +1186 +21007 +22185 +19955 +13266 +761 +17800 +2436 +13770 +24933 +31928 +8594 +9297 +21812 +7151 +8821 +4203 +15324 +32490 +7960 +12219 +21627 +17380 +20650 +21273 +22045 +4441 +20104 +25199 +7242 +30460 +27242 +23001 +5588 +1526 +31949 +1021 +25055 +31841 +11681 +28071 +18225 +8197 +1333 +20137 +29115 +9298 +20831 +25586 +8809 +14237 +10991 +30446 +15655 +5023 +10070 +3613 +24884 +11563 +659 +759 +30635 +24367 +19807 +30974 +25678 +11503 +27545 +29221 +17558 +30589 +28404 +31841 +26873 +17019 +6623 +13453 +29819 +25620 +5812 +6788 +20088 +15417 +12069 +29305 +21168 +20249 +4068 +12186 +27539 +24291 +25746 +9189 +719 +24768 +22507 +29002 +29720 +26891 +17455 +30722 +28215 +27347 +8147 +15919 +28246 +26259 +29289 +3253 +16778 +25648 +24013 +15704 +14497 +21556 +1937 +30230 +31278 +13386 +28331 +19911 +7891 +4857 +31070 +5619 +975 +20133 +18278 +17908 +32712 +11203 +5223 +17229 +26073 +7772 +13976 +841 +735 +25285 +1451 +16855 +257 +16797 +13824 +18854 +23934 +6919 +29707 +2428 +23739 +5417 +19459 +29404 +10380 +2533 +10701 +24024 +1218 +4055 +32040 +28212 +17910 +14991 +19993 +13757 +30357 +28176 +19865 +4072 +22061 +24969 +11902 +29357 +7927 +11602 +21159 +12454 +15780 +42 +6252 +26724 +26476 +22448 +21572 +7442 +14933 +22559 +17080 +13389 +21441 +8014 +32393 +21826 +2363 +12007 +18205 +25866 +12163 +18919 +9008 +7234 +7127 +24918 +11192 +29167 +19332 +27720 +2840 +22416 +23982 +18197 +31882 +645 +19292 +30165 +22470 +16032 +2503 +26142 +29944 +1545 +740 +3073 +29921 +23127 +4143 +30275 +14668 +6892 +25530 +13784 +6579 +21649 +2934 +13478 +8243 +18003 +31426 +22391 +23213 +6045 +17970 +1855 +3134 +31639 +32161 +32145 +19170 +15806 +20601 +28764 +21859 +29636 +26690 +30954 +11656 +20650 +9577 +21018 +17020 +21788 +10835 +18909 +14204 +22797 +24738 +495 +4805 +10899 +25799 +23511 +24765 +15877 +968 +11298 +5984 +11090 +14163 +4315 +17902 +29861 +19460 +1871 +23763 +21047 +7667 +7423 +6614 +32628 +6018 +22501 +25734 +17745 +24165 +12780 +9954 +15853 +23282 +17322 +28232 +3430 +1451 +31328 +24736 +3070 +9993 +30004 +20937 +7535 +30091 +26029 +1347 +12684 +15871 +3952 +26654 +10777 +528 +17209 +20260 +8683 +14609 +28957 +1347 +20804 +7945 +11774 +13885 +2921 +15871 +18511 +402 +4485 +7559 +18441 +16814 +14018 +17549 +30190 +21327 +4517 +31073 +17918 +26938 +13995 +27651 +16694 +14366 +14370 +14001 +19088 +1736 +26441 +24751 +23351 +28297 +4779 +20310 +4619 +22501 +15801 +20832 +12885 +32637 +3495 +12402 +28108 +3902 +26504 +29931 +5576 +6092 +31661 +18412 +4037 +30249 +14906 +8104 +10523 +29098 +27914 +8686 +9724 +7708 +29382 +26868 +10158 +20018 +22336 +5733 +17930 +8754 +17686 +24750 +30774 +32480 +3204 +1670 +10399 +30890 +15241 +21692 +4153 +32534 +829 +10821 +13563 +21610 +26226 +9861 +10133 +7578 +28042 +28125 +23668 +5750 +23448 +12407 +15353 +13844 +8379 +24398 +17909 +20348 +1463 +15232 +25704 +31379 +19668 +11224 +18811 +20810 +17404 +1175 +29883 +19719 +1040 +11651 +15256 +20563 +22922 +21043 +28957 +10438 +4697 +2201 +2289 +5424 +11513 +6608 +20879 +7177 +9427 +22824 +8642 +15899 +22484 +13679 +5476 +20846 +16720 +28802 +13655 +4212 +1561 +10517 +9924 +10613 +3547 +8895 +15763 +23102 +9659 +30793 +3627 +25606 +26672 +9272 +23148 +25504 +26145 +2968 +30185 +23016 +19776 +30475 +32106 +28775 +1958 +9747 +32162 +17993 +4271 +26780 +25901 +20865 +31512 +27341 +24013 +8250 +25688 +7952 +26854 +1665 +20795 +29280 +23351 +1074 +12229 +14034 +5083 +28448 +31302 +28775 +2687 +11656 +14266 +28689 +4325 +3256 +21859 +26883 +25498 +32764 +5546 +27710 +26099 +21449 +4146 +30296 +9550 +8493 +32573 +31631 +32647 +3446 +22085 +7695 +2233 +8738 +24019 +31361 +3126 +18695 +20642 +14036 +17609 +14531 +13817 +16207 +10283 +23910 +30022 +24024 +25027 +2399 +24311 +6014 +22690 +31396 +9886 +31822 +23743 +38 +2629 +21844 +22383 +19316 +8974 +23791 +6952 +15022 +6927 +27994 +11895 +9901 +17516 +20856 +11839 +368 +19894 +9184 +9011 +20682 +3972 +26665 +26262 +20810 +12112 +19063 +29234 +19819 +5012 +12614 +14231 +29949 +25893 +3446 +23190 +16595 +6608 +5272 +27389 +11950 +17459 +20855 +31124 +24938 +9437 +14058 +9304 +29031 +14505 +8410 +30199 +31034 +16471 +28559 +13451 +10901 +32109 +10559 +31643 +30580 +8269 +19929 +15696 +7050 +9111 +18702 +1780 +4587 +4290 +11937 +9392 +17146 +27126 +11504 +134 +30357 +13612 +25027 +22669 +22144 +25736 +32085 +10349 +3344 +6134 +24481 +25114 +19480 +29700 +7151 +20949 +18457 +2560 +3742 +18784 +29605 +3411 +28979 +28288 +1812 +21020 +6306 +18617 +8299 +20752 +18909 +27205 +1929 +11409 +20635 +20566 +25235 +29453 +17514 +22158 +26274 +6810 +10232 +22971 +20652 +29135 +20126 +26071 +12976 +485 +13358 +2880 +24870 +7695 +13054 +14132 +3238 +7191 +17460 +11152 +21463 +29241 +13909 +29129 +22939 +13892 +1545 +25899 +11128 +14831 +17713 +12369 +1098 +16506 +15403 +23014 +14119 +2438 +12644 +15514 +20115 +11573 +800 +1639 +11237 +1413 +32646 +6918 +13049 +8426 +9967 +30124 +19991 +31274 +17520 +26122 +22052 +29054 +2214 +17540 +11015 +17127 +4801 +31152 +2142 +30158 +5075 +29970 +25187 +479 +30811 +28438 +22296 +9511 +17421 +4687 +32698 +10092 +3044 +26607 +11877 +1741 +14955 +9094 +25604 +18843 +2631 +10751 +2684 +29046 +25353 +28632 +16153 +19372 +1075 +2721 +14648 +6862 +10888 +4536 +6454 +21908 +7065 +10819 +11161 +30451 +17292 +23150 +27774 +7037 +20783 +32743 +22338 +26616 +31806 +1431 +20084 +30018 +25074 +13473 +10235 +15717 +9163 +15520 +10628 +17910 +13470 +20254 +303 +947 +32737 +27216 +1658 +13148 +22326 +12057 +20333 +9170 +21046 +24126 +26119 +11630 +3201 +22757 +10729 +21156 +28163 +16468 +10817 +17881 +27016 +4329 +1018 +20609 +23939 +21589 +4129 +22397 +795 +18205 +28315 +30900 +6007 +3410 +14597 +32240 +11083 +21135 +27116 +8443 +17571 +28981 +17454 +23801 +16111 +31971 +18096 +18696 +5456 +19512 +30786 +14359 +802 +24012 +6095 +6660 +9930 +13421 +31945 +23034 +4801 +1686 +13268 +13833 +30945 +23862 +9137 +19463 +23535 +32159 +18030 +22438 +29546 +15051 +17100 +24022 +11667 +2519 +29169 +16733 +31677 +30138 +7503 +31925 +21719 +20037 +211 +32038 +6711 +11872 +23890 +23332 +19113 +13699 +10034 +27627 +12216 +4211 +7509 +26713 +28987 +11583 +21579 +9483 +15140 +13946 +440 +6076 +24965 +12730 +5122 +9690 +12003 +23889 +25151 +30826 +18624 +10571 +95 +20765 +22115 +26536 +918 +7347 +21994 +4059 +17165 +16017 +19347 +12674 +24777 +20894 +14151 +29288 +9947 +23139 +31848 +13240 +1225 +9827 +10204 +14980 +14653 +21687 +16474 +30582 +29676 +17390 +3316 +18901 +31689 +24867 +32230 +22971 +9580 +5216 +9118 +26005 +9661 +17971 +24587 +7899 +3301 +14991 +15914 +29201 +30070 +15589 +7119 +22015 +13273 +22915 +4529 +32300 +4600 +8236 +17849 +3233 +25389 +11257 +5004 +7900 +31851 +27760 +14167 +21010 +23723 +27618 +26330 +6826 +4506 +3850 +1208 +2806 +9345 +2531 +23037 +25908 +7028 +1482 +496 +5317 +23231 +13525 +29724 +27308 +29325 +20082 +22681 +14666 +9434 +12612 +4768 +11096 +12188 +9786 +11599 +29221 +10029 +241 +5816 +10002 +27900 +6477 +21809 +31819 +3701 +23122 +8919 +6343 +6189 +25160 +7012 +15235 +10578 +28688 +26676 +506 +21331 +6592 +5778 +28136 +4555 +2182 +1095 +1601 +26292 +13755 +3685 +12140 +26313 +25926 +28240 +5828 +16955 +22836 +28942 +19793 +5529 +31381 +29905 +28099 +3834 +29593 +22723 +27056 +13164 +30444 +19217 +23055 +20641 +12367 +8506 +28405 +26328 +6775 +9882 +23182 +5898 +13866 +3378 +21343 +24919 +24216 +27833 +2490 +16304 +14071 +31721 +11394 +26821 +28003 +28675 +22816 +18225 +20213 +11940 +4806 +28900 +26914 +15820 +7395 +10961 +13397 +7724 +21735 +17626 +976 +31664 +26425 +23032 +14016 +24653 +31605 +16559 +26271 +21772 +13290 +14257 +3791 +7511 +7252 +6865 +26996 +30852 +25558 +11307 +32147 +5536 +32315 +15762 +6760 +9597 +2158 +17978 +15372 +14078 +3127 +12455 +5448 +18850 +32568 +27861 +15028 +16975 +6439 +4777 +11028 +11873 +23885 +8344 +12532 +243 +29504 +8854 +22913 +13932 +10973 +19777 +31915 +2638 +18312 +22862 +4729 +11067 +28328 +11060 +20908 +6473 +21853 +4888 +21399 +6791 +2436 +12537 +14654 +29135 +29165 +18717 +3502 +17359 +25051 +5307 +24988 +22099 +23485 +23274 +23617 +5589 +24364 +24009 +15733 +3399 +24101 +26608 +3338 +15391 +13704 +1559 +29547 +30372 +17617 +14598 +30582 +15480 +277 +11196 +7574 +12647 +7999 +14819 +9253 +9326 +12684 +21108 +22785 +20751 +21573 +678 +17516 +18132 +17852 +13597 +9513 +8994 +1418 +29008 +31189 +2368 +22279 +10043 +4995 +1192 +17162 +21319 +28060 +16781 +29922 +1654 +18165 +18348 +3733 +7891 +14385 +9048 +20568 +15385 +17242 +10432 +12110 +15523 +6331 +15748 +14213 +20116 +3328 +21624 +21807 +24903 +31889 +1975 +24861 +761 +6188 +31980 +3201 +30389 +22209 +32733 +2021 +3712 +2194 +32568 +358 +5574 +18315 +22434 +22070 +22532 +16607 +6398 +4946 +4023 +5093 +12794 +8575 +18821 +16946 +11744 +14475 +1963 +27895 +28828 +30146 +12711 +23452 +7433 +12718 +7206 +1950 +4480 +28948 +13616 +10662 +9891 +3372 +8338 +1002 +7271 +28447 +20620 +26057 +24928 +31431 +26300 +9378 +8273 +1186 +26954 +1525 +16371 +28439 +6229 +22205 +16646 +19181 +28574 +11277 +9878 +5897 +8308 +2281 +21647 +31592 +4063 +25959 +4228 +7005 +9488 +21255 +4284 +23307 +29705 +14927 +17791 +13349 +4233 +28075 +18591 +30181 +5434 +3459 +8009 +3147 +11038 +31134 +14861 +10904 +7479 +19382 +24364 +29962 +17525 +5981 +27426 +1497 +22502 +27407 +4980 +26994 +27929 +20121 +6076 +28146 +13523 +15017 +3314 +25062 +16373 +17846 +12028 +7746 +22701 +531 +25721 +30623 +15324 +18767 +24778 +29369 +16072 +28880 +4195 +22568 +11523 +9135 +15184 +863 +27291 +24022 +2571 +2274 +9859 +17496 +22653 +4044 +10562 +22288 +850 +31360 +3034 +14206 +7041 +15023 +25339 +222 +11292 +27787 +10857 +28042 +32341 +5449 +31915 +17810 +2002 +8413 +25333 +21145 +28466 +31473 +18776 +21746 +21216 +24359 +25384 +13820 +15895 +15504 +2990 +29627 +30774 +18541 +28431 +440 +6726 +7205 +1916 +6939 +5833 +31366 +15004 +16902 +8134 +6208 +9014 +26676 +5905 +927 +21283 +31954 +29920 +1928 +6515 +23453 +20619 +9655 +6367 +22846 +30627 +1079 +14959 +26850 +16183 +27171 +18540 +5918 +31586 +10139 +15752 +22018 +18713 +1289 +5196 +22139 +5683 +5526 +8899 +27374 +5050 +2279 +20069 +12050 +32369 +22556 +9286 +28943 +27045 +27147 +8575 +6101 +30777 +2746 +14301 +702 +12269 +21019 +23241 +7783 +21230 +22027 +8311 +10955 +27555 +17292 +17235 +28322 +30391 +15170 +4008 +21497 +22371 +3373 +2451 +10770 +509 +12197 +22312 +2174 +2246 +3483 +15074 +3961 +30448 +2062 +10832 +390 +9711 +18124 +19710 +29259 +30977 +13419 +28578 +1711 +11008 +16775 +14216 +562 +6760 +19261 +8767 +7564 +16292 +16616 +7557 +25225 +14749 +25883 +17264 +2340 +7301 +17887 +1759 +4579 +28385 +18478 +23584 +6514 +213 +25264 +10723 +8579 +2484 +25524 +3679 +19173 +14280 +24178 +17603 +15587 +7774 +7040 +14047 +13791 +11798 +10386 +1811 +304 +9065 +25462 +7800 +20024 +6011 +7247 +2894 +9418 +7971 +11025 +15270 +29371 +9272 +5181 +24656 +28358 +25887 +6366 +1031 +19621 +18066 +19908 +8924 +32366 +25522 +5632 +19936 +32555 +2128 +7329 +10005 +25277 +376 +10669 +16791 +9971 +28736 +28258 +12807 +486 +2767 +9390 +23352 +10648 +30640 +7660 +17181 +20684 +12121 +7393 +31731 +21800 +4087 +5879 +28075 +23178 +3964 +14520 +2970 +20391 +14315 +18830 +16996 +6122 +23011 +19129 +10789 +22156 +8555 +28049 +18658 +5871 +30973 +15614 +28976 +20033 +26325 +5685 +2339 +29262 +20602 +19637 +17785 +8613 +20622 +5505 +9480 +6383 +2771 +5535 +14437 +29067 +10879 +12241 +470 +25967 +30402 +28050 +31098 +5179 +10644 +8020 +439 +1438 +29892 +4089 +22500 +25838 +24893 +26512 +19768 +12803 +29852 +6481 +21491 +25428 +18672 +30939 +11467 +13653 +720 +21164 +16537 +8976 +20899 +9185 +29252 +17410 +26156 +19760 +29934 +2872 +2900 +23843 +29278 +9131 +19772 +19863 +3502 +26072 +23171 +20596 +3637 +8867 +3028 +1966 +16055 +16238 +15796 +17533 +19660 +24437 +26762 +10712 +13454 +5741 +8944 +20024 +1159 +24669 +31289 +14475 +1497 +23228 +19779 +21622 +5295 +31436 +5502 +14799 +13540 +15670 +19005 +25435 +12019 +2791 +19005 +12484 +16671 +20266 +30579 +20446 +12515 +31494 +28954 +26907 +18588 +29146 +6141 +11084 +3445 +6967 +18690 +4762 +14739 +5630 +31224 +1732 +18051 +18619 +9378 +11419 +5088 +19265 +11268 +1723 +30280 +25990 +10220 +16779 +14978 +8128 +17092 +18039 +26856 +8129 +5528 +29293 +21787 +20368 +11875 +2966 +17896 +2377 +11423 +21078 +16757 +17463 +8204 +18823 +18864 +32559 +5567 +4593 +5369 +25647 +32623 +29965 +3854 +24888 +24828 +31483 +11832 +12905 +28737 +10177 +26804 +6493 +4891 +15302 +22116 +15814 +26553 +5006 +19126 +29514 +17191 +695 +29397 +24733 +21014 +17973 +17423 +17376 +18414 +27082 +18055 +20538 +18454 +15561 +2076 +24757 +30083 +12811 +17304 +31836 +21631 +18226 +2077 +26514 +27324 +20253 +27853 +16052 +18840 +15276 +7353 +22002 +28339 +17077 +18188 +23146 +9903 +31303 +16249 +28807 +24134 +18462 +23266 +19354 +3475 +16486 +21577 +31414 +10649 +20405 +17916 +26321 +18456 +19522 +765 +15896 +24978 +19051 +23728 +18578 +23960 +20583 +8392 +25081 +21850 +17736 +23411 +5334 +14446 +14132 +10692 +4827 +16352 +21732 +10338 +1669 +23420 +13918 +19055 +31218 +1367 +20719 +9403 +20224 +10148 +12907 +31018 +1192 +181 +24488 +3683 +17817 +12624 +29241 +8123 +31768 +24885 +20839 +29024 +26391 +9708 +8822 +21706 +27797 +6100 +19478 +10591 +9525 +16745 +10535 +9573 +23842 +21717 +18098 +29485 +1570 +21434 +18724 +28286 +22265 +5439 +21708 +3648 +5120 +22105 +5528 +18026 +15622 +16475 +16908 +28205 +7271 +4545 +13699 +30305 +29547 +21817 +32170 +31793 +16354 +21235 +30522 +1027 +22269 +10282 +22005 +26794 +20846 +12531 +13284 +19152 +1219 +12358 +975 +3229 +1536 +25162 +765 +9645 +29052 +25829 +1581 +23345 +29694 +8836 +15828 +10339 +20759 +11048 +19865 +25392 +25282 +10161 +21263 +26913 +20027 +21359 +14258 +24715 +27165 +10215 +27172 +23031 +4543 +9954 +23208 +24020 +25040 +28348 +22239 +12892 +6705 +1259 +8387 +26051 +8466 +718 +23777 +26791 +25425 +4280 +13275 +17588 +3599 +23356 +17181 +15255 +23956 +28347 +14559 +23078 +32101 +9517 +14172 +19405 +13732 +4652 +23377 +31292 +25000 +6470 +440 +17743 +27613 +6788 +10438 +24381 +19165 +24886 +2082 +6405 +15311 +16642 +15464 +11029 +13824 +3372 +8670 +17981 +21441 +22055 +14965 +30932 +11392 +6493 +15107 +13353 +23594 +20284 +7104 +32301 +13248 +897 +18430 +7006 +20280 +25545 +18733 +15606 +3222 +28757 +2319 +32597 +8267 +15133 +1847 +17580 +17102 +24856 +7624 +14315 +13177 +10699 +12652 +1006 +3238 +30992 +26771 +2787 +9482 +32553 +17902 +10750 +31313 +21253 +16939 +21857 +24827 +25297 +16625 +6214 +30070 +26306 +32031 +17775 +2685 +16930 +18498 +25551 +4272 +32409 +14676 +9082 +13172 +19902 +9916 +26314 +9998 +15582 +1922 +11219 +25595 +1803 +6098 +25097 +19346 +12649 +23733 +30768 +29149 +23989 +25355 +11909 +2228 +32534 +21963 +31019 +10267 +23848 +18303 +32472 +28638 +4422 +19194 +32704 +15979 +27160 +14173 +12481 +30960 +24926 +13129 +22225 +8373 +4092 +25446 +11941 +12731 +19525 +22548 +27812 +1686 +24204 +5745 +24843 +15752 +30697 +22667 +3169 +23263 +22344 +24807 +12317 +9360 +18616 +32050 +10134 +29461 +27379 +5190 +5420 +29572 +26409 +23392 +12213 +5872 +1809 +3744 +15402 +11013 +21810 +18626 +32659 +22495 +13167 +22043 +13616 +32554 +5074 +7895 +21737 +14464 +16282 +1137 +13816 +26367 +22663 +20084 +22997 +9258 +100 +624 +27490 +31746 +21206 +17215 +15959 +13925 +7525 +4985 +23281 +10663 +456 +5942 +25046 +21102 +28277 +12547 +21580 +11475 +6505 +5671 +3227 +2743 +26933 +13847 +29375 +25442 +30794 +4407 +14675 +22627 +7814 +23251 +11962 +27555 +11518 +606 +28304 +8907 +18446 +32745 +32592 +5081 +2975 +32743 +10310 +5886 +26040 +18976 +2999 +6586 +21320 +32754 +20815 +20283 +27442 +3535 +27852 +14834 +25497 +27636 +19690 +19063 +32110 +2663 +32398 +3999 +569 +1076 +4150 +13275 +16420 +30184 +16800 +17364 +12365 +4942 +19385 +31300 +13133 +22633 +19658 +3352 +4100 +29106 +9438 +14276 +8360 +14227 +20086 +32486 +23054 +22819 +32624 +26910 +6455 +4644 +7733 +10540 +25374 +2106 +22306 +30028 +704 +11118 +24121 +1999 +12653 +13795 +10505 +1274 +13646 +9943 +11483 +16931 +8760 +21725 +27934 +10762 +10416 +29529 +26133 +14966 +7998 +10044 +8127 +22288 +12791 +1793 +29959 +28036 +25669 +8680 +23341 +9942 +20730 +27250 +13684 +8706 +21653 +8222 +269 +29655 +3539 +5218 +25923 +26645 +24697 +26348 +29673 +16326 +26209 +5401 +9729 +26842 +31428 +30903 +24750 +27398 +19398 +4599 +3676 +1502 +7751 +14518 +6189 +15409 +12265 +4333 +19367 +18597 +25437 +24182 +30877 +14228 +8947 +5121 +21339 +8742 +9570 +14678 +26389 +18095 +212 +1229 +9362 +31307 +14389 +17419 +22804 +12215 +11965 +28671 +6540 +3955 +11708 +2076 +28156 +23830 +26790 +4312 +18732 +9713 +11102 +20836 +6288 +29928 +7879 +11438 +30841 +1932 +20361 +12693 +22652 +16509 +25377 +15980 +7200 +21248 +10028 +21425 +971 +25564 +26356 +29198 +27119 +7034 +13115 +8081 +8304 +25916 +2120 +28712 +31321 +22557 +32304 +11617 +19904 +1163 +28519 +31071 +31223 +9089 +16774 +2335 +15860 +25321 +15455 +20973 +27395 +19249 +6975 +17953 +16298 +31276 +17538 +32031 +30429 +12075 +21341 +25230 +22371 +25691 +24552 +18648 +20360 +29026 +12650 +31458 +26884 +29493 +18154 +10509 +8491 +30013 +25075 +19821 +29015 +6058 +32678 +25417 +5011 +12054 +27654 +3539 +20361 +6495 +23424 +2601 +23470 +17342 +14010 +2187 +7852 +7724 +1181 +18655 +23823 +30710 +7845 +5730 +7988 +415 +7016 +32432 +23407 +28662 +7013 +24567 +12412 +31864 +25616 +10872 +15400 +16104 +29978 +28991 +23104 +7213 +1029 +9763 +22458 +18028 +2537 +7424 +26147 +2662 +20352 +12852 +23368 +26131 +9081 +12376 +2344 +9344 +9978 +20800 +14874 +31462 +23671 +30261 +7483 +25356 +25778 +29553 +12059 +11999 +5651 +2780 +27303 +4431 +23082 +29190 +20057 +6252 +32130 +32613 +415 +21697 +23977 +23248 +9866 +10737 +8572 +19771 +9144 +1168 +26552 +2997 +29316 +28996 +6078 +6559 +15724 +20765 +16551 +7726 +23234 +10033 +12936 +18724 +28566 +15228 +15879 +8906 +18148 +3830 +17950 +25394 +10490 +23798 +4143 +11435 +16173 +9671 +32329 +17796 +20413 +32392 +8121 +11526 +24069 +8777 +17365 +10156 +31463 +99 +31492 +7845 +20854 +17432 +12818 +28301 +15334 +4460 +21427 +359 +27825 +29507 +7253 +20446 +30731 +14012 +3115 +9661 +18825 +12237 +9078 +17835 +21005 +8991 +21782 +18476 +31221 +20780 +23378 +20949 +9092 +24215 +23268 +31951 +18832 +5579 +72 +4496 +1645 +15832 +838 +27349 +3866 +650 +15550 +8418 +28330 +10699 +15028 +22525 +3574 +4667 +32412 +20008 +21377 +14093 +20966 +1055 +26540 +13605 +23757 +7570 +26907 +3440 +27485 +21668 +7526 +8323 +3267 +7332 +27140 +8055 +30938 +20491 +8565 +28163 +26610 +1462 +28848 +12764 +18659 +26980 +30924 +2890 +338 +13171 +24818 +13067 +9282 +7127 +27778 +31084 +19167 +25691 +24964 +25254 +31624 +22044 +19282 +23671 +19227 +20035 +25988 +18689 +9348 +13826 +15132 +23271 +25224 +466 +17907 +32421 +10191 +5099 +6755 +19761 +8497 +7683 +27446 +17360 +7746 +24140 +29135 +15674 +11296 +21416 +1687 +26609 +7804 +17711 +30123 +13791 +13031 +14563 +23491 +303 +14943 +13746 +5990 +25197 +29977 +27821 +6732 +29665 +3217 +9608 +10003 +32296 +22480 +2642 +18215 +18964 +22013 +11893 +1259 +5062 +2855 +27888 +13868 +23306 +11089 +31188 +25288 +3315 +16319 +17149 +5019 +17079 +12928 +31763 +5546 +4557 +27709 +29121 +32147 +10565 +28736 +51 +30516 +14439 +8904 +18646 +11675 +23184 +9612 +843 +22318 +1097 +30349 +1453 +12828 +11688 +15649 +24580 +32003 +13804 +28988 +9993 +14306 +15444 +18690 +18973 +14658 +27200 +6283 +4228 +25505 +27275 +4085 +6630 +1823 +2599 +944 +32264 +15212 +15867 +11014 +26566 +15857 +2553 +233 +18261 +8253 +1412 +13057 +30647 +21171 +30977 +19190 +29567 +22386 +20667 +32251 +29895 +10629 +24829 +20123 +7279 +9292 +14186 +27848 +31895 +30506 +30111 +33 +8799 +29040 +28941 +18564 +31454 +12938 +5136 +16596 +12129 +2665 +15444 +12300 +21733 +5680 +4714 +21636 +2775 +25890 +5798 +5507 +25866 +12747 +24380 +26374 +15610 +31598 +17306 +19408 +17984 +2991 +28936 +8627 +597 +13441 +9342 +9245 +28555 +21074 +1478 +20709 +3912 +24182 +24531 +7000 +8070 +7634 +12896 +6527 +9096 +14282 +22732 +6067 +6110 +16748 +16949 +15972 +28060 +2269 +30420 +13862 +10455 +11524 +26265 +30205 +15968 +19830 +15623 +10218 +3268 +24226 +13905 +20405 +3204 +28222 +12726 +8189 +5009 +25585 +32026 +10623 +18444 +2625 +5606 +20643 +7739 +27584 +23329 +13644 +32207 +20595 +27855 +30945 +27221 +26499 +13450 +3735 +19193 +26919 +21343 +514 +11651 +15569 +28907 +24540 +8331 +28567 +10167 +11540 +256 +1765 +2768 +6171 +22233 +31585 +170 +20586 +7449 +26655 +28471 +12375 +4361 +14854 +30019 +9498 +25777 +27522 +11539 +283 +28824 +6252 +13375 +9342 +16574 +30262 +29900 +10225 +6358 +31835 +27533 +30133 +19401 +18694 +26555 +31979 +615 +3585 +32723 +27425 +19824 +4577 +14256 +6173 +7875 +4464 +5097 +4072 +1509 +3419 +5741 +26399 +19381 +20509 +24669 +17782 +18798 +14379 +29994 +21133 +5853 +4705 +23280 +28919 +27620 +4268 +5138 +29576 +20784 +10489 +11798 +14559 +31799 +26718 +25026 +22837 +29301 +1672 +120 +21092 +20455 +17765 +10959 +24123 +19656 +26898 +3187 +24321 +24202 +21511 +6463 +3655 +4120 +4993 +1945 +23027 +27979 +26672 +1037 +7050 +7595 +5921 +23085 +5565 +2663 +3823 +3751 +25655 +11159 +11558 +9896 +18854 +22704 +12280 +6258 +2056 +14408 +8227 +8505 +12088 +11020 +16162 +31810 +3512 +19967 +17811 +14143 +12224 +28661 +32232 +8164 +6280 +5711 +1874 +1743 +8659 +27896 +19690 +21399 +11708 +15776 +32034 +9778 +5829 +19000 +3435 +396 +2589 +9902 +5672 +15205 +14386 +28138 +4819 +11628 +1911 +28169 +21102 +25498 +13687 +10201 +9261 +17360 +4635 +15765 +3170 +27316 +16696 +11490 +3496 +14793 +11868 +28681 +21076 +21197 +7898 +25207 +16920 +31831 +3603 +1138 +20473 +11185 +16392 +31262 +3188 +12276 +13853 +25007 +18413 +14946 +29232 +23792 +20824 +16392 +13274 +27125 +7466 +28821 +7172 +26396 +24706 +15989 +25262 +24139 +27796 +13361 +2812 +29540 +22102 +4875 +16770 +4620 +13935 +30421 +20689 +13982 +3420 +31506 +22594 +28266 +6117 +7504 +12546 +27442 +8127 +22725 +11614 +17895 +5251 +14121 +7760 +19616 +30927 +21203 +19275 +30683 +28602 +1559 +18500 +25337 +30333 +17374 +22017 +25588 +5728 +21895 +14502 +7778 +6883 +31230 +12413 +11695 +6191 +8731 +261 +17047 +19900 +17982 +12862 +20450 +12611 +4392 +30772 +8804 +11750 +23579 +27850 +52 +25502 +14389 +1993 +11052 +29414 +266 +297 +25249 +8358 +13441 +2462 +16484 +24162 +3057 +1382 +3321 +675 +4732 +13650 +26390 +15782 +13483 +31251 +23136 +5699 +1354 +7623 +16737 +31521 +13190 +20420 +3789 +13336 +28230 +16036 +23030 +16359 +12487 +31889 +19084 +27159 +13434 +6610 +16282 +9519 +1058 +8599 +19902 +29977 +27690 +25857 +28841 +30164 +17476 +16501 +3031 +19036 +20040 +18210 +5775 +32727 +9804 +209 +3869 +12545 +32767 +9709 +4431 +30169 +11595 +1490 +11310 +27533 +10795 +858 +21246 +24739 +10698 +21413 +1400 +29034 +24797 +27433 +2886 +8352 +2370 +17659 +24256 +14437 +23258 +28765 +8934 +32607 +30115 +4232 +16541 +3631 +31002 +15035 +1838 +20756 +17616 +24195 +27644 +478 +7755 +9293 +17798 +9750 +14367 +28203 +7581 +23916 +22093 +26339 +30438 +3169 +3036 +19262 +8595 +12085 +19894 +22927 +31581 +24851 +22213 +4993 +14021 +25467 +6478 +15910 +1421 +12785 +14733 +19517 +17009 +28132 +19858 +7876 +30251 +12001 +24155 +18367 +21414 +760 +26163 +15175 +1921 +11119 +18506 +6869 +30407 +24998 +32150 +1744 +18669 +12362 +29417 +8790 +22797 +11454 +21587 +13639 +27234 +7366 +16827 +6296 +15364 +21622 diff --git a/M/TC/BIN/AAB.TXT b/M/TC/BIN/AAB.TXT new file mode 100644 index 0000000..a35016a Binary files /dev/null and b/M/TC/BIN/AAB.TXT differ diff --git a/M/TC/BIN/ABC.BAK b/M/TC/BIN/ABC.BAK new file mode 100644 index 0000000..e5bccd8 --- /dev/null +++ b/M/TC/BIN/ABC.BAK @@ -0,0 +1,70 @@ +#include +#include +#include +#include +#include + + + +void main() +{ +int i,j,k,l,list[1000]; +FILE *fp; +char any[8]; + +cout << "Enter a file name\n"; +cin >> any; + +fp = fopen(any,"wb"); + for(j=0;j<50;j++) + { + for(i=0;i<200;i++) + { + k = rand() % RAND_MAX; + fwrite(&k,sizeof(int),1,fp); + } + } +fclose(fp); + +fp = fopen(any,"rb"); + i = 0; + while (fread(&l,sizeof(int),1,fp) != 0) + { + list[i] = l; + i = i + 1; + } +fclose(fp); + +for (i=0;i<50;i++) + cout << list[i] << '\n'; + +/*for(i=0;i<900;i++) + { + k = list[i]; + fwrite(&k,sizeof(int),1,fp); + } + +fp = fopen("ggg.txt","wb"); + for(int a=1;a<900;a++) + { + int v = list[a]; + int b = a; + while(list[b-1] > v) + { + list[b] = list[b-1]; + b = b - 1; + } + list[b] = v; + } + for(i=0;i<900;i++) + { + k = list[i]; + fwrite(&k,sizeof(int),1,fp); + } +fclose(fp); */ + + +} + + + diff --git a/M/TC/BIN/ABC.CPP b/M/TC/BIN/ABC.CPP new file mode 100644 index 0000000..c5cf42b --- /dev/null +++ b/M/TC/BIN/ABC.CPP @@ -0,0 +1,70 @@ +#include +#include +#include +#include +#include + + + +void main() +{ +int i,j,k,l,list[1000]; +FILE *fp; +char any[8]; + +cout << "Enter a file name\n"; +cin >> any; + +fp = fopen(any,"wb"); + for(j=0;j<50;j++) + { + for(i=0;i<200;i++) + { + k = rand() % RAND_MAX; + fwrite(&k,sizeof(int),1,fp); + } + } +/*fclose(fp); + +fp = fopen(any,"rb"); */ + i = 0; + while (fread(&l,sizeof(int),1,fp) != 0) + { + list[i] = l; + i = i + 1; + } +fclose(fp); + +for (i=0;i<50;i++) + cout << list[i] << '\n'; + +/*for(i=0;i<900;i++) + { + k = list[i]; + fwrite(&k,sizeof(int),1,fp); + } + +fp = fopen("ggg.txt","wb"); + for(int a=1;a<900;a++) + { + int v = list[a]; + int b = a; + while(list[b-1] > v) + { + list[b] = list[b-1]; + b = b - 1; + } + list[b] = v; + } + for(i=0;i<900;i++) + { + k = list[i]; + fwrite(&k,sizeof(int),1,fp); + } +fclose(fp); */ + + +} + + + diff --git a/M/TC/BIN/ABC.EXE b/M/TC/BIN/ABC.EXE new file mode 100644 index 0000000..3302aca Binary files /dev/null and b/M/TC/BIN/ABC.EXE differ diff --git a/M/TC/BIN/ABC.OBJ b/M/TC/BIN/ABC.OBJ new file mode 100644 index 0000000..53eadc2 Binary files /dev/null and b/M/TC/BIN/ABC.OBJ differ diff --git a/M/TC/BIN/ABC.TXT b/M/TC/BIN/ABC.TXT new file mode 100644 index 0000000..c7aedbf --- /dev/null +++ b/M/TC/BIN/ABC.TXT @@ -0,0 +1,1170 @@ +Ten random numbers from 0 to 99 + +217 +206 +219 +218 +172 +153 +9 +186 +82 +141 +184 +225 +147 +137 +40 +172 +230 +122 +129 +50 +122 +24 +40 +33 +176 +1 +72 +77 +80 +90 +133 +105 +146 +116 +182 +58 +48 +229 +185 +137 +210 +223 +210 +200 +154 +85 +22 +40 +65 +107 +213 +49 +177 +87 +215 +33 +52 +150 +0 +98 +69 +104 +38 +86 +85 +39 +138 +61 +169 +133 +69 +9 +209 +53 +221 +208 +172 +123 +55 +187 +130 +183 +111 +222 +41 +222 +126 +16 +189 +106 +187 +147 +113 +44 +13 +142 +162 +176 +175 +10 +158 +137 +101 +107 +65 +13 +46 +217 +128 +155 +83 +31 +129 +211 +198 +193 +178 +181 +142 +108 +177 +126 +210 +57 +28 +79 +139 +3 +66 +118 +151 +58 +97 +226 +2 +151 +192 +122 +168 +43 +72 +30 +209 +186 +87 +209 +107 +116 +117 +69 +206 +134 +90 +33 +60 +148 +87 +23 +71 +187 +147 +10 +111 +21 +177 +215 +172 +189 +96 +129 +25 +149 +155 +179 +49 +157 +42 +216 +118 +109 +72 +101 +127 +77 +30 +91 +82 +164 +208 +110 +26 +167 +87 +26 +106 +83 +182 +32 +114 +141 +64 +228 +1 +208 +65 +162 +188 +72 +124 +136 +174 +190 +85 +214 +41 +91 +7 +12 +115 +49 +16 +44 +27 +150 +220 +201 +198 +36 +0 +78 +77 +206 +Ten random numbers from 0 to 99 + +217 +206 +219 +218 +172 +153 +9 +186 +82 +141 +184 +225 +147 +137 +40 +172 +230 +122 +129 +50 +122 +24 +40 +33 +176 +1 +72 +77 +80 +90 +133 +105 +146 +116 +182 +58 +48 +229 +185 +137 +210 +223 +210 +200 +154 +85 +22 +40 +65 +107 +213 +49 +177 +87 +215 +33 +52 +150 +0 +98 +69 +104 +38 +86 +85 +39 +138 +61 +169 +133 +69 +9 +209 +53 +221 +208 +172 +123 +55 +187 +130 +183 +111 +222 +41 +222 +126 +16 +189 +106 +187 +147 +113 +44 +13 +142 +162 +176 +175 +10 +158 +137 +101 +107 +65 +13 +46 +217 +128 +155 +83 +31 +129 +211 +198 +193 +178 +181 +142 +108 +177 +126 +210 +57 +28 +79 +139 +3 +66 +118 +151 +58 +97 +226 +2 +151 +192 +122 +168 +43 +72 +30 +209 +186 +87 +209 +107 +116 +117 +69 +206 +134 +90 +33 +60 +148 +87 +23 +71 +187 +147 +10 +111 +21 +177 +215 +172 +189 +96 +129 +25 +149 +155 +179 +49 +157 +42 +216 +118 +109 +72 +101 +127 +77 +30 +91 +82 +164 +208 +110 +26 +167 +87 +26 +106 +83 +182 +32 +114 +141 +64 +228 +1 +208 +65 +162 +188 +72 +124 +136 +174 +190 +85 +214 +41 +91 +7 +12 +115 +49 +16 +44 +27 +150 +220 +201 +198 +36 +0 +78 +77 +206 +Ten random numbers from 0 to 99 + +217 +206 +219 +218 +172 +153 +9 +186 +82 +141 +184 +225 +147 +137 +40 +172 +230 +122 +129 +50 +122 +24 +40 +33 +176 +1 +72 +77 +80 +90 +133 +105 +146 +116 +182 +58 +48 +229 +185 +137 +210 +223 +210 +200 +154 +85 +22 +40 +65 +107 +213 +49 +177 +87 +215 +33 +52 +150 +0 +98 +69 +104 +38 +86 +85 +39 +138 +61 +169 +133 +69 +9 +209 +53 +221 +208 +172 +123 +55 +187 +130 +183 +111 +222 +41 +222 +126 +16 +189 +106 +187 +147 +113 +44 +13 +142 +162 +176 +175 +10 +158 +137 +101 +107 +65 +13 +46 +217 +128 +155 +83 +31 +129 +211 +198 +193 +178 +181 +142 +108 +177 +126 +210 +57 +28 +79 +139 +3 +66 +118 +151 +58 +97 +226 +2 +151 +192 +122 +168 +43 +72 +30 +209 +186 +87 +209 +107 +116 +117 +69 +206 +134 +90 +33 +60 +148 +87 +23 +71 +187 +147 +10 +111 +21 +177 +215 +172 +189 +96 +129 +25 +149 +155 +179 +49 +157 +42 +216 +118 +109 +72 +101 +127 +77 +30 +91 +82 +164 +208 +110 +26 +167 +87 +26 +106 +83 +182 +32 +114 +141 +64 +228 +1 +208 +65 +162 +188 +72 +124 +136 +174 +190 +85 +214 +41 +91 +7 +12 +115 +49 +16 +44 +27 +150 +220 +201 +198 +36 +0 +78 +77 +206 +Ten random numbers from 0 to 99 + +217 +206 +219 +218 +172 +153 +9 +186 +82 +141 +184 +225 +147 +137 +40 +172 +230 +122 +129 +50 +122 +24 +40 +33 +176 +1 +72 +77 +80 +90 +133 +105 +146 +116 +182 +58 +48 +229 +185 +137 +210 +223 +210 +200 +154 +85 +22 +40 +65 +107 +213 +49 +177 +87 +215 +33 +52 +150 +0 +98 +69 +104 +38 +86 +85 +39 +138 +61 +169 +133 +69 +9 +209 +53 +221 +208 +172 +123 +55 +187 +130 +183 +111 +222 +41 +222 +126 +16 +189 +106 +187 +147 +113 +44 +13 +142 +162 +176 +175 +10 +158 +137 +101 +107 +65 +13 +46 +217 +128 +155 +83 +31 +129 +211 +198 +193 +178 +181 +142 +108 +177 +126 +210 +57 +28 +79 +139 +3 +66 +118 +151 +58 +97 +226 +2 +151 +192 +122 +168 +43 +72 +30 +209 +186 +87 +209 +107 +116 +117 +69 +206 +134 +90 +33 +60 +148 +87 +23 +71 +187 +147 +10 +111 +21 +177 +215 +172 +189 +96 +129 +25 +149 +155 +179 +49 +157 +42 +216 +118 +109 +72 +101 +127 +77 +30 +91 +82 +164 +208 +110 +26 +167 +87 +26 +106 +83 +182 +32 +114 +141 +64 +228 +1 +208 +65 +162 +188 +72 +124 +136 +174 +190 +85 +214 +41 +91 +7 +12 +115 +49 +16 +44 +27 +150 +220 +201 +198 +36 +0 +78 +77 +206 +Ten random numbers from 0 to 99 + +217 +206 +219 +218 +172 +153 +9 +186 +82 +141 +184 +225 +147 +137 +40 +172 +230 +122 +129 +50 +122 +24 +40 +33 +176 +1 +72 +77 +80 +90 +133 +105 +146 +116 +182 +58 +48 +229 +185 +137 +210 +223 +210 +200 +154 +85 +22 +40 +65 +107 +213 +49 +177 +87 +215 +33 +52 +150 +0 +98 +69 +104 +38 +86 +85 +39 +138 +61 +169 +133 +69 +9 +209 +53 +221 +208 +172 +123 +55 +187 +130 +183 +111 +222 +41 +222 +126 +16 +189 +106 +187 +147 +113 +44 +13 +142 +162 +176 +175 +10 +158 +137 +101 +107 +65 +13 +46 +217 +128 +155 +83 +31 +129 +211 +198 +193 +178 +181 +142 +108 +177 +126 +210 +57 +28 +79 +139 +3 +66 +118 +151 +58 +97 +226 +2 +151 +192 +122 +168 +43 +72 +30 +209 +186 +87 +209 +107 +116 +117 +69 +206 +134 +90 +33 +60 +148 +87 +23 +71 +187 +147 +10 +111 +21 +177 +215 +172 +189 +96 +129 +25 +149 +155 +179 +49 +157 +42 +216 +118 +109 +72 +101 +127 +77 +30 +91 +82 +164 +208 +110 +26 +167 +87 +26 +106 +83 +182 +32 +114 +141 +64 +228 +1 +208 +65 +162 +188 +72 +124 +136 +174 +190 +85 +214 +41 +91 +7 +12 +115 +49 +16 +44 +27 +150 +220 +201 +198 +36 +0 +78 +77 +206 diff --git a/M/TC/BIN/ASSIGN1.BAK b/M/TC/BIN/ASSIGN1.BAK new file mode 100644 index 0000000..2ec7dda --- /dev/null +++ b/M/TC/BIN/ASSIGN1.BAK @@ -0,0 +1,200 @@ +/* A program to sort a range of numbers with Insertion + and Quicksort, check their sorting time and prompt + the result on the screen */ + + +/* use header file*/ +#include +#include +#include +#include +#include +#include +#include + +/* define variable */ +const int max=29000; +int list[max]; +FILE *fp; +clock_t start,end; +char any1[8]; + +/* Insertion sort module */ +void insertion(int min1,int max1) +{ + int a,b,v; + + for(a=min1;a<=max1;a++) + { + v = list[a]; + b = a; + do + { + list[b] = list[b-1]; + b = b - 1; + } while(list[b-1] > v); + list[b] = v; + } +} + +/* sort partitioning element */ +void sorthree(int x,int y,int z) +{ +int temp; + +if (list[x] > list[y]) +{ + temp = list[x]; + list[x] = list[y]; + list[y] = temp; +} +if (list[z] < list[x]) +{ + temp = list[x]; + list[x] = list[z]; + list[z] = temp; + temp = list[y]; + list[y] = list[z]; + list[z] = temp; +} +if ((list[z] > list[x]) && (list[z] < list[y])) +{ + temp = list[y]; + list[y] = list[z]; + list[z] = temp; +} +} + +/* Quicksort module */ +void quicksort(int min2,int max2) +{ +int v,t,i,j,q; + +if ((max2-min2) > 9) +{ + int m = (max2-min2+1)/2; + sorthree(min2,m,max2); + max2=max2-1; + q = list[m]; + list[m] = list[max2]; + list[max2] = q; + + v = list[max2]; + i = min2+1; + j = max2-1; + do + { + do + { + i=i+1; + } while (list[i] < v); + do + { + j=j-1; + } while (list[j] > v); + t = list[i]; + list[i] = list[j]; + list[j] = t; + } while (i> any1; /* input data file name on */ +cout << '\n' << "Generating file...waits\n\n";/* screen */ + +fp = fopen(any1,"w"); + for(j=0;j> any2; + +fp = fopen(any2,"w"); + for(i=0;i +#include +#include +#include +#include +#include +#include + +/* define variable */ +const int max=29000; +int list[max]; +FILE *fp; +clock_t start,end; +char any1[8]; + +/* Insertion sort module */ +void insertion(int min1,int max1) +{ + int a,b,v; + + for(a=min1;a<=max1;a++) + { + v = list[a]; + b = a; + do + { + list[b] = list[b-1]; + b = b - 1; + } while(list[b-1] > v); + list[b] = v; + } +} + +/* sort partitioning element */ +void sorthree(int x,int y,int z) +{ +int temp; + +if (list[x] > list[y]) +{ + temp = list[x]; + list[x] = list[y]; + list[y] = temp; +} +if (list[z] < list[x]) +{ + temp = list[x]; + list[x] = list[z]; + list[z] = temp; + temp = list[y]; + list[y] = list[z]; + list[z] = temp; +} +if ((list[z] > list[x]) && (list[z] < list[y])) +{ + temp = list[y]; + list[y] = list[z]; + list[z] = temp; +} +} + +/* Quicksort module */ +void quicksort(int min2,int max2) +{ +int m,v,t,i,j,q; + +if ((max2-min2) > 9) +{ + m = (max2-min2+1)/2; + sorthree(min2,m,max2); + max2=max2-1; + q = list[m]; + list[m] = list[max2]; + list[max2] = q; + + v = list[max2]; + i = min2+1; + j = max2-1; + do + { + do + { + i=i+1; + } while (list[i] < v); + do + { + j=j-1; + } while (list[j] > v); + t = list[i]; + list[i] = list[j]; + list[j] = t; + } while (i> any1; /* input data file name on */ +cout << '\n' << "Generating file...waits\n\n";/* screen */ + +fp = fopen(any1,"w"); + for(j=0;j> any2; + +fp = fopen(any2,"w"); + for(i=0;i +#include +#include + +void main(void) +{ + int driver = DETECT,mode; + int x[10],y[10]; + int x_center = 360, y_center = 180, rad = 100; + int i,j; + + initgraph(&driver,&mode,"c:\\tc\\bgi"); + for ( i = 0; i < 10; i++ ) + { + x[i] = x_center + rad * cos(36*i*3.14159/180); + y[i] = y_center + rad * sin(36*i*3.14159/180); + } + for ( i = 0; i < 10; i++ ) + for ( j = 0; j < 10; j++ ) + line(x[i],y[i],x[j],y[j]); + getch(); /* press any key return to TEXT mode */ + closegraph(); +} \ No newline at end of file diff --git a/M/TC/BIN/CH24_2.CPP b/M/TC/BIN/CH24_2.CPP new file mode 100644 index 0000000..7944e87 --- /dev/null +++ b/M/TC/BIN/CH24_2.CPP @@ -0,0 +1,27 @@ +/* ============== Program Description ============= */ +/* program name : ch24_2.c */ +/* draw a interesting picture using line() */ +/* ================================================== */ +#include +#include +#include + +void main(void) +{ + int driver = DETECT,mode; + int x[10],y[10]; + int x_center = 360, y_center = 180, rad = 100; + int i,j; + + initgraph(&driver,&mode,"c:\\tc\\bgi"); + for ( i = 0; i < 10; i++ ) + { + x[i] = x_center + rad * cos(36*i*3.14159/180); + y[i] = y_center + rad * sin(36*i*3.14159/180); + } + for ( i = 0; i < 10; i++ ) + for ( j = 0; j < 10; j++ ) + line(x[i],y[i],x[j],y[j]); + getch(); /* press any key return to TEXT mode */ + closegraph(); +} \ No newline at end of file diff --git a/M/TC/BIN/CH24_2.EXE b/M/TC/BIN/CH24_2.EXE new file mode 100644 index 0000000..4acd446 Binary files /dev/null and b/M/TC/BIN/CH24_2.EXE differ diff --git a/M/TC/BIN/CH24_2.OBJ b/M/TC/BIN/CH24_2.OBJ new file mode 100644 index 0000000..c256f1e Binary files /dev/null and b/M/TC/BIN/CH24_2.OBJ differ diff --git a/M/TC/BIN/CH24_25.C b/M/TC/BIN/CH24_25.C new file mode 100644 index 0000000..33ee79c --- /dev/null +++ b/M/TC/BIN/CH24_25.C @@ -0,0 +1,24 @@ +/* ============== Program Description ============= */ +/* program name : ch24_25.c */ +/* getpixel() application. */ +/* ================================================== */ +#include + +void main() +{ + int driver = DETECT,mode; + int i; + + initgraph(&driver,&mode,"c:\\borlandc\\bgi"); + line(100,100,500,100); + for ( i = 20; i < 300; i++ ) + if ( getpixel(300,i) == WHITE ) + { + setcolor(BLUE); + circle(300,i,5); + } + else + putpixel(300,i,WHITE); + getch(); + closegraph(); +} \ No newline at end of file diff --git a/M/TC/BIN/CH24_25.EXE b/M/TC/BIN/CH24_25.EXE new file mode 100644 index 0000000..5a7eeb6 Binary files /dev/null and b/M/TC/BIN/CH24_25.EXE differ diff --git a/M/TC/BIN/CH24_25.OBJ b/M/TC/BIN/CH24_25.OBJ new file mode 100644 index 0000000..15d61c3 Binary files /dev/null and b/M/TC/BIN/CH24_25.OBJ differ diff --git a/M/TC/BIN/CHKLIST.MS b/M/TC/BIN/CHKLIST.MS new file mode 100644 index 0000000..05d5df3 Binary files /dev/null and b/M/TC/BIN/CHKLIST.MS differ diff --git a/M/TC/BIN/CPP.EXE b/M/TC/BIN/CPP.EXE new file mode 100644 index 0000000..5352bef Binary files /dev/null and b/M/TC/BIN/CPP.EXE differ diff --git a/M/TC/BIN/DPMI16BI.OVL b/M/TC/BIN/DPMI16BI.OVL new file mode 100644 index 0000000..1788955 Binary files /dev/null and b/M/TC/BIN/DPMI16BI.OVL differ diff --git a/M/TC/BIN/DPMIINST.EXE b/M/TC/BIN/DPMIINST.EXE new file mode 100644 index 0000000..f1c9b24 Binary files /dev/null and b/M/TC/BIN/DPMIINST.EXE differ diff --git a/M/TC/BIN/DPMILOAD.EXE b/M/TC/BIN/DPMILOAD.EXE new file mode 100644 index 0000000..d26c4c8 Binary files /dev/null and b/M/TC/BIN/DPMILOAD.EXE differ diff --git a/M/TC/BIN/DPMIMEM.DLL b/M/TC/BIN/DPMIMEM.DLL new file mode 100644 index 0000000..2c5bf57 Binary files /dev/null and b/M/TC/BIN/DPMIMEM.DLL differ diff --git a/M/TC/BIN/DPMIRES.EXE b/M/TC/BIN/DPMIRES.EXE new file mode 100644 index 0000000..f96bfc0 Binary files /dev/null and b/M/TC/BIN/DPMIRES.EXE differ diff --git a/M/TC/BIN/EMSTEST.COM b/M/TC/BIN/EMSTEST.COM new file mode 100644 index 0000000..7974c78 Binary files /dev/null and b/M/TC/BIN/EMSTEST.COM differ diff --git a/M/TC/BIN/EX1.EXE b/M/TC/BIN/EX1.EXE new file mode 100644 index 0000000..2e53256 Binary files /dev/null and b/M/TC/BIN/EX1.EXE differ diff --git a/M/TC/BIN/EX1.OBJ b/M/TC/BIN/EX1.OBJ new file mode 100644 index 0000000..2d216d4 Binary files /dev/null and b/M/TC/BIN/EX1.OBJ differ diff --git a/M/TC/BIN/FFF.TXT b/M/TC/BIN/FFF.TXT new file mode 100644 index 0000000..a35016a Binary files /dev/null and b/M/TC/BIN/FFF.TXT differ diff --git a/M/TC/BIN/GGG.TXT b/M/TC/BIN/GGG.TXT new file mode 100644 index 0000000..f4036eb Binary files /dev/null and b/M/TC/BIN/GGG.TXT differ diff --git a/M/TC/BIN/GREP.COM b/M/TC/BIN/GREP.COM new file mode 100644 index 0000000..2cc1258 Binary files /dev/null and b/M/TC/BIN/GREP.COM differ diff --git a/M/TC/BIN/GREP2MSG.EXE b/M/TC/BIN/GREP2MSG.EXE new file mode 100644 index 0000000..4747162 Binary files /dev/null and b/M/TC/BIN/GREP2MSG.EXE differ diff --git a/M/TC/BIN/MAKE.EXE b/M/TC/BIN/MAKE.EXE new file mode 100644 index 0000000..a1740c3 Binary files /dev/null and b/M/TC/BIN/MAKE.EXE differ diff --git a/M/TC/BIN/MAKER.EXE b/M/TC/BIN/MAKER.EXE new file mode 100644 index 0000000..61cb9cf Binary files /dev/null and b/M/TC/BIN/MAKER.EXE differ diff --git a/M/TC/BIN/NONAME00.C b/M/TC/BIN/NONAME00.C new file mode 100644 index 0000000..272004a --- /dev/null +++ b/M/TC/BIN/NONAME00.C @@ -0,0 +1,7 @@ +#include +void main() +{ +printf("Welcome to Emulated Turbo C++\n"); +printf("This Emulation is coded by Mohit Saxena\n"); +printf("Enjoy Coding....\n"); +} \ No newline at end of file diff --git a/M/TC/BIN/NONAME00.CPP b/M/TC/BIN/NONAME00.CPP new file mode 100644 index 0000000..272004a --- /dev/null +++ b/M/TC/BIN/NONAME00.CPP @@ -0,0 +1,7 @@ +#include +void main() +{ +printf("Welcome to Emulated Turbo C++\n"); +printf("This Emulation is coded by Mohit Saxena\n"); +printf("Enjoy Coding....\n"); +} \ No newline at end of file diff --git a/M/TC/BIN/NONAME00.EXE b/M/TC/BIN/NONAME00.EXE new file mode 100644 index 0000000..e9d7582 Binary files /dev/null and b/M/TC/BIN/NONAME00.EXE differ diff --git a/M/TC/BIN/NONAME00.OBJ b/M/TC/BIN/NONAME00.OBJ new file mode 100644 index 0000000..6db25cd Binary files /dev/null and b/M/TC/BIN/NONAME00.OBJ differ diff --git a/M/TC/BIN/OBJXREF.COM b/M/TC/BIN/OBJXREF.COM new file mode 100644 index 0000000..9dca99d Binary files /dev/null and b/M/TC/BIN/OBJXREF.COM differ diff --git a/M/TC/BIN/PRJ2MAK.EXE b/M/TC/BIN/PRJ2MAK.EXE new file mode 100644 index 0000000..366cfde Binary files /dev/null and b/M/TC/BIN/PRJ2MAK.EXE differ diff --git a/M/TC/BIN/PRJCFG.EXE b/M/TC/BIN/PRJCFG.EXE new file mode 100644 index 0000000..cd05263 Binary files /dev/null and b/M/TC/BIN/PRJCFG.EXE differ diff --git a/M/TC/BIN/PRJCNVT.EXE b/M/TC/BIN/PRJCNVT.EXE new file mode 100644 index 0000000..f5a918c Binary files /dev/null and b/M/TC/BIN/PRJCNVT.EXE differ diff --git a/M/TC/BIN/TASM2MSG.EXE b/M/TC/BIN/TASM2MSG.EXE new file mode 100644 index 0000000..97b7fea Binary files /dev/null and b/M/TC/BIN/TASM2MSG.EXE differ diff --git a/M/TC/BIN/TC.EXE b/M/TC/BIN/TC.EXE new file mode 100644 index 0000000..dae5a04 Binary files /dev/null and b/M/TC/BIN/TC.EXE differ diff --git a/M/TC/BIN/TC0000.SWP b/M/TC/BIN/TC0000.SWP new file mode 100644 index 0000000..8f0aede Binary files /dev/null and b/M/TC/BIN/TC0000.SWP differ diff --git a/M/TC/BIN/TC0001.SWP b/M/TC/BIN/TC0001.SWP new file mode 100644 index 0000000..8f0aede Binary files /dev/null and b/M/TC/BIN/TC0001.SWP differ diff --git a/M/TC/BIN/TC0002.SWP b/M/TC/BIN/TC0002.SWP new file mode 100644 index 0000000..e542c1b Binary files /dev/null and b/M/TC/BIN/TC0002.SWP differ diff --git a/M/TC/BIN/TC0003.SWP b/M/TC/BIN/TC0003.SWP new file mode 100644 index 0000000..e542c1b Binary files /dev/null and b/M/TC/BIN/TC0003.SWP differ diff --git a/M/TC/BIN/TCC.EXE b/M/TC/BIN/TCC.EXE new file mode 100644 index 0000000..802d400 Binary files /dev/null and b/M/TC/BIN/TCC.EXE differ diff --git a/M/TC/BIN/TCCONFIG.TC b/M/TC/BIN/TCCONFIG.TC new file mode 100644 index 0000000..6f5a7fb Binary files /dev/null and b/M/TC/BIN/TCCONFIG.TC differ diff --git a/M/TC/BIN/TCDEF.DPR b/M/TC/BIN/TCDEF.DPR new file mode 100644 index 0000000..f0cd4ec Binary files /dev/null and b/M/TC/BIN/TCDEF.DPR differ diff --git a/M/TC/BIN/TCDEF.DSK b/M/TC/BIN/TCDEF.DSK new file mode 100644 index 0000000..b6e8bf7 Binary files /dev/null and b/M/TC/BIN/TCDEF.DSK differ diff --git a/M/TC/BIN/TCHELP.TCH b/M/TC/BIN/TCHELP.TCH new file mode 100644 index 0000000..830ed03 Binary files /dev/null and b/M/TC/BIN/TCHELP.TCH differ diff --git a/M/TC/BIN/TDUMP.EXE b/M/TC/BIN/TDUMP.EXE new file mode 100644 index 0000000..aef3157 Binary files /dev/null and b/M/TC/BIN/TDUMP.EXE differ diff --git a/M/TC/BIN/TEMC.EXE b/M/TC/BIN/TEMC.EXE new file mode 100644 index 0000000..6144833 Binary files /dev/null and b/M/TC/BIN/TEMC.EXE differ diff --git a/M/TC/BIN/THELP.CFG b/M/TC/BIN/THELP.CFG new file mode 100644 index 0000000..8de3df1 --- /dev/null +++ b/M/TC/BIN/THELP.CFG @@ -0,0 +1 @@ +/fC:\TC\BIN\TCHELP.TCH \ No newline at end of file diff --git a/M/TC/BIN/THELP.COM b/M/TC/BIN/THELP.COM new file mode 100644 index 0000000..fa7c5c1 Binary files /dev/null and b/M/TC/BIN/THELP.COM differ diff --git a/M/TC/BIN/TIMEIT.BAK b/M/TC/BIN/TIMEIT.BAK new file mode 100644 index 0000000..5d86530 --- /dev/null +++ b/M/TC/BIN/TIMEIT.BAK @@ -0,0 +1,66 @@ +#include +#include +#include +#include +#include + +int main(int argc,char *argv[]) +{ +clock_t start,end; +FILE *fp; +int j; +char bb = 'f'; +float var; +char aa[45]="The time that complies the program is : "; + +cout << "Command line arguments:\n\n"; +for (int i = 0; i < argc; ++i) +{ + cout << "Argument [" << i << "] : " << argv[i] << '\n'; +} + cout << "Measuring the time that needs to comply program [" + << argv[i-1] << ".cpp" << ']' << "\n\n"; + + +for(j=0;j +#include +#include +#include +#include + +int main(int argc,char *argv[]) +{ +clock_t start,end; +FILE *fp; +int j; +char bb = 'f'; +float var; +char aa[45]="The time that complies the program is : "; + +cout << "Command line arguments:\n\n"; +for (int i = 0; i < argc; ++i) +{ + cout << "Argument [" << i << "] : " << argv[i] << '\n'; +} + cout << "Measuring the time that needs to comply program [" + << argv[i-1] << ".cpp" << ']' << "\n\n"; + + +for(j=0;j +#include +#include +#include +#include +#include + +const int max=1000; +int list[max]; +FILE *fp; + +void insertion(int aa[],int max1) +{ + int a,b,v; + + for(a=1;a v) + { + aa[b] = aa[b-1]; + b = b - 1; + } + aa[b] = v; + } +} + +void quicksort(int min1,int max2) +{ +int t; + +if (max2 > min1) +{ + int v = list[max2]; + int i = min1 - 1; + int j = max2; + do + { + do + { + i = i + 1; + } while (list[i] < v); + do + { + j = j - 1; + } while (list[j] > v); + int t = list[i]; + list[i] = list[j]; + list[j] = t; + } while (j > i); + list[j] = list[i]; + list[i] = list[max2]; + list[max2] = t; + quicksort(min1,i-1); + quicksort(i+1,max2); + } +} + +void main() +{ + +int i,j,k,l; +char any1[8],any2[8]; + +cout << "Enter a file name\n"; +cin >> any1; +/*if(strlen(any1) > 12) + cout << "File name input error."; */ + + +fp = fopen(any1,"wb"); + for(j=0;j<30000;j++) + { + k = rand(); + fprintf(fp,"%d\n",k); + } +fclose(fp); +fp = fopen(any1,"rb"); + i = 0; + while (fscanf(fp,"%d\n",l) != 0) + { + list[i] = l; + i = i + 1; + } +fclose(fp); + +/*int min = 0; +quicksort(min,max); */ +insertion(list,max); + +cout << "Enter an output file : "; +cin >> any2; +fp = fopen(any2,"wb"); + for(i=0;i +#include +#include +#include +#include +#include + +const int max=1000; +int list[max]; +FILE *fp; + +void insertion(int aa[],int max1) +{ + int a,b,v; + + for(a=1;a v) + { + aa[b] = aa[b-1]; + b = b - 1; + } + aa[b] = v; + } +} + +void quicksort(int min1,int max2) +{ +int t; + +if (max2 > min1) +{ + int v = list[max2]; + int i = min1 - 1; + int j = max2; + do + { + do + { + i = i + 1; + } while (list[i] < v); + do + { + j = j - 1; + } while (list[j] > v); + int t = list[i]; + list[i] = list[j]; + list[j] = t; + } while (j > i); + list[j] = list[i]; + list[i] = list[max2]; + list[max2] = t; + quicksort(min1,i-1); + quicksort(i+1,max2); + } +} + +void main() +{ + +int i,j,k,l; +char any1[8],any2[8]; + +cout << "Enter a file name\n"; +cin >> any1; +/*if(strlen(any1) > 12) + cout << "File name input error."; */ + + +fp = fopen(any1,"wb"); + for(j=0;j<30000;j++) + { + k = rand(); + fprintf(fp,"%d\n",k); + } +fclose(fp); +fp = fopen(any1,"rb"); + i = 0; + while (fscanf(fp,"%d\n",l) != 0) + { + list[i] = l; + i = i + 1; + } +fclose(fp); + +/*int min = 0; +quicksort(min,max); */ +insertion(list,max); + +cout << "Enter an output file : "; +cin >> any2; +fp = fopen(any2,"wb"); + for(i=0;i +#endif // __SORTARRY_H + +#ifndef __DIR_H +#include +#define __DIR_H +#endif + +#ifndef __DIRECTRY_H +#include "directry.h" +#endif + +#ifndef __FILEDATA_H +#include "filedata.h" +#endif + +#if !defined( __IOSTREAM_H ) +#include +#endif // __IOSTREAM_H + +Directory::Directory( char *pathName, sortOrder sortBy ) : + SortedArray( 10, 0, 5 ), mask( pathName ) +{ + struct ffblk fileBlock; + int morePathNames = !findfirst( mask, &fileBlock, 0 ); + while( morePathNames ) + { + addFile( fileBlock, sortBy ); + morePathNames = !findnext( &fileBlock ); + } +} + +void Directory::addFile( ffblk& fileBlock, sortOrder sortBy ) +{ + switch( sortBy ) + { + case byName: + add( *(new FilesByName( fileBlock )) ); + break; + case byDate: + add( *(new FilesByDate( fileBlock )) ); + break; + case bySize: + add( *(new FilesBySize( fileBlock )) ); + break; + } +} + +void Directory::printHeader( ostream& outputStream ) const +{ + outputStream << "Directory: " << mask << "\n "; +} + +void Directory::printSeparator( ostream& outputStream ) const +{ + outputStream << "\n "; +} + +void Directory::printTrailer( ostream& outputStream ) const +{ + outputStream << "\n"; +} diff --git a/M/TC/CLASSLIB/EXAMPLES/DIRECTRY.H b/M/TC/CLASSLIB/EXAMPLES/DIRECTRY.H new file mode 100644 index 0000000..52b1c4c --- /dev/null +++ b/M/TC/CLASSLIB/EXAMPLES/DIRECTRY.H @@ -0,0 +1,42 @@ +#ifndef __DIRECTRY_H +#define __DIRECTRY_H + +#if !defined( __SORTARRY_H ) +#include +#endif // __SORTARRY_H + +#ifndef __DIR_H +#include +#endif + +#ifndef __FILEDATA_H +#include "filedata.h" +#endif + +const directoryClass = filesBySizeClass+1; + +class Directory: public SortedArray +{ + +public: + + enum sortOrder { byName, byDate, bySize }; + + Directory( char *, sortOrder ); + virtual ~Directory() {} + + virtual classType isA() const { return directoryClass; } + virtual char *nameOf() const { return "Directory"; } + virtual hashValueType hashValue() const { return 0; } + virtual void printHeader( ostream& ) const; + virtual void printSeparator( ostream& ) const; + virtual void printTrailer( ostream& ) const; + +private: + + void addFile( ffblk&, sortOrder ); + String mask; + +}; + +#endif diff --git a/M/TC/CLASSLIB/EXAMPLES/DIRECTRY.PRJ b/M/TC/CLASSLIB/EXAMPLES/DIRECTRY.PRJ new file mode 100644 index 0000000..f9314c9 Binary files /dev/null and b/M/TC/CLASSLIB/EXAMPLES/DIRECTRY.PRJ differ diff --git a/M/TC/CLASSLIB/EXAMPLES/FILEDATA.CPP b/M/TC/CLASSLIB/EXAMPLES/FILEDATA.CPP new file mode 100644 index 0000000..5cd2eb1 --- /dev/null +++ b/M/TC/CLASSLIB/EXAMPLES/FILEDATA.CPP @@ -0,0 +1,70 @@ +#ifndef __IOSTREAM_H +#include +#endif + +#ifndef __IOMANIP_H +#include +#endif + +#ifndef __DIR_H +#include +#define __DIR_H +#endif + +#ifndef __FILEDATA_H +#include "filedata.h" +#endif + +FileData::FileData( ffblk& blk ) : + fileName( blk.ff_name ), + fileDate( (blk.ff_fdate >> 5) & 0x000F, + blk.ff_fdate & 0x0001F, + (blk.ff_fdate >> 9) + 1980 ), + fileSize( blk.ff_fsize ), + fileTime( blk.ff_ftime >> 11, + (blk.ff_ftime >> 5) & 0x3F, + blk.ff_ftime & 0x1F ) +{ +} + +void FileData::printOn( ostream& outputStream ) const +{ + outputStream << setw( 14 ) << setiosflags( ios::left ) << fileName + << setw( 18 ) << fileDate + << setw( 17 ) << resetiosflags( ios::left ) << fileTime + << setw( 10 ) << fileSize << " bytes"; +} + +int FilesByName::isEqual( const Object& testFile ) const +{ + return fileName == ( (FilesByName&)testFile ).fileName; +} + +int FilesByName::isLessThan( const Object& testFile ) const +{ + return fileName < ( (FilesByName&)testFile ).fileName; +} + +int FilesByDate::isEqual( const Object& testFile ) const +{ + return fileDate == ( (FilesByDate&)testFile ).fileDate && + fileTime == ( (FilesByDate&)testFile ).fileTime; +} + +int FilesByDate::isLessThan( const Object& testFile ) const +{ + if( fileDate == ( (FilesByDate&)testFile ).fileDate ) + return fileTime < ( (FilesByDate&)testFile ).fileTime; + else + return fileDate < ( (FilesByDate&)testFile ).fileDate; +} + +int FilesBySize::isEqual( const Object& testFile ) const +{ + return fileSize == ( (FilesBySize&)testFile ).fileSize; +} + +int FilesBySize::isLessThan( const Object& testFile ) const +{ + return fileSize < ( (FilesBySize&)testFile ).fileSize; +} diff --git a/M/TC/CLASSLIB/EXAMPLES/FILEDATA.H b/M/TC/CLASSLIB/EXAMPLES/FILEDATA.H new file mode 100644 index 0000000..2deeea8 --- /dev/null +++ b/M/TC/CLASSLIB/EXAMPLES/FILEDATA.H @@ -0,0 +1,94 @@ +#ifndef __FILEDATA_H +#define __FILEDATA_H + +#if !defined( __SORTABLE_H ) +#include +#endif // __SORTABLE_H + +#if !defined( __STRNG_H ) +#include +#endif // __STRNG_H + +#if !defined( __LDATE_H ) +#include +#endif // __LDATE_H + +#if !defined( __LTIME_H ) +#include +#endif // __LTIME_H + +#ifndef __DIR_H +#include +#endif + +const fileDataClass = __firstUserClass; +const filesByNameClass = fileDataClass+1; +const filesByDateClass = filesByNameClass+1; +const filesBySizeClass = filesByDateClass+1; + +class FileData: public Sortable +{ + +public: + + FileData( ffblk& ); + + virtual classType isA() const { return fileDataClass; } + virtual char *nameOf() const { return "FileData"; } + virtual int isEqual( const Object& ) const = 0; + virtual int isLessThan( const Object& ) const = 0; + virtual hashValueType hashValue() const { return 0; } + virtual void printOn( ostream& ) const; + +protected: + + String fileName; + Date fileDate; + Time fileTime; + long fileSize; + +}; + +class FilesByName: public FileData +{ + +public: + + FilesByName( ffblk& blk ) : FileData( blk ) {} + + virtual classType isA() const { return filesByNameClass; } + virtual char *nameOf() const { return "FilesByName"; } + virtual int isEqual( const Object& ) const; + virtual int isLessThan( const Object& ) const; + +}; + +class FilesByDate: public FileData +{ + +public: + + FilesByDate( ffblk& blk ) : FileData( blk ) {} + + virtual classType isA() const { return filesByDateClass; } + virtual char *nameOf() const { return "FilesByDate"; } + virtual isEqual( const Object& ) const; + virtual isLessThan( const Object& ) const; + +}; + +class FilesBySize: public FileData +{ + +public: + + FilesBySize( ffblk& blk ) : FileData( blk ) {} + + virtual classType isA() const { return filesBySizeClass; } + virtual char *nameOf() const { return "FilesBySize"; } + virtual isEqual( const Object& ) const; + virtual isLessThan( const Object& ) const; + +}; + +#endif diff --git a/M/TC/CLASSLIB/EXAMPLES/LOOKUP.CPP b/M/TC/CLASSLIB/EXAMPLES/LOOKUP.CPP new file mode 100644 index 0000000..9a1269f --- /dev/null +++ b/M/TC/CLASSLIB/EXAMPLES/LOOKUP.CPP @@ -0,0 +1,102 @@ +#if !defined( __ASSOC_H ) +#include +#endif // __ASSOC_H + +#if !defined( __DICT_H ) +#include +#endif // __DICT_H + +#if !defined( __STRNG_H ) +#include +#endif // __STRNG_H + +#ifndef __IOSTREAM_H +#include +#endif + +#define CLASSDEFINITIONS 23 + +static char *classNames[CLASSDEFINITIONS] = + { + "Object", + "Error", + "Sortable", + "Association", + "String", + "Container", + "Stack", + "Queue", + "Deque", + "Collection", + "HashTable", + "Bag", + "Set", + "Dictionary", + "AbstractArray", + "Array", + "SortedArray", + "List", + "DoubleList", + "ContainerIterator", + "ArrayIterator", + "ListIterator", + "DoubleListIterator" + }; + +static char *classDefs[CLASSDEFINITIONS] = + { + "The abstract base class of the hierarchy.\n", + "Used to indicate the presence of no object reference.\n", + "Used in ordered collections.\n", + "A key/value pair, used by the class Dictionary.\n", + "An example of an instance class, derived from class Sortable.\n", + "An abstract base class for all classes which contain other objects.\n", + "A LIFO container class.\n", + "A FIFO container class.\n", + "A double-ended container class, allowing both FIFO and LIFO access.\n", + "An abstract base class for classes which may be tested for membership.\n", + "A fast lookup implementation of a collection.\n", + "A collection class implemented by a hash table.\n", + "A collection in which there may be only one copy of each member.\n", + "A set of association object, with a lookup function.\n", + "An abstract base class for arrays.\n", + "A fixed or expandable array.\n", + "An array in which objects at successive indices are in order.\n", + "A collection class in which objects are linked together.\n", + "A collection of objects which are part of two lists.\n", + "A class which, when instantiated, is used to iterate over a collection.\n", + "An iterator which is used on array objects.\n", + "An iterator which is used on list objects.\n", + "An iterator which is used on double list objects.\n" + }; + +int main( int argc, char *argv[] ) +{ + if( argc != 2 ) + { + cerr << "Usage: lookup classname\n"; + return 1; + } + + Dictionary classDefinitions; + + for( int i = 0; i < CLASSDEFINITIONS; i++ ) + { + String *className = new String( classNames[i] ); + String *classDef = new String( classDefs[i] ); + Association *entry = new Association( *className, *classDef ); + classDefinitions.add( *entry ); + } + + Association& definition = + classDefinitions.lookup ( *new String ( argv[1] ) ); + if( definition == NOOBJECT ) + { + cout << "A definition for " << argv[1] << " was not found in the dictionary.\n"; + } + else + { + cout << definition; + } + return 0; +} diff --git a/M/TC/CLASSLIB/EXAMPLES/LOOKUP.PRJ b/M/TC/CLASSLIB/EXAMPLES/LOOKUP.PRJ new file mode 100644 index 0000000..4f38cbf Binary files /dev/null and b/M/TC/CLASSLIB/EXAMPLES/LOOKUP.PRJ differ diff --git a/M/TC/CLASSLIB/EXAMPLES/QUEUETST.CPP b/M/TC/CLASSLIB/EXAMPLES/QUEUETST.CPP new file mode 100644 index 0000000..8423a0b --- /dev/null +++ b/M/TC/CLASSLIB/EXAMPLES/QUEUETST.CPP @@ -0,0 +1,55 @@ +#ifndef __LTIME_H +#include +#endif // __LTIME_H + +#ifndef __QUEUE_H +#include +#endif // __QUEUE_H + +#ifndef __IOSTREAM_H +#include +#endif + +#ifndef __DOS_H +#include +#endif + +#ifndef __STDLIB_H +#include +#endif + + +int main() + +{ + + + int k; + Queue timeLine; + cout << "\nSampling"; + for( int i = 0; i < 7; i++ ) + { + struct time snapShot; + gettime( &snapShot ); + Time sample( snapShot.ti_hour, + snapShot.ti_min, + snapShot.ti_sec, + snapShot.ti_hund ); + timeLine.put ( *(new Time( sample )) ); + cout << "."; + randomize(); + k = rand(); + for(int j = 0; j < k; ++j ) // Delay loop + { + cout << ""; + } + } + cout << "\nThe timing samples are:\n\n"; + while( !timeLine.isEmpty() ) + { + Time& sampleTime = (Time&)timeLine.get(); + cout << sampleTime << "\n"; + delete &sampleTime; + } + return 0; +} diff --git a/M/TC/CLASSLIB/EXAMPLES/QUEUETST.PRJ b/M/TC/CLASSLIB/EXAMPLES/QUEUETST.PRJ new file mode 100644 index 0000000..e30c52e Binary files /dev/null and b/M/TC/CLASSLIB/EXAMPLES/QUEUETST.PRJ differ diff --git a/M/TC/CLASSLIB/EXAMPLES/REVERSE.CPP b/M/TC/CLASSLIB/EXAMPLES/REVERSE.CPP new file mode 100644 index 0000000..79d09e8 --- /dev/null +++ b/M/TC/CLASSLIB/EXAMPLES/REVERSE.CPP @@ -0,0 +1,46 @@ +#if !defined( __STACK_H ) +#include +#endif // __STACK_H + +#if !defined( __STRNG_H ) +#include +#endif // __STRNG_H + +#ifndef __IOSTREAM_H +#include +#endif + +int main() +{ + Stack theStack; + String reverse("reverse"); + + cout << "\nEnter some strings. Reverse will collect the strings\n"; + cout << "for you until you enter the string \"reverse\". Reverse\n"; + cout << "will then print out the strings you have entered, but in\n"; + cout << "reverse order. Begin entering strings now.\n"; + + for(;;) + { + char inputString[255]; + cin >> inputString; + String& newString = *( new String( inputString ) ); + if( newString != reverse ) + { + theStack.push( newString ); + } + else + { + break; + } + } + + cout << "\nThe strings you entered (if any) are:\n"; + while( !(theStack.isEmpty()) ) + { + Object& oldString = theStack.pop(); + cout << oldString << "\n"; + delete &oldString; + } + return 0; +} diff --git a/M/TC/CLASSLIB/EXAMPLES/REVERSE.PRJ b/M/TC/CLASSLIB/EXAMPLES/REVERSE.PRJ new file mode 100644 index 0000000..92f74f5 Binary files /dev/null and b/M/TC/CLASSLIB/EXAMPLES/REVERSE.PRJ differ diff --git a/M/TC/CLASSLIB/EXAMPLES/STRNGMAX.CPP b/M/TC/CLASSLIB/EXAMPLES/STRNGMAX.CPP new file mode 100644 index 0000000..5c3c935 --- /dev/null +++ b/M/TC/CLASSLIB/EXAMPLES/STRNGMAX.CPP @@ -0,0 +1,43 @@ +#if !defined( __STRNG_H ) +#include +#endif // __STRNG_H + +#ifndef __IOSTREAM_H +#include +#endif + +// +// Determines the maximum string using the ASCII collating sequence to +// define rank. A string is defined to be greater than another if the +// ASCII values of its characters are greater than the values of the other +// string. For example, +// +// strngmax Alpha Beta Charlie +// +// would print Charlie to stdout and return 3. +// +int main( int argc, char *argv[] ) +{ + if( argc < 2 ) + { + cerr << "Usage: strngmax string1 [string2 ...]\n"; + return 1; + } + + String theGreatestString( argv[1] ); + int positionOfTheGreatestString = 1; + int nextArg = 2; + + while( nextArg < argc ) + { + String argListString ( argv[nextArg++] ); + if ( argListString > theGreatestString ) + { + theGreatestString = argListString; + positionOfTheGreatestString = nextArg - 1; + } + } + + cout << theGreatestString << endl; + return positionOfTheGreatestString; +} diff --git a/M/TC/CLASSLIB/EXAMPLES/STRNGMAX.PRJ b/M/TC/CLASSLIB/EXAMPLES/STRNGMAX.PRJ new file mode 100644 index 0000000..8700019 Binary files /dev/null and b/M/TC/CLASSLIB/EXAMPLES/STRNGMAX.PRJ differ diff --git a/M/TC/CLASSLIB/EXAMPLES/TESTDIR.CPP b/M/TC/CLASSLIB/EXAMPLES/TESTDIR.CPP new file mode 100644 index 0000000..d270290 --- /dev/null +++ b/M/TC/CLASSLIB/EXAMPLES/TESTDIR.CPP @@ -0,0 +1,44 @@ +#ifndef __STDLIB_H +#include +#endif + +#ifndef __IOSTREAM_H +#include +#endif + +#ifndef __DIRECTRY_H +#include "directry.h" +#endif + +int main( int argc, char *argv[] ) +{ + if( argc < 2 || argc > 3 ) + { + cerr << "Usage: directry [options] filespec" << endl << endl; + cerr << "Options:" << endl; + cerr << "\t-sd\tsort by date" << endl; + cerr << "\t-sn\tsort by name" << endl; + cerr << "\t-ss\tsort by size" << endl; + exit(1); + } + + int path; + Directory::sortOrder sorting = Directory::byName; + + if( argc != 3 ) + path = 1; + else + { + path = 2; + if( strcmp( argv[1], "-sn" ) == 0 ) + sorting = Directory::byName; + else if( strcmp( argv[1], "-sd" ) == 0 ) + sorting = Directory::byDate; + else if( strcmp( argv[1], "-ss" ) == 0 ) + sorting = Directory::bySize; + } + + Directory sortedDirectory( argv[path], sorting ); + cout << sortedDirectory; + return 0; +} diff --git a/M/TC/CLASSLIB/INCLUDE/ABSTARRY.H b/M/TC/CLASSLIB/INCLUDE/ABSTARRY.H new file mode 100644 index 0000000..875cd2d --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/ABSTARRY.H @@ -0,0 +1,182 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* ABSTARRY.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __ABSTARRY_H ) +#define __ABSTARRY_H + +#if defined( TEMPLATES ) + + #if !defined( __COLLECT_H ) + #include + #endif // __COLLECT_H + + #if !defined( __MEM_H ) + #include + #endif // __MEM_H + + _CLASSDEF(ostream) + _CLASSDEF(ContainerIterator) + _CLASSDEF(AbstractArray) + _CLASSDEF(ArrayIterator) + + class _CLASSTYPE AbstractArray: public Collection + { + + public: + + friend class ArrayIterator; + + virtual Object _FAR & operator []( int loc ) = 0; + + virtual int lowerBound() const = 0; + virtual int upperBound() const = 0; + virtual sizeType arraySize() const = 0; + + virtual void detach( int loc, DeleteType dt = NoDelete ) = 0; + virtual void detach( Object _FAR &, DeleteType dt = NoDelete ) = 0; + void destroy( int i ) + { + detach( i, Delete ); + } + + int isEqual( const Object _FAR & ) const; + void printContentsOn( ostream _FAR & ) const; + + }; + +#else // TEMPLATES + + #if !defined( __COLLECT_H ) + #include + #endif // __COLLECT_H + + #if !defined( __MEM_H ) + #include + #endif // __MEM_H + + + _CLASSDEF(ostream) + _CLASSDEF(ContainerIterator) + _CLASSDEF(AbstractArray) + _CLASSDEF(ArrayIterator) + + class _CLASSTYPE AbstractArray: public Collection + { + + public: + + AbstractArray( int, int = 0, sizeType = 0 ); + virtual ~AbstractArray(); + + Object _FAR & operator []( int ) const; + + int lowerBound() const + { + return lowerbound; + } + + int upperBound() const + { + return upperbound; + } + + sizeType arraySize() const; + + virtual void detach( Object _FAR &, DeleteType = NoDelete ); + virtual void detach( int, DeleteType = NoDelete ); + void destroy( int i ) { detach( i, DefDelete ); } + virtual void flush( DeleteType = DefDelete ); + + virtual int isEqual( const Object _FAR & ) const; + virtual void printContentsOn( ostream _FAR & ) const; + + virtual ContainerIterator _FAR & initIterator() const; + + protected: + + Object _FAR & objectAt( int i ) const + { + return *theArray[ zeroBase(i) ]; + } + + Object _FAR *ptrAt( int i ) const + { + return theArray[ zeroBase(i) ]; + } + + int find( const Object _FAR & ); + + void reallocate( sizeType ); + + void setData( int, Object _FAR * ); + + void insertEntry( int ); + void removeEntry( int ); + void squeezeEntry( int ); + + sizeType delta; + int lowerbound; + int upperbound; + int lastElementIndex; + + private: + + Object _FAR * _FAR *theArray; + + int zeroBase( int loc ) const + { + return loc - lowerbound; + } + + int boundBase( unsigned loc ) const + { + return loc == UINT_MAX ? INT_MAX : loc + lowerbound; + } + + friend class ArrayIterator; + + }; + + inline Object _FAR & AbstractArray::operator [] ( int atIndex ) const + { + return objectAt( atIndex ); + } + + inline sizeType AbstractArray::arraySize() const + { + return sizeType( upperbound - lowerbound + 1 ); + } + + class _CLASSTYPE ArrayIterator : public ContainerIterator + { + + public: + + ArrayIterator( const AbstractArray _FAR & ); + virtual ~ArrayIterator(); + + virtual operator int(); + virtual Object _FAR & current(); + virtual Object _FAR & operator ++( int ); + virtual Object _FAR & operator ++(); + virtual void restart(); + + private: + + int currentIndex; + const AbstractArray _FAR & beingIterated; + + void scan(); + + }; + +#endif // TEMPLATES + +#endif // __ABSTARRY_H + diff --git a/M/TC/CLASSLIB/INCLUDE/ARRAY.H b/M/TC/CLASSLIB/INCLUDE/ARRAY.H new file mode 100644 index 0000000..4032ccc --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/ARRAY.H @@ -0,0 +1,82 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* ARRAY.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __ARRAY_H ) +#define __ARRAY_H + +#if defined( TEMPLATES ) + + #if !defined( __ARRAYS_H ) + #include + #endif // __ARRAYS_H + + #define Array BI_TCArrayAsVector + #define PArray PBI_TCArrayAsVector + #define RArray RBI_TCArrayAsVector + #define RPArray RPBI_TCArrayAsVector + #define PCArray PCBI_TCArrayAsVector + #define RCArray RCBI_TCArrayAsVector + + _CLASSDEF( BI_TCArrayAsVector ) + + #define ArrayIterator BI_TCArrayAsVectorIterator + #define PArrayIterator PBI_TCArrayAsVectorIterator + #define RArrayIterator RBI_TCArrayAsVectorIterator + #define RPArrayIterator RPBI_TCArrayAsVectorIterator + #define PCArrayIterator PCBI_TCArrayAsVectorIterator + #define RCArrayIterator RCBI_TCArrayAsVectorIterator + + _CLASSDEF( BI_TCArrayAsVectorIterator ) + +#else // TEMPLATES + + #if !defined( __CLSTYPES_H ) + #include + #endif // __CLSTYPES_H + + #if !defined( __OBJECT_H ) + #include + #endif // __OBJECT_H + + #if !defined( __ABSTARRY_H ) + #include + #endif // __ABSTARRY_H + + _CLASSDEF(Array) + + class _CLASSTYPE Array : public AbstractArray + + { + + public: + + Array( int upper, int lower = 0, sizeType aDelta = 0 ) : + AbstractArray( upper, lower, aDelta ) + { + } + + virtual void add( Object _FAR & ); + void addAt( Object _FAR &, int ); + + virtual classType isA() const + { + return arrayClass; + } + + virtual char _FAR *nameOf() const + { + return "Array"; + } + + }; + +#endif // TEMPLATES + +#endif // __ARRAY_H + diff --git a/M/TC/CLASSLIB/INCLUDE/ARRAYS.H b/M/TC/CLASSLIB/INCLUDE/ARRAYS.H new file mode 100644 index 0000000..2133379 --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/ARRAYS.H @@ -0,0 +1,1460 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* ARRAYS.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __ARRAYS_H ) +#define __ARRAYS_H + +#define TEMPLATES + +#if !defined( ___DEFS_H ) +#include <_defs.h> +#endif // ___DEFS_H + +#if !defined( __RESOURCE_H ) +#include +#endif // __RESOURCE_H + +#if !defined( __COLLECT_H ) +#include +#endif // __COLLECT_H + +#if !defined( __MEM_H ) +#include +#endif // __MEM_H + +#if !defined( __VECTIMP_H ) +#include +#endif // __VECTIMP_H + +#if !defined( __SORTABLE_H ) +#include +#endif // __SORTABLE_H + +#if !defined( __ABSTARRY_H ) +#include +#endif // __ABSTARRY_H + +#pragma warn -ncf + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_ArrayAsVectorImp */ +/* */ +/* Implements the fundamental array operations, using a vector */ +/* as the underlying implementation. The type Vect specifies the */ +/* form of the vector, either a BI_CVectorImp or a */ +/* BI_ICVectorImp. The type T specifies the type of the */ +/* objects to be put in the array. When using BI_CVectorImp, */ +/* T should be the same as T0. When using BI_ICVectorImp, T */ +/* should be of type pointer to T0. See BI_ArrayAsVector and */ +/* BI_IArrayAsVector for examples. */ +/* */ +/*------------------------------------------------------------------------*/ + +template +class _CLASSTYPE BI_ArrayAsVectorImp +{ + +public: + + BI_ArrayAsVectorImp( int upper, int lower, int delta ) : + data( upper-lower+1,delta), + lowerbound(lower) + { + } + + int lowerBound() const + { + return lowerbound; + } + + int upperBound() const + { + return boundBase(data.limit())-1; + } + + sizeType arraySize() const + { + return data.limit(); + } + + void add( T t ) + { + data.add( t ); + } + + void addAt( T t, int loc ) + { + data.addAt( t, zeroBase(loc) ); + } + + void detach( T t, TShouldDelete::DeleteType dt = TShouldDelete::NoDelete ) + { + data.detach( t, dt ); + } + + void detach( int loc, + TShouldDelete::DeleteType dt =TShouldDelete::NoDelete + ) + { + data.detach( zeroBase(loc), dt ); + } + + void destroy( int i ) + { + detach( i, TShouldDelete::Delete ); + } + + void flush( TShouldDelete::DeleteType dt = TShouldDelete::DefDelete ) + { + data.flush( dt ); + } + + int isFull() const + { + return data.getDelta() == 0 && data.count() >= data.limit(); + } + + int hasMember( T t ) const + { + return data.find(t) != UINT_MAX; + } + + int isEmpty() const + { + return data.count() == 0; + } + + countType getItemsInContainer() const + { + return data.count(); + } + +protected: + + T itemAt( int i ) const + { + return data[ zeroBase(i) ]; + } + + int find( const T t ) const + { + return boundBase(data.find( t )); + } + + void reallocate( sizeType sz, sizeType offset = 0 ) + { + data.resize( sz, offset ); + } + + + void setData( int loc, T t ) + { + PRECONDITION( loc >= lowerbound && loc <= upperBound() ); + data[ zeroBase(loc) ] = t; + } + + void insertEntry( int loc ) + { + PRECONDITION( loc >= lowerbound && loc <= upperBound() ); + T t; + data.addAt( t, zeroBase(loc) ); + } + + void removeEntry( int loc ) + { + squeezeEntry( zeroBase(loc) ); + } + + void squeezeEntry( unsigned loc ) + { + PRECONDITION( loc < data.count() ); + data.detach( loc ); + } + + unsigned zeroBase( int loc ) const + { + return loc - lowerbound; + } + + int boundBase( unsigned loc ) const + { + return loc == UINT_MAX ? INT_MAX : loc + lowerbound; + } + + void grow( int loc ) + { + if( loc < lowerBound() ) + reallocate( arraySize() + (loc - lowerbound) ); + else if( loc >= boundBase(data.limit()) ) + reallocate( zeroBase(loc) ); + } + + int lowerbound; + + Vect data; + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_ArrayAsVector */ +/* */ +/* Implements an array of objects of type T, using a vector as */ +/* the underlying implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_ArrayAsVector : + public BI_ArrayAsVectorImp,T> +{ + +public: + + friend class _CLASSTYPE BI_ArrayAsVectorIterator; + + BI_ArrayAsVector( int upper, int lower = 0, int delta = 0 ) : + BI_ArrayAsVectorImp,T>( upper, lower, delta ) + { + } + + T& operator []( int loc ) + { + grow( loc ); + return data[zeroBase(loc)]; + } + + T& operator []( int loc ) const + { + PRECONDITION( loc >= lowerbound && loc < data.count() ); + return data[zeroBase(loc)]; + } + + void forEach( void (_FAR *f)(T _FAR &, void _FAR *), void _FAR *args ) + { + if( !isEmpty() ) + data.forEach( f, args ); + } + + T _FAR *firstThat( int (_FAR *f)(const T _FAR &, void _FAR *), + void _FAR *args + ) const + { + if( isEmpty() ) + return 0; + return data.firstThat( f, args ); + } + + T _FAR *lastThat( int (_FAR * f)(const T _FAR &, void _FAR *), + void _FAR *args + ) const + { + if( isEmpty() ) + return 0; + return data.lastThat( f, args ); + } + +}; + +template class _CLASSTYPE BI_ArrayAsVectorIterator : + BI_VectorIteratorImp +{ + +public: + + BI_ArrayAsVectorIterator( const BI_ArrayAsVector _FAR & a ) : + BI_VectorIteratorImp(a.data) {} + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_IArrayAsVector */ +/* */ +/* Implements an indirect array of objects of type T, using a vector as */ +/* the underlying implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_IArrayAsVector : + public BI_ArrayAsVectorImp,T _FAR *>, + public virtual TShouldDelete +{ + +public: + + friend class _CLASSTYPE BI_IArrayAsVectorIterator; + + BI_IArrayAsVector( int upper, int lower = 0, int delta = 0 ) : + BI_ArrayAsVectorImp,T _FAR *>( upper, lower, delta ) + { + } + + ~BI_IArrayAsVector() + { + flush(); + } + + T _FAR * _FAR & operator []( int loc ) + { + grow( loc+1 ); + return data[zeroBase(loc)]; + } + + T _FAR * _FAR & operator []( int loc ) const + { + PRECONDITION( loc >= lowerbound && zeroBase(loc) < data.limit() ); + return data[zeroBase(loc)]; + } + + void add( T _FAR *t ) + { + BI_ArrayAsVectorImp,T _FAR *>::add(t); + } + + void addAt( T _FAR *t, int loc ) + { + BI_ArrayAsVectorImp,T _FAR *>::addAt(t,loc); + } + + void detach( int loc, DeleteType dt = NoDelete ) + { + data.detach( zeroBase(loc), delObj(dt) ); + } + + void detach( T _FAR *t, DeleteType dt = NoDelete ) + { + unsigned loc = data.find( t ); + if( loc == UINT_MAX ) + return; + data.detach( loc, delObj(dt) ); + } + + void flush( DeleteType dt = DefDelete ) + { + data.flush( delObj(dt), data.limit(), 0 ); + } + + int find( const T *t ) const + { + return boundBase(data.find( (T *)t )); + } + + void forEach( void (_FAR *f)(T _FAR &, void _FAR *), void _FAR *args ) + { + if( !isEmpty() ) + data.forEach( f, args ); + } + + T _FAR *firstThat( int (_FAR *f)(const T _FAR &, void _FAR *), + void _FAR *args + ) const + { + if( isEmpty() ) + return 0; + return data.firstThat( f, args ); + } + + T _FAR *lastThat( int (_FAR * f)(const T _FAR &, void _FAR *), + void _FAR *args + ) const + { + if( isEmpty() ) + return 0; + return data.lastThat( f, args ); + } + +}; + +template class _CLASSTYPE BI_IArrayAsVectorIterator : + public BI_IVectorIteratorImp +{ + +public: + + BI_IArrayAsVectorIterator( const BI_IArrayAsVector _FAR &a ) : + BI_IVectorIteratorImp(a.data) {} + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* class BI_OArrayAsVector */ +/* */ +/* Implements an array of pointers to Object, */ +/* using a vector as the underlying implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +class _CLASSTYPE BI_OArrayAsVector +{ + +public: + + friend class _CLASSTYPE BI_OArrayAsVectorIterator; + + BI_OArrayAsVector() : oarray( DEFAULT_ARRAY_SIZE ) + { + } + + BI_OArrayAsVector( int upr, int lwr = 0, unsigned delta = 0 ) : + oarray( upr, lwr, delta ) + { + } + + Object *operator [] (int loc) + { + return oarray[loc]; + } + + Object *operator [] (int loc) const + { + return oarray[loc]; + } + + int lowerBound() const + { + return oarray.lowerBound(); + } + + int upperBound() const + { + return oarray.upperBound(); + } + + sizeType arraySize() const + { + return oarray.arraySize(); + } + + void add( Object _FAR *o ) + { + oarray.add(o); + } + + void addAt( Object _FAR *o, int loc ) + { + oarray.addAt(o,loc); + } + + void detach( int loc, + TShouldDelete::DeleteType dt = TShouldDelete::NoDelete + ) + { + oarray.detach( loc, dt ); + } + + void detach( Object _FAR *o, + TShouldDelete::DeleteType dt = TShouldDelete::NoDelete + ) + { + oarray.detach( o, dt ); + } + + void destroy( int i ) + { + oarray.destroy( i ); + } + + void flush( TShouldDelete::DeleteType dt = TShouldDelete::DefDelete ) + { + oarray.flush( dt ); + } + + int hasMember( Object _FAR *o ) const + { + return oarray.hasMember(o); + } + + Object _FAR *findMember( Object _FAR *o ) const + { + int loc = oarray.find(o); + return loc != INT_MAX ? oarray[loc] : 0; + } + + int isEmpty() const + { + return oarray.isEmpty(); + } + + int isFull() const + { + return oarray.isFull(); + } + + void forEach( void (_FAR*f)(Object _FAR &, void _FAR*), void _FAR*args ) + { + oarray.forEach( f, args ); + } + + Object _FAR *firstThat( int (_FAR *f)(const Object _FAR &, void _FAR *), + void _FAR *args + ) const + { + return oarray.firstThat( f, args ); + } + + Object _FAR *lastThat( int (_FAR *f)(const Object _FAR &, void _FAR *), + void _FAR *args + ) const + { + return oarray.lastThat( f, args ); + } + + int getItemsInContainer() const + { + return oarray.getItemsInContainer(); + } + + int ownsElements() + { + return oarray.ownsElements(); + } + + void ownsElements( int del ) + { + oarray.ownsElements( del ); + } + +protected: + + BI_IArrayAsVector oarray; + +}; + +class _CLASSTYPE BI_OArrayAsVectorIterator : + public BI_IArrayAsVectorIterator +{ + +public: + + BI_OArrayAsVectorIterator( const BI_OArrayAsVector _FAR &a ) : + BI_IArrayAsVectorIterator(a.oarray) + { + restart(); + } + + void restart() + { + BI_IArrayAsVectorIterator::restart(); + if( current() == 0 ) + (*this)++; + } + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* class BI_TCArrayAsVector */ +/* */ +/* Implements an Object array, with the full semantics of */ +/* the BC 2.0 style array, using a vector as the underlying */ +/* implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +class _CLASSTYPE BI_TCArrayAsVector : public AbstractArray +{ + +public: + + friend class _CLASSTYPE BI_TCArrayAsVectorIterator; + + BI_TCArrayAsVector( int upper, int lower = 0, sizeType delta = 0 ) : + array( upper, lower, delta ) + { + } + + virtual Object& operator []( int loc ) + { + return ptrToRef(array[loc]); + } + + virtual Object& operator []( int loc ) const + { + return ptrToRef(array[loc]); + } + + virtual int lowerBound() const + { + return array.lowerBound(); + } + + virtual int upperBound() const + { + return array.upperBound(); + } + + virtual sizeType arraySize() const + { + return array.arraySize(); + } + + void add( Object _FAR &o ) + { + array.add(&o); + } + + void addAt( Object _FAR &o, int loc ) + { + array.addAt(&o,loc); + } + + virtual void detach( int loc, DeleteType dt = NoDelete ) + { + array.detach( loc, dt ); + } + + void detach( Object _FAR &o, + TShouldDelete::DeleteType dt = TShouldDelete::NoDelete + ) + { + array.detach( &o, dt ); + } + + void flush( TShouldDelete::DeleteType dt = TShouldDelete::DefDelete ) + { + array.flush( dt ); + } + + int hasMember( Object _FAR &o ) const + { + return array.hasMember(&o); + } + + Object _FAR &findMember( Object _FAR &o ) const + { + return ptrToRef(array.findMember(&o)); + } + + int isEmpty() const + { + return array.isEmpty(); + } + + int isFull() const + { + return array.isFull(); + } + + void forEach( void (_FAR*f)(Object _FAR &, void _FAR*), void _FAR*args ) + { + array.forEach( f, args ); + } + + Object _FAR &firstThat( int (_FAR *f)(const Object _FAR &, void _FAR *), + void _FAR *args + ) const + { + return ptrToRef(array.firstThat( f, args )); + } + + Object _FAR &lastThat( int (_FAR *f)(const Object _FAR &, void _FAR *), + void _FAR *args + ) const + { + return ptrToRef(array.lastThat( f, args )); + } + + int getItemsInContainer() const + { + return array.getItemsInContainer(); + } + + virtual classType isA() const + { + return arrayClass; + } + + virtual char _FAR *nameOf() const + { + return "BI_TCArrayAsVector"; + } + + int ownsElements() + { + return array.ownsElements(); + } + + void ownsElements( int del ) + { + array.ownsElements( del ); + } + + ContainerIterator _FAR &initIterator() const; + +private: + + BI_OArrayAsVector array; + +}; + +class _CLASSTYPE BI_TCArrayAsVectorIterator : public ContainerIterator +{ + +public: + + BI_TCArrayAsVectorIterator( const BI_TCArrayAsVector _FAR &a ) : + iter(a.array) + { + } + + virtual operator int() + { + return int(iter); + } + + virtual Object _FAR & current() + { + return Object::ptrToRef(iter.current()); + } + + virtual Object _FAR & operator ++ ( int ) + { + return Object::ptrToRef(iter++); + } + + virtual Object _FAR & operator ++ () + { + return Object::ptrToRef(++iter); + } + + virtual void restart() + { + iter.restart(); + } + +private: + + BI_OArrayAsVectorIterator iter; + +}; + +inline ContainerIterator _FAR & BI_TCArrayAsVector::initIterator() const + { return *new BI_TCArrayAsVectorIterator( *this ); } + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_SArrayAsVector */ +/* */ +/* Implements a sorted array of objects of type T, using a vector as */ +/* the underlying implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_SArrayAsVector : + public BI_ArrayAsVectorImp,T> +{ + +public: + + friend class _CLASSTYPE BI_SArrayAsVectorIterator; + + BI_SArrayAsVector( int upper, int lower = 0, int delta = 0 ) : + BI_ArrayAsVectorImp,T>( upper, lower, delta ) + { + } + + T& operator []( int loc ) + { + grow( loc ); + return data[zeroBase(loc)]; + } + + T& operator []( int loc ) const + { + PRECONDITION( loc >= lowerbound && loc < data.count() ); + return data[zeroBase(loc)]; + } + + void forEach( void (_FAR *f)(T _FAR &, void _FAR *), void _FAR *args ) + { + if( !isEmpty() ) + data.forEach( f, args ); + } + + T _FAR *firstThat( int (_FAR *f)(const T _FAR &, void _FAR *), + void _FAR *args + ) const + { + if( isEmpty() ) + return 0; + return data.firstThat( f, args ); + } + + T _FAR *lastThat( int (_FAR * f)(const T _FAR &, void _FAR *), + void _FAR *args + ) const + { + if( isEmpty() ) + return 0; + return data.lastThat( f, args ); + } + +}; + +template class _CLASSTYPE BI_SArrayAsVectorIterator : + BI_VectorIteratorImp +{ + +public: + + BI_SArrayAsVectorIterator( const BI_SArrayAsVector _FAR & a ) : + BI_VectorIteratorImp(a.data) {} + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_ISArrayAsVector */ +/* */ +/* Implements an indirect sorted array of objects of type T, using a */ +/* vector as the underlying implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_ISArrayAsVector : + public BI_ArrayAsVectorImp,T _FAR *>, + public virtual TShouldDelete +{ + +public: + + friend class _CLASSTYPE BI_ISArrayAsVectorIterator; + + BI_ISArrayAsVector( int upper, int lower = 0, int delta = 0 ) : + BI_ArrayAsVectorImp,T _FAR*>( upper, lower, delta ) + { + } + + ~BI_ISArrayAsVector() + { + flush(); + } + + T _FAR * _FAR & operator []( int loc ) + { + grow( loc ); + return data[zeroBase(loc)]; + } + + T _FAR * _FAR & operator []( int loc ) const + { + PRECONDITION( loc >= lowerbound && loc < data.count() ); + return data[zeroBase(loc)]; + } + + void add( T _FAR *t ) + { + BI_ArrayAsVectorImp,T _FAR *>::add(t); + } + + void addAt( T _FAR *t, int loc ) + { + BI_ArrayAsVectorImp,T _FAR *>::addAt(t,loc); + } + + void detach( int loc, DeleteType dt = NoDelete ) + { + data.detach( loc, delObj(dt) ); + } + + void detach( T _FAR *t, DeleteType dt = NoDelete ) + { + unsigned loc = data.find( t ); + if( loc == UINT_MAX ) + return; + data.detach( loc, delObj(dt) ); + } + + void flush( DeleteType dt = DefDelete ) + { + data.flush( delObj(dt), data.limit(), 0 ); + } + + int find( const T *t ) const + { + return data.find( (T *)t ); + } + + void forEach( void (_FAR *f)(T _FAR &, void _FAR *), void _FAR *args ) + { + if( !isEmpty() ) + data.forEach( f, args ); + } + + T _FAR *firstThat( int (_FAR *f)(const T _FAR &, void _FAR *), + void _FAR *args + ) const + { + if( isEmpty() ) + return 0; + return data.firstThat( f, args ); + } + + T _FAR *lastThat( int (_FAR * f)(const T _FAR &, void _FAR *), + void _FAR *args + ) const + { + if( isEmpty() ) + return 0; + return data.lastThat( f, args ); + } + +}; + +template class _CLASSTYPE BI_ISArrayAsVectorIterator : + public BI_IVectorIteratorImp +{ + +public: + + BI_ISArrayAsVectorIterator( const BI_ISArrayAsVector _FAR &a ) : + BI_IVectorIteratorImp(a.data) {} + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* class BI_ISObjectVector */ +/* */ +/* Implements a sorted vector of pointers to Object. */ +/* This is implemented through the template BI_ISVectorImp. */ +/* */ +/*------------------------------------------------------------------------*/ + +class _CLASSTYPE BI_ISObjectVector : + public BI_InternalICVectorImp > +{ + +public: + + BI_ISObjectVector( unsigned sz, unsigned d = 0 ) : + BI_InternalICVectorImp >(sz) + { + delta = d; + } + + ~BI_ISObjectVector() + { + flush(); + } + + void add( Object _FAR *o ); + + void addAt( Object _FAR *t, unsigned loc ) + { + BI_InternalICVectorImp >::addAt(t,loc); + } + + void detach( unsigned loc, int del = 0 ) + { + BI_InternalICVectorImp >::detach( loc, del ); + } + + void detach( Object _FAR *t, int del = 0 ) + { + unsigned loc = find( t ); + if( loc == UINT_MAX ) + return; + BI_InternalICVectorImp >::detach( loc, del ); + } + + void flush( int del = 0 ) + { + BI_InternalICVectorImp >::flush( del ); + } + + unsigned find( Object _FAR *t ) const + { + return find( (void _FAR *)t ); + } + +protected: + + unsigned find( void _FAR *t ) const; + +}; + +class _CLASSTYPE BI_ISObjectVectorIterator : + public BI_IVectorIteratorImp +{ + +public: + + BI_ISObjectVectorIterator( const BI_ISObjectVector _FAR &a ) : + BI_IVectorIteratorImp(a) {} + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* class BI_ISObjectArray */ +/* */ +/* Implements an indirect sorted array of pointers to Object, using a */ +/* vector as the underlying implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +class _CLASSTYPE BI_ISObjectArray : + public BI_ArrayAsVectorImp, + public virtual TShouldDelete +{ + +public: + + friend class _CLASSTYPE BI_ISObjectArrayIterator; + + BI_ISObjectArray( int upr, int lwr = 0, int delta = 0 ) : + BI_ArrayAsVectorImp( upr, lwr, delta ) + { + } + + ~BI_ISObjectArray() + { + flush(); + } + + Object _FAR * _FAR & operator []( int loc ) + { + grow( loc ); + return data[zeroBase(loc)]; + } + + Object _FAR * _FAR & operator []( int loc ) const + { + PRECONDITION( loc >= lowerbound && zeroBase(loc) < data.count() ); + return data[zeroBase(loc)]; + } + + void add( Object _FAR *t ) + { + BI_ArrayAsVectorImp::add(t); + } + + void addAt( Object _FAR *t, int loc ) + { + BI_ArrayAsVectorImp::addAt(t,loc); + } + + void detach( int loc, DeleteType dt = NoDelete ) + { + data.detach( zeroBase(loc), delObj(dt) ); + } + + void detach( Object _FAR *t, DeleteType dt = NoDelete ) + { + data.detach( t, delObj(dt) ); + } + + void flush( DeleteType dt = DefDelete ) + { + data.flush( delObj(dt) ); + } + + int find( const Object *t ) const + { + return boundBase(data.find( (Object *)t )); + } + + void forEach( void (_FAR*f)(Object _FAR &, void _FAR*), void _FAR*args ) + { + if( !isEmpty() ) + data.forEach( f, args ); + } + + Object _FAR *firstThat( int (_FAR *f)(const Object _FAR &, void _FAR *), + void _FAR *args + ) const + { + if( isEmpty() ) + return 0; + return data.firstThat( f, args ); + } + + Object _FAR *lastThat( int (_FAR * f)(const Object _FAR &, void _FAR *), + void _FAR *args + ) const + { + if( isEmpty() ) + return 0; + return data.lastThat( f, args ); + } + +}; + +class _CLASSTYPE BI_ISObjectArrayIterator : + public BI_ISObjectVectorIterator +{ + +public: + + BI_ISObjectArrayIterator( const BI_ISObjectArray _FAR &a ) : + BI_ISObjectVectorIterator(a.data) {} + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* class BI_OSArrayAsVector */ +/* */ +/* Implements a sorted array of pointers to Object, */ +/* using a vector as the underlying implementation. */ +/* */ +/* Although the interface is written to take pointers to Object, in */ +/* fact, pointers to Sortable are required. */ +/* */ +/*------------------------------------------------------------------------*/ + +class _CLASSTYPE BI_OSArrayAsVector +{ + +public: + + friend class _CLASSTYPE BI_OSArrayAsVectorIterator; + + BI_OSArrayAsVector() : oarray( DEFAULT_ARRAY_SIZE, 0, 0 ) + { + } + + BI_OSArrayAsVector( int upr, int lwr = 0, unsigned delta = 0 ) : + oarray( upr, lwr, delta ) + { + } + + Object *operator [] (int loc) + { + return oarray[loc]; + } + + Object *operator [] (int loc) const + { + return oarray[loc]; + } + + int lowerBound() const + { + return oarray.lowerBound(); + } + + int upperBound() const + { + return oarray.upperBound(); + } + + sizeType arraySize() const + { + return oarray.arraySize(); + } + + void add( Object _FAR *o ) + { + PRECONDITION( o->isSortable() ); + oarray.add(o); + } + + void addAt( Object _FAR *o, int loc ) + { + PRECONDITION( o->isSortable() ); + oarray.addAt(o,loc); + } + + void detach( int loc, + TShouldDelete::DeleteType dt = TShouldDelete::NoDelete + ) + { + oarray.detach( loc, dt ); + } + + void detach( Object _FAR *o, + TShouldDelete::DeleteType dt = TShouldDelete::NoDelete + ) + { + PRECONDITION( o->isSortable() ); + oarray.detach( o, dt ); + } + + void flush( TShouldDelete::DeleteType dt = TShouldDelete::DefDelete ) + { + oarray.flush( dt ); + } + + int hasMember( Object _FAR *o ) const + { + PRECONDITION( o->isSortable() ); + return oarray.hasMember(o); + } + + Object _FAR *findMember( Object _FAR *o ) const + { + PRECONDITION( o->isSortable() ); + int loc = oarray.find(o); + return loc != INT_MAX ? oarray[loc] : 0; + } + + int isEmpty() const + { + return oarray.isEmpty(); + } + + int isFull() const + { + return oarray.isFull(); + } + + void forEach( void (_FAR*f)(Object _FAR &, void _FAR*), void _FAR*args ) + { + oarray.forEach( f, args ); + } + + Object _FAR *firstThat( int (_FAR *f)(const Object _FAR &, void _FAR *), + void _FAR *args + ) const + { + return oarray.firstThat( f, args ); + } + + Object _FAR *lastThat( int (_FAR *f)(const Object _FAR &, void _FAR *), + void _FAR *args + ) const + { + return oarray.lastThat( f, args ); + } + + int getItemsInContainer() const + { + return oarray.getItemsInContainer(); + } + + int ownsElements() + { + return oarray.ownsElements(); + } + + void ownsElements( int del ) + { + oarray.ownsElements( del ); + } + +protected: + + BI_ISObjectArray oarray; + +}; + +class _CLASSTYPE BI_OSArrayAsVectorIterator : + public BI_ISObjectArrayIterator +{ + +public: + + BI_OSArrayAsVectorIterator( const BI_OSArrayAsVector _FAR &a ) : + BI_ISObjectArrayIterator(a.oarray) + { + } + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* class BI_TCSArrayAsVector */ +/* */ +/* Implements a sorted Object array, with the full semantics of */ +/* the BC 2.0 style sorted array, using a vector as the underlying */ +/* implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +class _CLASSTYPE BI_TCSArrayAsVector : public AbstractArray +{ + +public: + + friend class _CLASSTYPE BI_TCSArrayAsVectorIterator; + + BI_TCSArrayAsVector( int upper = DEFAULT_ARRAY_SIZE, + int lower = 0, + sizeType delta = 0 + ) : + array( upper, lower, delta ) + { + } + + virtual Object& operator []( int loc ) + { + return ptrToRef(array[loc]); + } + + virtual Object& operator []( int loc ) const + { + return ptrToRef(array[loc]); + } + + virtual int lowerBound() const + { + return array.lowerBound(); + } + + virtual int upperBound() const + { + return array.upperBound(); + } + + virtual sizeType arraySize() const + { + return array.arraySize(); + } + + void add( Object _FAR &o ) + { + array.add(&o); + } + + void addAt( Object _FAR &o, int loc ) + { + array.addAt(&o,loc); + } + + virtual void detach( int loc, DeleteType dt = NoDelete ) + { + array.detach( loc, dt ); + } + + void detach( Object _FAR &o, DeleteType dt = NoDelete ) + { + array.detach( &o, dt ); + } + + void flush( TShouldDelete::DeleteType dt = DefDelete ) + { + array.flush( dt ); + } + + int hasMember( Object _FAR &o ) const + { + return array.hasMember(&o); + } + + Object _FAR &findMember( Object _FAR &o ) const + { + return ptrToRef(array.findMember(&o)); + } + + int isEmpty() const + { + return array.isEmpty(); + } + + int isFull() const + { + return array.isFull(); + } + + void forEach( void (_FAR*f)(Object _FAR &, void _FAR*), void _FAR*args ) + { + array.forEach( f, args ); + } + + Object _FAR &firstThat( int (_FAR *f)(const Object _FAR &, void _FAR *), + void _FAR *args + ) const + { + return ptrToRef(array.firstThat( f, args )); + } + + Object _FAR &lastThat( int (_FAR *f)(const Object _FAR &, void _FAR *), + void _FAR *args + ) const + { + return ptrToRef(array.lastThat( f, args )); + } + + int getItemsInContainer() const + { + return array.getItemsInContainer(); + } + + virtual classType isA() const + { + return sortedArrayClass; + } + + virtual char _FAR *nameOf() const + { + return "BI_TCSArrayAsVector"; + } + + int ownsElements() + { + return array.ownsElements(); + } + + void ownsElements( int del ) + { + array.ownsElements( del ); + } + + ContainerIterator _FAR & initIterator() const; + +private: + + BI_OSArrayAsVector array; + +}; + +class _CLASSTYPE BI_TCSArrayAsVectorIterator : public ContainerIterator +{ + +public: + + BI_TCSArrayAsVectorIterator( const BI_TCSArrayAsVector _FAR &a ) : + iter(a.array) + { + } + + virtual operator int() + { + return int(iter); + } + + virtual Object _FAR & current() + { + return Object::ptrToRef(iter.current()); + } + + virtual Object _FAR & operator ++ ( int ) + { + return Object::ptrToRef(iter++); + } + + virtual Object _FAR & operator ++ () + { + return Object::ptrToRef(++iter); + } + + virtual void restart() + { + iter.restart(); + } + +private: + + BI_OSArrayAsVectorIterator iter; + +}; + +inline ContainerIterator _FAR & BI_TCSArrayAsVector::initIterator() const + { + return *new BI_TCSArrayAsVectorIterator( *this ); + } + +#pragma warn .ncf + +#endif // __ARRAYS_H + diff --git a/M/TC/CLASSLIB/INCLUDE/ASSOC.H b/M/TC/CLASSLIB/INCLUDE/ASSOC.H new file mode 100644 index 0000000..b77cbe3 --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/ASSOC.H @@ -0,0 +1,87 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* ASSOC.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __ASSOC_H ) +#define __ASSOC_H + +#if !defined( __CLSTYPES_H ) +#include +#endif // __CLSTYPES_H + +#if !defined( __OBJECT_H ) +#include +#endif // __OBJECT_H + +#if !defined( __SHDDEL_H ) +#include +#endif // __SHDDEL_H + +_CLASSDEF(ostream) +_CLASSDEF(Association) + +class _CLASSTYPE Association : public Object, public virtual TShouldDelete +{ + +public: + + Association( Object _FAR & k, Object _FAR & v ) : + aKey( k ), + aValue( v ) + { + } + + Association( const Association _FAR & a ) : + aKey(a.aKey), + aValue(a.aValue) + { + } + + virtual ~Association(); + + Object _FAR & key() const + { + return aKey; + } + + Object _FAR & value() const + { + return aValue; + } + + virtual classType isA() const + { + return associationClass; + } + + virtual char _FAR *nameOf() const + { + return "Association"; + } + + virtual hashValueType hashValue() const + { + return aKey.hashValue(); + } + + virtual int isEqual( const Object _FAR & ) const; + virtual int isAssociation() const + { + return 1; + } + + virtual void printOn( ostream _FAR & ) const; + +private: + + Object _FAR & aKey; + Object _FAR & aValue; + +}; + +#endif diff --git a/M/TC/CLASSLIB/INCLUDE/BAG.H b/M/TC/CLASSLIB/INCLUDE/BAG.H new file mode 100644 index 0000000..f59bb66 --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/BAG.H @@ -0,0 +1,152 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* BAG.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __BAG_H ) +#define __BAG_H + +#if defined( TEMPLATES ) + + #if !defined( __BAGS_H ) + #include + #endif // __BAGS_H + + #define Bag BI_TCBagAsVector + #define PBag PBI_TCBagAsVector + #define RBag RBI_TCBagAsVector + #define RPBag RPBI_TCBagAsVector + #define PCBag PCBI_TCBagAsVector + #define RCBag RCBI_TCBagAsVector + + _CLASSDEF( BI_TCBagAsVector ) + + #define BagIterator BI_TCBagAsVectorIterator + #define PBagIterator PBI_TCBagAsVectorIterator + #define RBagIterator RBI_TCBagAsVectorIterator + #define RPBagIterator RPBI_TCBagAsVectorIterator + #define PCBagIterator PCBI_TCBagAsVectorIterator + #define RCBagIterator RCBI_TCBagAsVectorIterator + + _CLASSDEF( BI_TCBagAsVectorIterator ) + +#else // TEMPLATES + + #if !defined( __RESOURCE_H ) + #include + #endif // __RESOURCE_H + + #if !defined( __CLSTYPES_H ) + #include + #endif // __CLSTYPES_H + + #if !defined( __HASHTBL_H ) + #include + #endif // __HASHTBL_H + + _CLASSDEF(Bag) + + class _CLASSTYPE Bag : public Collection + { + + public: + + Bag( sizeType bagSize = DEFAULT_BAG_SIZE ) : + table( bagSize ) + { + } + + virtual void add( Object _FAR & o ) + { + table.add( o ); + } + + virtual void detach( Object _FAR & o, DeleteType dt = NoDelete ) + { + table.detach( o, dt ); + } + + virtual void flush( DeleteType dt = DefDelete ) + { + table.flush( dt ); + } + + virtual int isEmpty() const + { + return table.isEmpty(); + } + + virtual countType getItemsInContainer() const + { + return table.getItemsInContainer(); + } + + void forEach( void (_FAR *f)(Object _FAR &, void _FAR *), + void _FAR *args + ) + { + table.forEach( f, args ); + } + + Object _FAR& firstThat( int (_FAR*f)(const Object _FAR&, void _FAR*), + void _FAR *args + ) const + { + return table.firstThat( f, args ); + } + + Object _FAR& lastThat( int (_FAR*f)(const Object _FAR&, void _FAR*), + void _FAR *args + ) const + { + return table.lastThat( f, args ); + } + + virtual int hasMember( Object _FAR & o ) const + { + return table.hasMember( o ); + } + + virtual Object _FAR & findMember( Object _FAR & o ) const + { + return table.findMember(o); + } + + virtual ContainerIterator _FAR & initIterator() const + { + return table.initIterator(); + } + + virtual classType isA() const + { + return bagClass; + } + + virtual char _FAR *nameOf() const + { + return "Bag"; + } + + int ownsElements() + { + return table.ownsElements(); + } + + void ownsElements( int del ) + { table.ownsElements( del ); + } + + private: + + HashTable table; + + }; + +#endif // TEMPLATES + +#endif // __BAG_H + diff --git a/M/TC/CLASSLIB/INCLUDE/BAGS.H b/M/TC/CLASSLIB/INCLUDE/BAGS.H new file mode 100644 index 0000000..a8eda84 --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/BAGS.H @@ -0,0 +1,516 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* BAGS.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __BAGS_H ) +#define __BAGS_H + +#if !defined( __CHECKS_H ) +#include +#endif // __CHECKS_H + +#if !defined( __SHDDEL_H ) +#include +#endif // __SHDDEL_H + +#if !defined( __VECTIMP_H ) +#include +#endif // __VECTIMP_H + +#if !defined( __RESOURCE_H ) +#include +#endif // __RESOURCE_H + +#if !defined( __COLLECT_H ) +#include +#endif // __COLLECT_H + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_BagAsVectorImp */ +/* */ +/* Implements a bag, using a vector as the underlying implementation. */ +/* The type Vect specifies the form of the vector, either a */ +/* BI_CVectorImp or a BI_ICVectorImp. The type T specifies the */ +/* type of the objects to be put in the bag. When using */ +/* BI_VectorImp, T should be the same as T0. When using */ +/* BI_IVectorImp, T should be of type pointer to T0. See */ +/* BI_BagAsVector and BI_IBagAsVector for examples. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_BagAsVectorImp +{ + +public: + + BI_BagAsVectorImp( unsigned sz = DEFAULT_BAG_SIZE ) : + data(sz,1) + { + } + + void add( T t ) + { + data.add( t ); + } + + void detach( T t, TShouldDelete::DeleteType = TShouldDelete::NoDelete ) + { + data.detach( t ); + } + + void flush( TShouldDelete::DeleteType = TShouldDelete::DefDelete ) + { + data.flush(); + } + + int hasMember( T t ) const + { + return data.find(t) != UINT_MAX; + } + + T findMember( T t ) const + { + PRECONDITION( hasMember(t) ); + return data[data.find(t)]; + } + + int isEmpty() const + { + return data.isEmpty(); + } + + int isFull() const + { return 0; + } + + int getItemsInContainer() const + { + return data.top(); + } + +protected: + + Vect data; + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_BagAsVector */ +/* */ +/* Implements a bag of objects of type T, using a vector as */ +/* the underlying implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_BagAsVector : + public BI_BagAsVectorImp,T> +{ + +public: + + friend class _CLASSTYPE BI_BagAsVectorIterator; + + BI_BagAsVector( unsigned sz = DEFAULT_BAG_SIZE ) : + BI_BagAsVectorImp,T>( sz ) + { + } + + void forEach( void (_FAR *f)(T _FAR &, void _FAR *), void _FAR *args ) + { + data.forEach( f, args, 0, data.top() ); + } + + T _FAR *firstThat( int (_FAR *f)(const T _FAR &, void _FAR *), + void _FAR *args + ) const + { + return data.firstThat( f, args, 0, data.top() ); + } + + T _FAR *lastThat( int (_FAR *f)(const T _FAR &, void _FAR *), + void _FAR *args + ) const + { + return data.lastThat( f, args, 0, data.top() ); + } + +protected: + + virtual T _FAR *find( T ) const; + +}; + +template T _FAR *BI_BagAsVector::find( T t ) const +{ + if( isEmpty() ) + return 0; + for( int index = 0; index < data.top(); index++ ) + if( data[index] == t ) + return &(data[index]); + return 0; +} + +template class _CLASSTYPE BI_BagAsVectorIterator : + public BI_VectorIteratorImp +{ + +public: + + BI_BagAsVectorIterator( const BI_BagAsVector _FAR & b ) : + BI_VectorIteratorImp(b.data,0,b.data.top()) {} + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_IBagAsVector */ +/* */ +/* Implements a bag of pointers to objects of type T, */ +/* using a vector as the underlying implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_IBagAsVector : + public BI_BagAsVectorImp,T _FAR *>, + public virtual TShouldDelete +{ + +public: + + friend class _CLASSTYPE BI_IBagAsVectorIterator; + + BI_IBagAsVector( unsigned sz = DEFAULT_BAG_SIZE ) : + BI_BagAsVectorImp,T _FAR *>(sz) + { + } + + ~BI_IBagAsVector() + { + flush(); + } + + void add( T _FAR *t ) + { + BI_BagAsVectorImp,T _FAR *>::add(t); + } + + void detach( T _FAR *t, DeleteType dt = NoDelete ) + { + data.detach( t, delObj(dt) ); + } + + void flush( TShouldDelete::DeleteType dt = TShouldDelete::DefDelete ) + { + data.flush( delObj(dt), data.top(), 0 ); + } + + T _FAR *findMember( T _FAR *t ) const + { + unsigned loc = data.find(t); + return (T _FAR *)( loc == UINT_MAX ? 0 : data[loc] ); + } + + void forEach( void (_FAR *f)(T _FAR &, void _FAR *), void _FAR *args ) + { + data.forEach( f, args, 0, data.top() ); + } + + T _FAR *firstThat( int (_FAR *f)(const T _FAR &, void _FAR *), + void _FAR *args + ) const + { + return data.firstThat( f, args, 0, data.top() ); + } + + T _FAR *lastThat( int (_FAR *f)(const T _FAR &, void _FAR *), + void _FAR *args + ) const + { + return data.lastThat( f, args, 0, data.top() ); + } + +}; + +template class _CLASSTYPE BI_IBagAsVectorIterator : + public BI_IVectorIteratorImp +{ + +public: + + BI_IBagAsVectorIterator( const BI_IBagAsVector _FAR & s ) : + BI_IVectorIteratorImp(s.data,0,s.data.top()) {} + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* class BI_OBagAsVector */ +/* */ +/* Implements a bag of pointers to Object, */ +/* using a vector as the underlying implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +class _CLASSTYPE BI_OBagAsVector +{ + +public: + + friend class _CLASSTYPE BI_OBagAsVectorIterator; + + BI_OBagAsVector( unsigned sz = DEFAULT_BAG_SIZE ) : + obag( sz ) + { + } + + void add( Object _FAR *o ) + { + obag.add(o); + } + + void detach( Object _FAR *o, + TShouldDelete::DeleteType dt = TShouldDelete::NoDelete + ) + { + obag.detach( o, dt ); + } + + void flush( TShouldDelete::DeleteType dt = TShouldDelete::DefDelete ) + { + obag.flush( dt ); + } + + int hasMember( Object _FAR *o ) const + { + return obag.hasMember(o); + } + + Object _FAR *findMember( Object _FAR *o ) const + { + Object _FAR *obj = obag.findMember( o ); + return obj != 0 ? obj : 0; + } + + int isEmpty() const + { + return obag.isEmpty(); + } + + int isFull() const + { + return obag.isFull(); + } + + void forEach( void (_FAR*f)(Object _FAR &, void _FAR*), void _FAR*args ) + { + obag.forEach( f, args ); + } + + Object _FAR *firstThat( int (_FAR *f)(const Object _FAR &, void _FAR *), + void _FAR *args + ) const + { + return obag.firstThat( f, args ); + } + + Object _FAR *lastThat( int (_FAR *f)(const Object _FAR &, void _FAR *), + void _FAR *args + ) const + { + return obag.lastThat( f, args ); + } + + int getItemsInContainer() const + { + return obag.getItemsInContainer(); + } + + int ownsElements() + { + return obag.ownsElements(); + } + + void ownsElements( int del ) + { + obag.ownsElements( del ); + } + +protected: + + BI_IBagAsVector obag; + +}; + +class _CLASSTYPE BI_OBagAsVectorIterator : + public BI_IBagAsVectorIterator +{ + +public: + + BI_OBagAsVectorIterator( const BI_OBagAsVector _FAR & b ) : + BI_IBagAsVectorIterator(b.obag) + { + } + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* class BI_TCBagAsVector */ +/* */ +/* Implements an Object bag, with the full semantics of */ +/* the BC 2.0 style Bag, using a vector as the underlying */ +/* implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +class _CLASSTYPE BI_TCBagAsVector : public Collection +{ + +public: + + friend class _CLASSTYPE BI_TCBagAsVectorIterator; + + BI_TCBagAsVector( int sz = DEFAULT_BAG_SIZE ) : + bag(sz) + { + } + + virtual void add( Object _FAR & o ) + { + bag.add( &o ); + } + + virtual void detach( Object _FAR & o, + TShouldDelete::DeleteType dt = TShouldDelete::NoDelete ) + { + bag.detach( &o, dt ); + } + + virtual void flush(TShouldDelete::DeleteType dt=TShouldDelete::DefDelete ) + { + bag.flush( dt ); + } + + virtual int isEmpty() const + { + return bag.isEmpty(); + } + + virtual countType getItemsInContainer() const + { + return bag.getItemsInContainer(); + } + + void forEach( void (_FAR*f)(Object _FAR &, void _FAR*), void _FAR*args ) + { + bag.forEach( f, args ); + } + + Object _FAR & firstThat( int (_FAR *f)(const Object _FAR &, void _FAR *), + void _FAR *args + ) const + { + return ptrToRef(bag.firstThat( f, args )); + } + + Object _FAR & lastThat( int (_FAR *f)(const Object _FAR &, void _FAR *), + void _FAR *args + ) const + { + return ptrToRef(bag.lastThat( f, args )); + } + + virtual int hasMember( Object _FAR & o ) const + { + return bag.hasMember( &o ); + } + + virtual Object _FAR & findMember( Object _FAR & o ) const + { + return ptrToRef(bag.findMember(&o)); + } + + virtual ContainerIterator _FAR & initIterator() const; + + virtual classType isA() const + { + return bagClass; + } + + virtual char _FAR *nameOf() const + { + return "BI_TCBagAsVector"; + } + + int ownsElements() + { + return bag.ownsElements(); + } + + void ownsElements( int del ) + { + bag.ownsElements( del ); + } + +protected: + + BI_OBagAsVector bag; + +}; + +class _CLASSTYPE BI_TCBagAsVectorIterator : public ContainerIterator +{ + +public: + + BI_TCBagAsVectorIterator( const BI_TCBagAsVector _FAR &b ) : + iter(b.bag) + { + } + + virtual operator int() + { + return int(iter); + } + + virtual Object _FAR & current() + { + return Object::ptrToRef(iter.current()); + } + + virtual Object _FAR & operator ++ ( int ) + { + return Object::ptrToRef(iter++); + } + + virtual Object _FAR & operator ++ () + { + return Object::ptrToRef(++iter); + } + + virtual void restart() + { + iter.restart(); + } + +private: + + BI_OBagAsVectorIterator iter; + +}; + +inline ContainerIterator _FAR & BI_TCBagAsVector::initIterator() const +{ + return *new BI_TCBagAsVectorIterator( *this ); +} + +#endif // __BAGS_H + diff --git a/M/TC/CLASSLIB/INCLUDE/BTREE.H b/M/TC/CLASSLIB/INCLUDE/BTREE.H new file mode 100644 index 0000000..f04357e --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/BTREE.H @@ -0,0 +1,467 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* BTREE.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __BTREE_H ) +#define __BTREE_H + +#if !defined( __CHECKS_H ) +#include +#endif // __CHECKS_H + +#if !defined( __SORTABLE_H ) +#include +#endif // __SORTABLE_H + +#if !defined( __COLLECT_H ) +#include +#endif // __COLLECT_H + +_CLASSDEF(Node) +_CLASSDEF(Item) +_CLASSDEF(Btree) +_CLASSDEF(InnerNode) +_CLASSDEF(LeafNode) +_CLASSDEF(BtreeIterator) + +class _CLASSTYPE Node +{ + +public: + + /*dbg*/int debugKey; // !*!*!*! not for distribution! + + Node( int b, InnerNode _FAR * P, Btree _FAR * T = 0 ); + virtual ~Node(); + + virtual void add( Sortable _FAR *, int ) = 0; + virtual void remove( int ) = 0; + + virtual Object _FAR & operator[]( long i ) const = 0; + virtual Object _FAR & found( Sortable _FAR *, + Node _FAR * _FAR *, + int _FAR * + ) = 0; + + virtual long findRank( Sortable _FAR * ) const = 0; + virtual long nofKeys() const = 0; // # keys in or below this node + + virtual LeafNode _FAR * firstLeafNode() = 0; + virtual LeafNode _FAR * lastLeafNode() = 0; + + virtual void split() = 0; + + virtual void printOn(ostream _FAR &) const = 0; + friend ostream _FAR & operator <<( ostream _FAR &, const Node _FAR & ); + + int last; // for inner node 1 <= last <= InnerMaxIndex + // for leaf node 1 <= last <= LeafMaxIndex + // (last==0 only temporarily while the tree is being + // updated) + InnerNode _FAR *parent; // a parent is always an inner node (or 0 for the root) + Btree _FAR *tree; // the tree of which this node is a part + int isLeaf; // run-time type flag + +}; + +class _CLASSTYPE Item +{ + +public: + + Item(); + Item(Node _FAR * n, Sortable _FAR * o); + Item(Sortable _FAR * o, Node _FAR * n); + ~Item(); + // data + long nofKeysInTree; // tree can have more than 32K elements + Sortable _FAR *key; + Node _FAR *tree; + +}; + +class _CLASSTYPE InnerNode : public Node +{ + +public: + + InnerNode( InnerNode _FAR *, Btree _FAR * = 0 ); + InnerNode( InnerNode _FAR *, Btree _FAR *, Node _FAR * ); + ~InnerNode(); + + void add( Sortable _FAR *, int ); + void add( Item _FAR &, int ); + void add( int, Sortable _FAR *, Node _FAR * ); + void addElt( Item _FAR &, int ); + void addElt( int, Sortable _FAR *, Node _FAR * ); + void remove( int ); + void removeItem( int ); + + Object _FAR & operator[]( long i ) const; + Object _FAR & found( Sortable _FAR *, Node _FAR * _FAR *, int _FAR * ); + + long nofKeys( int i ) const; + void setTree( int i, Node _FAR * node ); + void setKey( int i, Sortable _FAR * obj ); + void setItem( int i, Item _FAR & itm ); + void setItem( int i, Sortable _FAR * obj, Node _FAR * node ); + long getNofKeys( int i ) const; + void setNofKeys( int i, long r ); + long incNofKeys( int i, long N=1 ); + long decNofKeys( int i, long N=1 ); + long findRank( Sortable _FAR * ) const; + long findRank_bu( const Node _FAR * ) const; + Node _FAR *getTree( int i ) const; + Sortable _FAR *getKey( int i ) const; + Item _FAR & getItem( int i ) const; + + + int indexOf( const Node _FAR * ) const; + void incrNofKeys( Node _FAR * np ); + void decrNofKeys( Node _FAR * np ); + long nofKeys() const; + + LeafNode _FAR *firstLeafNode(); + LeafNode _FAR *lastLeafNode(); + + void informParent(); + + void split(); + void splitWith( InnerNode _FAR *, int ); + void mergeWithRight( InnerNode _FAR *, int ); + void balanceWithLeft( InnerNode _FAR *, int ); + void balanceWithRight( InnerNode _FAR *, int ); + void balanceWith( InnerNode _FAR *, int ); + void pushLeft( int cnt, InnerNode _FAR * leftsib, int parentIdx ); + void pushRight( int cnt, InnerNode _FAR * rightsib, int parentIdx ); + void appendFrom( InnerNode _FAR *, int, int ); + void append( Sortable _FAR *, Node _FAR * ); + void append( Item _FAR & ); + void shiftLeft( int ); + + int Psize() const; + int Vsize() const; + int maxIndex() const; + int maxPsize() const; + + void printOn(ostream&) const; + + int isFull() const; + void isFull( Node _FAR * ); + int isAlmostFull() const; + int isLow() const; + void isLow( Node _FAR * ); + +private: + + Item _FAR *item; // actually items[maxIndex()+1] is desired + +}; + +class _CLASSTYPE LeafNode : public Node +{ + +public: + + LeafNode(InnerNode _FAR * P, Sortable _FAR * obj = 0, Btree _FAR * T = 0 ); + ~LeafNode(); + + void add( Sortable _FAR * , int ); + void remove( int i ); + void removeItem( int i); + + Object _FAR & operator[]( long i ) const; + Object _FAR & found( Sortable _FAR *, Node _FAR * _FAR *, int _FAR * ); + + long nofKeys( int i ) const; + long nofKeys() const; + long findRank( Sortable _FAR * ) const; + Sortable _FAR *getKey( int idx ) { return item[idx]; } + void setKey( int idx, Sortable _FAR * obj ) { item[idx] = obj; } + + int indexOf( const Sortable _FAR * ) const; + + LeafNode _FAR *firstLeafNode(); + LeafNode _FAR *lastLeafNode(); + + void split(); + void splitWith( LeafNode _FAR *, int ); + void mergeWithRight( LeafNode _FAR *, int ); + void balanceWithLeft( LeafNode _FAR *, int ); + void balanceWithRight( LeafNode _FAR *, int ); + void balanceWith( LeafNode _FAR *, int ); + void pushLeft( int cnt, LeafNode _FAR *, int parentIndex ); + void pushRight( int cnt, LeafNode _FAR *, int parentIndex ); + void appendFrom( LeafNode _FAR *, int, int ); + void append( Sortable _FAR * ); + void shiftLeft ( int ); + + int Psize() const; + int Vsize() const; + int maxIndex() const; + int maxPsize() const; + + void printOn(ostream _FAR &) const; + + int isFull() const; + int isAlmostFull() const; + int isLow() const; + + Sortable _FAR * _FAR *item; // actually Sortable* item[maxIndex()+1] is desired + +}; + +class _CLASSTYPE Btree : public Collection +{ + +public: + + Btree( int ordern = 3 );//-create a Btree of order n + ~Btree(); + + void add( Object _FAR & ); + void detach( Object _FAR &, DeleteType = NoDelete ); + void flush( DeleteType = DefDelete ); + virtual int hasMember( Object _FAR & ) const; + virtual Object _FAR & findMember( Object _FAR & ) const; + + virtual int isEmpty() const { return itemsInContainer == 0; } + virtual countType getItemsInContainer() const { return itemsInContainer; } + + virtual classType isA() const { return btreeClass; } + virtual char _FAR *nameOf() const { return "Btree"; } + virtual int isEqual( const Object _FAR & ) const; + virtual void printOn( ostream _FAR & ) const; + virtual ContainerIterator _FAR & initIterator() const; + + + + int order(); + Object _FAR & operator[]( long i ) const; + long rank( const Object _FAR & ) const; + +protected: + + void incrNofKeys() { itemsInContainer++; } + void decrNofKeys() { itemsInContainer--; } + + long i_add( const Object _FAR & ); + //-add the object to the tree; return the index + // in the tree at which the object was inserted + // (C++ doesn't allow signatures + // to differ in only the return value). + // NOTE: other insertions and deletions may + // change this object's index. +private: + + int Order; //-the order of the tree (should be > 2) + int Order2; //-always == order*2+1 (assumes a memory access + // is cheaper than a multiply and increment by one + int Inner_LowWaterMark; + int Leaf_LowWaterMark; + int Inner_MaxIndex; + int Leaf_MaxIndex; + + Node _FAR *root; + + void finishInit(int); + void rootIsFull(); // called when the root node is full + void rootIsEmpty(); // called when root is empty + + unsigned itemsInContainer; + + friend Node; + friend InnerNode; + friend LeafNode; + +}; + + +inline Node _FAR *InnerNode::getTree( int i ) const +{ + return item[i].tree; +} + +inline Sortable _FAR * InnerNode::getKey( int i ) const +{ + return item[i].key; +} + +inline Item _FAR & InnerNode::getItem( int i ) const +{ + return item[i]; +} + +inline void InnerNode::setTree( int i, Node _FAR * node ) +{ + item[i].tree = node; + node->parent = this; +} + +inline void InnerNode::setKey( int i, Sortable _FAR * obj ) +{ + item[i].key = obj; +} + +inline void InnerNode::setItem( int i, Item _FAR & itm ) +{ + item[i] = itm; + itm.tree->parent = this; +} + +inline void InnerNode::setItem( int i, Sortable _FAR * obj, Node _FAR * node ) +{ + setTree(i, node); + setKey(i, obj); +} + +inline long InnerNode::getNofKeys( int i ) const +{ + PRECONDITION( i >= 0 && i <= last ); + return item[i].nofKeysInTree; +} + +inline void InnerNode::setNofKeys( int i, long r ) +{ + item[i].nofKeysInTree = r; +} + +inline long InnerNode::incNofKeys( int i, long N ) +{ + return ( item[i].nofKeysInTree += N ); +} + +inline long InnerNode::decNofKeys( int i, long N ) +{ + return ( item[i].nofKeysInTree -= N ); +} + +inline long InnerNode::nofKeys( int i ) const +{ + return getNofKeys(i); +} + +inline int InnerNode::Psize() const +{ + return last; +} + +inline int InnerNode::Vsize() const +{ + PRECONDITION( parent != 0 && parent->getTree(0) != (Node _FAR *)this ); + return Psize()+1; +} + +inline int InnerNode::maxIndex() const +{ + return tree->Inner_MaxIndex; +} + +inline int InnerNode::maxPsize() const +{ + return tree->Inner_MaxIndex; +} + +inline int InnerNode::isFull() const +{ + return last == maxIndex(); +} + +inline int InnerNode::isAlmostFull() const +{ + return last >= maxIndex() - 1; +} + +inline int InnerNode::isLow() const +{ + return last < tree->Inner_LowWaterMark; +} + +inline void LeafNode::removeItem( int i) +{ + remove(i); +} + +inline Object _FAR & LeafNode::operator[]( long i ) const +{ + PRECONDITION( i >=0 && i <= last ); + return *((Object _FAR *)item[(int)i]); // CHECK - cast to int OK? +} + +inline int LeafNode::Psize() const +{ + return last+1; +} + +inline int LeafNode::Vsize() const +{ + PRECONDITION( parent != 0 && parent->getTree(0) != (Node _FAR *)this ); + return Psize()+1; +} + +inline int LeafNode::maxIndex() const +{ + return tree->Leaf_MaxIndex; +} + +inline int LeafNode::maxPsize() const +{ + return tree->Leaf_MaxIndex + 1; +} + +inline int LeafNode::isFull() const +{ + return last == maxIndex(); +} + +inline int LeafNode::isAlmostFull() const +{ + return last >= maxIndex() - 1; +} + +inline int LeafNode::isLow() const +{ + return last < tree->Leaf_LowWaterMark; +} + +inline int Btree::order() +{ + return Order; +} + +inline ostream _FAR & operator <<( ostream& outputStream, const Node _FAR & aNode) +{ + aNode.printOn( outputStream ); + return outputStream; +} + +class _CLASSTYPE BtreeIterator : public ContainerIterator +{ +public: + BtreeIterator( const Btree _FAR & ); + virtual ~BtreeIterator(); + + virtual operator int(); + virtual Object _FAR & current(); + virtual Object _FAR & operator ++(); + virtual Object _FAR & operator ++( int ); + virtual void restart(); + +private: + const Btree _FAR & beingIterated; + long index; +}; + +inline BtreeIterator::BtreeIterator( const Btree _FAR & toIterate ) : + beingIterated( toIterate ), index( 0 ) +{ +} + +inline Object _FAR & Btree::operator[]( long i ) const { return (*root)[i]; } + +#endif diff --git a/M/TC/CLASSLIB/INCLUDE/CHECKS.H b/M/TC/CLASSLIB/INCLUDE/CHECKS.H new file mode 100644 index 0000000..8976280 --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/CHECKS.H @@ -0,0 +1,46 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* CHECKS.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __CHECKS_H ) +#define __CHECKS_H + +#if !defined( ___DEFS_H ) +#include <_defs.h> +#endif // ___DEFS_H + +extern "C" void _Cdecl __assertfail( char _FAR *__msg, + char _FAR *__cond, + char _FAR *__file, + int __line); + +#if !defined( __DEBUG ) +#define __DEBUG 2 +#endif + +#undef PRECONDITION + +#if __DEBUG < 1 +#define PRECONDITION(p) ((void)0) +#else +#define PRECONDITION(p) ((p) ? (void)0 : (void) __assertfail( \ + "Precondition violated: %s, file %s, line %d\n", \ + #p, __FILE__, __LINE__ ) ) +#endif + +#undef CHECK + +#if __DEBUG < 2 +#define CHECK(p) ((void)0) +#else +#define CHECK(p) ((p) ? (void)0 : (void) __assertfail( \ + "Check failed: %s, file %s, line %d\n", \ + #p, __FILE__, __LINE__ ) ) +#endif + +#endif // __CHECKS_H diff --git a/M/TC/CLASSLIB/INCLUDE/CLSDEFS.H b/M/TC/CLASSLIB/INCLUDE/CLSDEFS.H new file mode 100644 index 0000000..ce0535d --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/CLSDEFS.H @@ -0,0 +1,19 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* CLSDEFS.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __CLSDEFS_H ) +#define __CLSDEFS_H + +#if !defined( __CLSTYPES_H ) +#include +#endif // __CLSTYPES_H + +const hashValueType ERROR_CLASS_HASH_VALUE = 0; + +#endif diff --git a/M/TC/CLASSLIB/INCLUDE/CLSTYPES.H b/M/TC/CLASSLIB/INCLUDE/CLSTYPES.H new file mode 100644 index 0000000..1853b6f --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/CLSTYPES.H @@ -0,0 +1,94 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* CLSTYPES.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __CLSTYPES_H ) +#define __CLSTYPES_H + +#if !defined( ___DEFS_H ) +#include <_defs.h> +#endif // ___DEFS_H + +#if !defined( __LIMITS_H ) +#include +#endif + +typedef unsigned int classType; +typedef unsigned int hashValueType; +typedef unsigned int sizeType; + +_CLASSDEF(Object) + +typedef void ( _FAR *iterFuncType )( class Object _FAR &, void _FAR * ); +typedef int ( _FAR *condFuncType )( const class Object _FAR &, void _FAR * ); +typedef int countType; + +enum +{ + objectClass, + errorClass, + sortableClass, + stringClass, + listElementClass, + doubleListElementClass, + containerClass, + stackClass, + queueClass, + dequeClass, + collectionClass, + hashTableClass, + bagClass, + setClass, + dictionaryClass, + associationClass, + arrayClass, + sortedArrayClass, + listClass, + doubleListClass, + timeClass, + dateClass, + btreeClass, + priorityQueueClass, + __firstOWLClass = 100, + __lastLibClass = 255, + __firstUserClass, + __lastClass = UINT_MAX +}; + +enum ClassLib_errors +{ + __EfirstError, // don't remove + __EDELERROR, + __EEXPANDFS, + __EEXPANDLB, + __ENOMEM, + __ENOTSORT, + __ENOTASSOC, + __EORDER3, + __ENOMEMIA, + __ENOMEMLN, + __EPRBADCLASS, + __EPRINCONS, + __EBNZERODIV, + __EBNILLLOG, + __EBNNOMEM, + __ERANDOM2SMALL, + __EBNTEMPSTKOVFL, + __EBNTEMPSTKUNFL, + __EBN2MANYTEMPS, + __EBN2BIG2PRINT, + __EBNNOMEM4PRINT, + __EBNRESULT2BIG, + __ERNG2BIG, + __EBNSQRTILLEGAL, + __ElastError // don't remove +}; + +void ClassLib_error( ClassLib_errors, char _FAR *addstr = 0 ); + +#endif diff --git a/M/TC/CLASSLIB/INCLUDE/COLLECT.H b/M/TC/CLASSLIB/INCLUDE/COLLECT.H new file mode 100644 index 0000000..a4e5b46 --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/COLLECT.H @@ -0,0 +1,49 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* COLLECT.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __COLLECT_H ) +#define __COLLECT_H + +#if !defined( __CLSTYPES_H ) +#include +#endif // __CLSTYPES_H + +#if !defined( __OBJECT_H ) +#include +#endif // __OBJECT_H + +#if !defined( __CONTAIN_H ) +#include +#endif // __CONTAIN_H + +_CLASSDEF(ContainerIterator) +_CLASSDEF(Collection) + +class _CLASSTYPE Collection : public Container +{ + +public: + + virtual void add( Object _FAR & ) = 0; + virtual void detach( Object _FAR &, DeleteType = NoDelete ) = 0; + void destroy( Object _FAR & o ) + { + detach( o, DefDelete ); + } + + virtual int hasMember( Object _FAR & obj ) const + { + return findMember( obj ) != NOOBJECT; + } + + virtual Object _FAR & findMember( Object _FAR & ) const; + +}; + +#endif diff --git a/M/TC/CLASSLIB/INCLUDE/CONTAIN.H b/M/TC/CLASSLIB/INCLUDE/CONTAIN.H new file mode 100644 index 0000000..c6cced9 --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/CONTAIN.H @@ -0,0 +1,89 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* CONTAIN.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __CONTAIN_H ) +#define __CONTAIN_H + +#if !defined( __CLSTYPES_H ) +#include +#endif // __CLSTYPES_H + +#if !defined( __OBJECT_H ) +#include +#endif // __OBJECT_H + +#if !defined( __SHDDEL_H ) +#include +#endif // __SHDDEL_H + +_CLASSDEF(ostream) +_CLASSDEF(ContainerIterator) +_CLASSDEF(Container) + +class _CLASSTYPE Container : public Object, public virtual TShouldDelete +{ + +public: + + Container() : itemsInContainer(0) {} + + virtual void flush( DeleteType = DefDelete ) = 0; + + virtual int isEmpty() const + { + return itemsInContainer == 0; + } + + virtual countType getItemsInContainer() const + { + return itemsInContainer; + } + + virtual void forEach( iterFuncType, void _FAR * ); + virtual Object _FAR & firstThat( condFuncType, void _FAR * ) const; + virtual Object _FAR & lastThat( condFuncType, void _FAR * ) const; + + virtual classType isA() const = 0; + virtual char _FAR *nameOf() const = 0; + virtual hashValueType hashValue() const; + virtual int isEqual( const Object& ) const; + + virtual void printOn( ostream& ) const; + virtual void printHeader( ostream& ) const; + virtual void printSeparator( ostream& ) const; + virtual void printTrailer( ostream& ) const; + + virtual ContainerIterator _FAR & initIterator() const = 0; + + friend class ContainerIterator; + +protected: + + unsigned itemsInContainer; + +}; + +class _CLASSTYPE ContainerIterator +{ + +public: + + virtual ~ContainerIterator() + { + } + + virtual operator int() = 0; + virtual Object _FAR & current() = 0; + virtual Object _FAR & operator ++ ( int ) = 0; + virtual Object _FAR & operator ++ () = 0; + virtual void restart() = 0; + +}; + +#endif diff --git a/M/TC/CLASSLIB/INCLUDE/DBLLIST.H b/M/TC/CLASSLIB/INCLUDE/DBLLIST.H new file mode 100644 index 0000000..5f3c0a1 --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/DBLLIST.H @@ -0,0 +1,239 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* DBLLIST.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __DBLLIST_H ) +#define __DBLLIST_H + +#if !defined( __CLSTYPES_H ) +#include +#endif // __CLSTYPES_H + +#if !defined( __OBJECT_H ) +#include +#endif // __OBJECT_H + +#if !defined( __COLLECT_H ) +#include +#endif // __COLLECT_H + +#if !defined( __MEMMGR_H ) +#include +#endif // __MEMMGR_H + +#if !defined( __SHDDEL_H ) +#include +#endif // __SHDDEL_H + +_CLASSDEF(DoubleList) +_CLASSDEF(DoubleListIterator) + +class _CLASSTYPE DoubleListBlockInitializer +{ + +protected: + + DoubleListBlockInitializer(); + ~DoubleListBlockInitializer(); + + static unsigned count; + +}; + +class _CLASSTYPE DoubleList : + public Collection, + private DoubleListBlockInitializer +{ + +public: + + DoubleList() : + headEntry( 0, &headEntry, &tailEntry ), + tailEntry( 0, &headEntry, &tailEntry ), + head( &headEntry ), + tail( &tailEntry ), + itemsInContainer(0) + { + } + + ~DoubleList() + { + flush(); + } + + Object _FAR & peekAtHead() const + { + return ptrToRef(head->next->data); + } + + Object _FAR & peekAtTail() const + { + return ptrToRef(tail->prev->data); + } + + virtual void add( Object _FAR & toAdd ) + { + addAtHead( toAdd ); + } + + virtual void detach( Object _FAR &, DeleteType = NoDelete ); + virtual void flush( DeleteType = DefDelete ); + + void addAtHead( Object _FAR & ); + void addAtTail( Object _FAR & ); + void destroyFromHead( Object _FAR & ); + void destroyFromTail( Object _FAR & ); + void detachFromHead( Object _FAR &, DeleteType = NoDelete ); + void detachFromTail( Object _FAR &, DeleteType = NoDelete ); + + int isEmpty() const + { + return itemsInContainer == 0; + } + + countType getItemsInContainer() const + { + return itemsInContainer; + } + + virtual ContainerIterator _FAR & initIterator() const; + ContainerIterator _FAR & initReverseIterator() const; + + virtual classType isA() const + { + return doubleListClass; + } + + virtual char _FAR *nameOf() const + { + return "DoubleList"; + } + +private: + + class _CLASSTYPE ListElement + { + + public: + + ListElement( Object _FAR *o, + ListElement _FAR *p = 0, + ListElement _FAR *n = 0 + ) + { + data = o; + prev = p; + next = n; + } + + private: + + ListElement _FAR *next; + ListElement _FAR *prev; + Object _FAR *data; + + void _FAR *operator new( size_t sz ) + { + PRECONDITION( mgr != 0 ); + return mgr->allocate( sz ); + } + void operator delete( void _FAR *b ) + { + PRECONDITION( mgr != 0 ); + mgr->free( b ); + } + + static MemBlocks _FAR *mgr; + + friend class DoubleList; + friend class DoubleListIterator; + friend class DoubleListBlockInitializer; + + }; + + ListElement _FAR *head; + ListElement _FAR *tail; + + ListElement headEntry, tailEntry; + + unsigned itemsInContainer; + + friend class DoubleListIterator; + friend class DoubleListBlockInitializer; + +}; + +inline DoubleListBlockInitializer::DoubleListBlockInitializer() +{ + PRECONDITION( count != UINT_MAX ); + if( count++ == 0 ) + DoubleList::ListElement::mgr = + new MemBlocks( sizeof(DoubleList::ListElement), 20 ); +} + +inline DoubleListBlockInitializer::~DoubleListBlockInitializer() +{ + PRECONDITION( count != 0 ); + if( --count == 0 ) + { + delete DoubleList::ListElement::mgr; + DoubleList::ListElement::mgr = 0; + } +} + +inline void DoubleList::destroyFromHead( Object _FAR & toDestroy ) +{ + detachFromHead( toDestroy, DefDelete ); +} + +inline void DoubleList::destroyFromTail( Object _FAR & toDestroy ) +{ + detachFromTail( toDestroy, DefDelete ); +} + +class _CLASSTYPE DoubleListIterator : public ContainerIterator +{ + +public: + + DoubleListIterator( const DoubleList _FAR &, int = 1 ); + virtual ~DoubleListIterator(); + + virtual operator int(); + virtual Object _FAR & current(); + virtual Object _FAR & operator ++ ( int ); + virtual Object _FAR & operator ++ (); + Object _FAR & operator -- ( int ); + Object _FAR & operator -- (); + + virtual void restart(); + +private: + + DoubleList::ListElement _FAR *currentElement; + DoubleList::ListElement _FAR *startingElement; + +}; + +inline +DoubleListIterator::DoubleListIterator( const DoubleList _FAR & toIterate, + int atHead + ) +{ + if ( atHead == 1 ) + { + startingElement = currentElement = toIterate.head->next; + } + else + { + startingElement = currentElement = toIterate.tail->prev; + } +} + +#endif // __DBLLIST_H + diff --git a/M/TC/CLASSLIB/INCLUDE/DEQUE.H b/M/TC/CLASSLIB/INCLUDE/DEQUE.H new file mode 100644 index 0000000..28129e7 --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/DEQUE.H @@ -0,0 +1,122 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* DEQUE.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __DEQUE_H ) +#define __DEQUE_H + +#if defined( TEMPLATES ) + + #if !defined( __DEQUES_H ) + #include + #endif // __DEQUES_H + + #define Deque BI_TCDequeAsDoubleList + #define PDeque PBI_TCDequeAsDoubleList + #define RDeque RBI_TCDequeAsDoubleList + #define RPDeque RPBI_TCDequeAsDoubleList + #define PCDeque PCBI_TCDequeAsDoubleList + #define RCDeque RCBI_TCDequeAsDoubleList + + _CLASSDEF( BI_TCDequeAsDoubleList ) + + #define DequeIterator BI_TCDequeAsDoubleListIterator + #define PDequeIterator PBI_TCDequeAsDoubleListIterator + #define RDequeIterator RBI_TCDequeAsDoubleListIterator + #define RPDequeIterator RPBI_TCDequeAsDoubleListIterator + #define PCDequeIterator PCBI_TCDequeAsDoubleListIterator + #define RCDequeIterator RCBI_TCDequeAsDoubleListIterator + + _CLASSDEF( BI_TCDequeAsDoubleListIterator ) + +#else // TEMPLATES + + #if !defined( __CLSTYPES_H ) + #include + #endif // __CLSTYPES_H + + #if !defined( __CONTAIN_H ) + #include + #endif // __CONTAIN_H + + #if !defined( __DBLLIST_H ) + #include + #endif // __DBLLIST_H + + _CLASSDEF(Deque) + + class _CLASSTYPE Deque : public Container + { + + public: + + ~Deque() + { + flush(); + } + + Object& peekLeft() const + { + return theDeque.peekAtHead(); + } + + Object& peekRight() const + { + return theDeque.peekAtTail(); + } + + Object& getLeft(); + Object& getRight(); + + void putLeft( Object& o ) + { + theDeque.addAtHead( o ); itemsInContainer++; + } + + void putRight( Object& o ) + { + theDeque.addAtTail( o ); itemsInContainer++; + } + + virtual void flush( DeleteType dt = DefDelete ) + { + theDeque.flush( dt ); + } + + virtual int isEmpty() const + { + return theDeque.isEmpty(); + } + + virtual countType getItemsInContainer() const + { + return theDeque.getItemsInContainer(); + } + + virtual ContainerIterator& initIterator() const; + + virtual classType isA() const + { + return dequeClass; + } + + virtual char _FAR *nameOf() const + { + return "Deque"; + } + + private: + + DoubleList theDeque; + + }; + +#endif // TEMPLATES + +#endif // __DEQUE_H + diff --git a/M/TC/CLASSLIB/INCLUDE/DEQUES.H b/M/TC/CLASSLIB/INCLUDE/DEQUES.H new file mode 100644 index 0000000..24eb40d --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/DEQUES.H @@ -0,0 +1,1176 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* DEQUES.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __DEQUES_H ) +#define __DEQUES_H + +#if !defined( ___DEFS_H ) +#include <_defs.h> +#endif // ___DEFS_H + +#if !defined( __CHECKS_H ) +#include +#endif // __CHECKS_H + +#if !defined( __SHDDEL_H ) +#include +#endif // __SHDDEL_H + +#if !defined( __VECTIMP_H ) +#include +#endif // __VECTIMP_H + +#if !defined( __DLISTIMP_H ) +#include +#endif // __DLISTIMP_H + +#if !defined( __CONTAIN_H ) +#include +#endif // __CONTAIN_H + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_DequeAsVectorImp */ +/* */ +/* Implements the fundamental dequeue operations, using a vector */ +/* as the underlying implementation. The type Vect specifies the */ +/* form of the vector, either a BI_VectorImp or a */ +/* BI_IVectorImp. The type T specifies the type of the */ +/* objects to be put in the dequeue. When using BI_VectorImp, */ +/* T should be the same as T0. When using BI_IVectorImp, T */ +/* should be of type pointer to T0. See BI_QueueAsVector and */ +/* BI_IQueueAsVector for examples. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_DequeAsVectorImp +{ + +public: + + BI_DequeAsVectorImp( unsigned max = DEFAULT_DEQUE_SIZE ) : + data(max+1), + left(0), + right(0) + { + } + + T peekLeft() const + { + PRECONDITION( !isEmpty() ); + return data[left]; + } + + T peekRight() const + { + PRECONDITION( !isEmpty() ); + return data[prev(right)]; + } + + T getLeft(); + T getRight(); + + void putLeft( T ); + void putRight( T ); + + void flush( TShouldDelete::DeleteType = TShouldDelete::DefDelete ) + { + left = right = 0; + } + + int isFull() const + { + return right == prev( left ); + } + + int isEmpty() const + { + return right == left; + } + + int getItemsInContainer() const + { + return (right>=left) ? right - left : data.limit()-(left-right); + } + +protected: + + Vect data; + unsigned left; + unsigned right; + + unsigned prev( unsigned index ) const + { + if( index == 0 ) + index = data.limit(); + return --index; + } + + unsigned next( unsigned index ) const + { + index++; + if( index == data.limit() ) + index = 0; + return index; + } + +}; + +template T BI_DequeAsVectorImp::getRight() +{ + PRECONDITION( !isEmpty() ); + right = prev(right); + return data[right]; +} + +template +void BI_DequeAsVectorImp::putRight( T t ) +{ + PRECONDITION( !isFull() ); + data[right] = t; + right = next(right); +} + +template T BI_DequeAsVectorImp::getLeft() +{ + PRECONDITION( !isEmpty() ); + T t = data[left]; + left = next(left); + return t; +} + +template +void BI_DequeAsVectorImp::putLeft( T t ) +{ + PRECONDITION( !isFull() ); + left = prev(left); + data[left] = t; +} + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_DequeAsVectorIteratorImp */ +/* */ +/* Implements an iterator for the family of Deques as Vectors. */ +/* */ +/*------------------------------------------------------------------------*/ + +template +class _CLASSTYPE BI_DequeAsVectorIteratorImp +{ + +public: + + BI_DequeAsVectorIteratorImp( const V _FAR &, unsigned l, unsigned r ); + + operator int(); + T current(); + T operator ++ ( int ); + T operator ++ (); + void restart(); + +private: + + unsigned left; + unsigned right; + const V _FAR *vect; + I iter; + int second; + + void nextBlock(); + +}; + +template +BI_DequeAsVectorIteratorImp::BI_DequeAsVectorIteratorImp( const V _FAR &v, + unsigned l, + unsigned r + ) : + iter( v ) +{ + vect = &v; + left = l; + right = r; + restart(); +} + +template +BI_DequeAsVectorIteratorImp::operator int() +{ + return int(iter); +} + +template +T BI_DequeAsVectorIteratorImp::current() +{ + return iter.current(); +} + +template +T BI_DequeAsVectorIteratorImp::operator ++ ( int ) +{ + nextBlock(); + return iter++; +} + +template +T BI_DequeAsVectorIteratorImp::operator ++ () +{ + T temp = ++iter; + nextBlock(); + return temp; +} + +template +void BI_DequeAsVectorIteratorImp::restart() +{ + if( left <= right ) + iter.restart( left, right ); + else + iter.restart( 0, left ); + second = 0; +} + +template +void BI_DequeAsVectorIteratorImp::nextBlock() +{ + if( int(iter) == 0 && !second && left > right ) + { + iter.restart( right, vect->limit() ); + second = 1; + } +} + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_DequeAsVector */ +/* */ +/* Implements a dequeue of objects of type T, using a vector as */ +/* the underlying implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_DequeAsVector : + public BI_DequeAsVectorImp,T> +{ + +public: + + friend class _CLASSTYPE BI_DequeAsVectorIterator; + + BI_DequeAsVector( unsigned max = DEFAULT_DEQUE_SIZE ) : + BI_DequeAsVectorImp,T>( max ) + { + } + + void forEach( void (_FAR *f)(T _FAR &, void _FAR *), void _FAR *args ) + { + data.forEach( f, args, left, right ); + } + + T _FAR *firstThat( int (_FAR *f)(const T _FAR &, void _FAR *), + void _FAR *args + ) const + { + return data.firstThat( f, args, left, right ); + } + + T _FAR *lastThat( int (_FAR *f)(const T _FAR &, void _FAR *), + void _FAR *args + ) const + { + return data.lastThat( f, args, left, right ); + } + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_DequeAsVectorIterator */ +/* */ +/* Implements an iterator for a DequeAsVector. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_DequeAsVectorIterator : + public BI_DequeAsVectorIteratorImp,BI_VectorImp,T> +{ + +public: + + BI_DequeAsVectorIterator( const BI_DequeAsVector _FAR &d ) : + BI_DequeAsVectorIteratorImp,BI_VectorImp,T>( d.data,d.left,d.right ) + { + } + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_IDequeAsVector */ +/* */ +/* Implements a dequeue of pointers to objects of type T, */ +/* using a vector as the underlying implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_IDequeAsVector : + public BI_DequeAsVectorImp,T _FAR *>, + public virtual TShouldDelete +{ + +public: + + friend class _CLASSTYPE BI_IDequeAsVectorIterator; + + BI_IDequeAsVector( unsigned sz = DEFAULT_DEQUE_SIZE ) : + BI_DequeAsVectorImp,T _FAR *>(sz) + { + } + + ~BI_IDequeAsVector() + { + flush(); + } + + T _FAR *peekLeft() const + { + return (T _FAR *)BI_DequeAsVectorImp,T _FAR *>::peekLeft(); + } + + T _FAR *peekRight() const + { + return (T _FAR *)BI_DequeAsVectorImp,T _FAR *>::peekRight(); + } + + T _FAR *getLeft() + { + return (T _FAR *)BI_DequeAsVectorImp,T _FAR *>::getLeft(); + } + + T _FAR *getRight() + { + return (T _FAR *)BI_DequeAsVectorImp,T _FAR *>::getRight(); + } + + void putLeft( T _FAR *t ) + { + BI_DequeAsVectorImp,T _FAR *>::putLeft( t ); + } + + void putRight( T _FAR *t ) + { + BI_DequeAsVectorImp,T _FAR *>::putRight( t ); + } + + void flush( TShouldDelete::DeleteType = TShouldDelete::DefDelete ); + + void forEach( void (_FAR *f)(T _FAR &, void _FAR *), void _FAR *args ) + { + data.forEach( f, args, left, right ); + } + + T _FAR *firstThat( int (_FAR *f)(const T _FAR &, void _FAR *), + void _FAR *args + ) const + { + return data.firstThat( f, args, left, right ); + } + + T _FAR *lastThat( int (_FAR *f)(const T _FAR &, void _FAR *), + void _FAR *args + ) const + { + return data.lastThat( f, args, left, right ); + } + +}; + +template +void BI_IDequeAsVector::flush( TShouldDelete::DeleteType dt ) +{ + if( delObj(dt) != 0 ) + { + if( left <= right ) + data.flush( 1, right, left ); + else + { + data.flush( 1, data.limit(), left + 1 ); + data.flush( 1, right, 0 ); + } + } + BI_DequeAsVectorImp,T _FAR *>::flush(); +} + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_IDequeAsVectorIterator */ +/* */ +/* Implements an iterator for the family of IDeques as Vectors. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_IDequeAsVectorIterator : + public BI_DequeAsVectorIteratorImp,BI_IVectorImp,T _FAR *> +{ + +public: + + BI_IDequeAsVectorIterator( const BI_IDequeAsVector _FAR &d ) : + BI_DequeAsVectorIteratorImp,BI_IVectorImp,T _FAR *>(d.data,d.left,d.right) {} + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* class BI_ODequeAsVector */ +/* */ +/* Implements a dequeue of pointers to Object, */ +/* using a vector as the underlying implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +class _CLASSTYPE BI_ODequeAsVector +{ + +public: + + friend class _CLASSTYPE BI_ODequeAsVectorIterator; + + BI_ODequeAsVector( unsigned sz = DEFAULT_DEQUE_SIZE ) : + odeque( sz ) + { + } + + Object _FAR *peekLeft() const + { + return odeque.peekLeft(); + } + + Object _FAR *peekRight() const + { + return odeque.peekRight(); + } + + Object _FAR *getLeft() + { + return odeque.getLeft(); + } + + Object _FAR *getRight() + { + return odeque.getRight(); + } + + void putLeft( Object _FAR *o ) + { + odeque.putLeft( o ); + } + + void putRight( Object _FAR *o ) + { + odeque.putRight( o ); + } + + void flush( TShouldDelete::DeleteType dt = TShouldDelete::DefDelete ) + { + odeque.flush( dt ); + } + + int isFull() const + { + return odeque.isFull(); + } + + int isEmpty() const + { + return odeque.isEmpty(); + } + + void forEach( void (_FAR*f)(Object _FAR &, void _FAR*), void _FAR*args ) + { + odeque.forEach( f, args ); + } + + Object _FAR *firstThat( int (_FAR *f)(const Object _FAR &, void _FAR *), + void _FAR *args + ) const + { + return odeque.firstThat( f, args ); + } + + Object _FAR *lastThat( int (_FAR *f)(const Object _FAR &, void _FAR *), + void _FAR *args + ) const + { + return odeque.lastThat( f, args ); + } + + int getItemsInContainer() const + { + return odeque.getItemsInContainer(); + } + +protected: + + BI_IDequeAsVector odeque; + +}; + +class _CLASSTYPE BI_ODequeAsVectorIterator : + public BI_IDequeAsVectorIterator +{ + +public: + + BI_ODequeAsVectorIterator( const BI_ODequeAsVector _FAR &d ) : + BI_IDequeAsVectorIterator(d.odeque) + { + } + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* class BI_TCDequeAsVector */ +/* */ +/* Implements an Object dequeue, with the full semantics of */ +/* the BC 2.0 style deque, using a vector as the underlying */ +/* implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +class _CLASSTYPE BI_TCDequeAsVector : public Container +{ + +public: + + friend class _CLASSTYPE BI_TCDequeAsVectorIterator; + + BI_TCDequeAsVector( int sz = DEFAULT_DEQUE_SIZE ) : + deque(sz) + { + } + + Object _FAR & peekLeft() const + { + return ptrToRef(deque.peekLeft()); + } + + Object _FAR & peekRight() const + { + return ptrToRef(deque.peekRight()); + } + + Object _FAR & getLeft() + { + return ptrToRef(deque.getLeft()); + } + + Object _FAR & getRight() + { + return ptrToRef(deque.getRight()); + } + + void putLeft( Object _FAR & o ) + { + deque.putLeft( &o ); + } + + void putRight( Object _FAR & o ) + { + deque.putRight( &o ); + } + + virtual void flush( DeleteType dt = DefDelete ) + { + deque.flush(dt); + } + + virtual int isEmpty() const + { + return deque.isEmpty(); + } + + virtual countType getItemsInContainer() const + { + return deque.getItemsInContainer(); + } + + void forEach( void (_FAR*f)(Object _FAR &, void _FAR*), void _FAR*args ) + { + deque.forEach( f, args ); + } + + Object _FAR & firstThat( int (_FAR *f)(const Object _FAR &, void _FAR *), + void _FAR *args + ) const + { + return ptrToRef(deque.firstThat( f, args )); + } + + Object _FAR & lastThat( int ( _FAR *f)(const Object _FAR &, void _FAR *), + void _FAR *args + ) const + { + return ptrToRef(deque.lastThat( f, args )); + } + + virtual ContainerIterator _FAR & initIterator() const; + + virtual classType isA() const + { + return dequeClass; + } + + virtual char _FAR *nameOf() const + { + return "BI_TCDequeAsVector"; + } + +protected: + + BI_ODequeAsVector deque; + +}; + +class _CLASSTYPE BI_TCDequeAsVectorIterator : public ContainerIterator +{ + +public: + + BI_TCDequeAsVectorIterator( const BI_TCDequeAsVector _FAR &d ) : + iter(d.deque) + { + } + + virtual operator int() + { + return int(iter); + } + + virtual Object _FAR & current() + { + return Object::ptrToRef(iter.current()); + } + + virtual Object _FAR & operator ++ ( int ) + { + return Object::ptrToRef(iter++); + } + + virtual Object _FAR & operator ++ () + { + return Object::ptrToRef(++iter); + } + + virtual void restart() + { + iter.restart(); + } + +private: + + BI_ODequeAsVectorIterator iter; + +}; + +inline ContainerIterator _FAR & BI_TCDequeAsVector::initIterator() const +{ + return *new BI_TCDequeAsVectorIterator( *this ); +} + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_DequeAsDoubleListImp */ +/* */ +/* Implements the fundamental dequeue operations, using a list */ +/* as the underlying implementation. The type Lst specifies the */ +/* form of the list, either a BI_DoubleListImp or a */ +/* BI_IDoubleListImp. The type T specifies the type of the */ +/* objects to be put in the deque. When using BI_ListImp, */ +/* T should be the same as T0. When using BI_IListImp, T */ +/* should be of type pointer to T0. See BI_DequeAsList and */ +/* BI_IDequeAsList for examples. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_DequeAsDoubleListImp +{ + +public: + + BI_DequeAsDoubleListImp() : + itemsInContainer( 0 ) + { + } + + T peekLeft() const + { + PRECONDITION( !isEmpty() ); + return data.peekTail(); + } + + T peekRight() const + { + PRECONDITION( !isEmpty() ); + return data.peekHead(); + } + + T getLeft() + { + PRECONDITION( !isEmpty() ); + T t = peekLeft(); + data.detach( t, 0 ); + itemsInContainer--; + return t; + } + + T getRight() + { + PRECONDITION( !isEmpty() ); + T t = peekRight(); + data.detach( t, 0 ); + itemsInContainer--; + return t; + } + + void putLeft( T t ) + { + data.addAtTail( t ); + itemsInContainer++; + } + + void putRight( T t ) + { + data.add( t ); + itemsInContainer++; + } + + void flush( int del ) + { + data.flush( del ); + itemsInContainer = 0; + } + + int isFull() const + { + return 0; + } + + int isEmpty() const + { + return itemsInContainer == 0; + } + + int getItemsInContainer() const + { + return itemsInContainer; + } + +protected: + + Lst data; + int itemsInContainer; + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_DequeAsDoubleList */ +/* */ +/* Implements a dequeue of objects of type T, using a double-linked list */ +/* as the underlying implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_DequeAsDoubleList : + public BI_DequeAsDoubleListImp,T> +{ + +public: + + friend class _CLASSTYPE BI_DequeAsDoubleListIterator; + + void forEach( void (_FAR *f)(T _FAR &, void _FAR *), void _FAR *args ) + { + data.forEach( f, args ); + } + + T _FAR *firstThat( int (_FAR *f)(const T _FAR &, void _FAR *), + void _FAR *args + ) const + { + return data.firstThat( f, args ); + } + + T _FAR *lastThat( int (_FAR *f)(const T _FAR &, void _FAR *), + void _FAR *args + ) const + { + return data.lastThat( f, args ); + } + +}; + +template class _CLASSTYPE BI_DequeAsDoubleListIterator : + public BI_DoubleListIteratorImp +{ + +public: + + BI_DequeAsDoubleListIterator( const BI_DequeAsDoubleList _FAR & s ) : + BI_DoubleListIteratorImp(s.data) + { + } + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_IDequeAsDoubleList */ +/* */ +/* Implements a dequeue of pointers to objects of type T, */ +/* using a double-linked list as the underlying implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +template +class _CLASSTYPE BI_IDequeAsDoubleList : + public BI_DequeAsDoubleListImp,T _FAR *>, + public virtual TShouldDelete +{ + +public: + + + friend class _CLASSTYPE BI_IDequeAsDoubleListIterator; + + T _FAR *peekLeft() const + { + PRECONDITION( !isEmpty() ); + return (T _FAR *)BI_DequeAsDoubleListImp,T _FAR *>::peekLeft(); + } + + T _FAR *peekRight() const + { + PRECONDITION( !isEmpty() ); + return (T _FAR *)BI_DequeAsDoubleListImp,T _FAR *>::peekRight(); + } + + T _FAR *getLeft() + { + return (T _FAR *)BI_DequeAsDoubleListImp,T _FAR *>::getLeft(); + } + + T _FAR *getRight() + { + return (T _FAR *)BI_DequeAsDoubleListImp,T _FAR *>::getRight(); + } + + void putLeft( T _FAR *t ) + { + BI_DequeAsDoubleListImp,T _FAR *>::putLeft( t ); + } + + void putRight( T _FAR *t ) + { + BI_DequeAsDoubleListImp,T _FAR *>::putRight( t ); + } + + void flush( TShouldDelete::DeleteType dt = TShouldDelete::DefDelete ) + { + BI_DequeAsDoubleListImp,T _FAR *>::flush( delObj(dt) ); + } + + void forEach( void (_FAR *f)(T _FAR &, void _FAR *), void _FAR *args ) + { + data.forEach( f, args ); + } + + T _FAR *firstThat( int (_FAR *f)(const T _FAR &, void _FAR *), + void _FAR *args + ) const + { + return data.firstThat( f, args ); + } + + T _FAR *lastThat( int (_FAR *f)(const T _FAR &, void _FAR *), + void _FAR *args + ) const + { + return data.lastThat( f, args ); + } + +}; + +template class _CLASSTYPE BI_IDequeAsDoubleListIterator : + public BI_IDoubleListIteratorImp +{ + +public: + + BI_IDequeAsDoubleListIterator( const BI_IDequeAsDoubleList _FAR& s ) : + BI_IDoubleListIteratorImp(s.data) + { + } + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* class BI_ODequeAsDoubleList */ +/* */ +/* Implements a dequeue of pointers to Object, */ +/* using a double-linked list as the underlying implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +class _CLASSTYPE BI_ODequeAsDoubleList +{ + +public: + + friend class _CLASSTYPE BI_ODequeAsDoubleListIterator; + + ~BI_ODequeAsDoubleList() + { + flush(); + } + + Object _FAR *peekLeft() const + { + return odeque.peekLeft(); + } + + Object _FAR *peekRight() const + { + return odeque.peekRight(); + } + + Object _FAR *getLeft() + { + return odeque.getLeft(); + } + + Object _FAR *getRight() + { + return odeque.getRight(); + } + + void putLeft( Object _FAR *o ) + { + odeque.putLeft( o ); + } + + void putRight( Object _FAR *o ) + { + odeque.putRight( o ); + } + + void flush( TShouldDelete::DeleteType dt = TShouldDelete::DefDelete ) + { + odeque.flush( dt ); + } + + int isFull() const + { + return odeque.isFull(); + } + + int isEmpty() const + { + return odeque.isEmpty(); + } + + void forEach( void (_FAR*f)(Object _FAR &, void _FAR*), void _FAR*args ) + { + odeque.forEach( f, args ); + } + + Object _FAR *firstThat( int (_FAR *f)(const Object _FAR &, void _FAR *), + void _FAR *args + ) const + { + return odeque.firstThat( f, args ); + } + + Object _FAR *lastThat( int (_FAR *f)(const Object _FAR &, void _FAR *), + void _FAR *args + ) const + { + return odeque.lastThat( f, args ); + } + + int getItemsInContainer() const { return odeque.getItemsInContainer(); } + +protected: + + BI_IDequeAsDoubleList odeque; + +}; + +class _CLASSTYPE BI_ODequeAsDoubleListIterator : + public BI_IDequeAsDoubleListIterator +{ + +public: + + BI_ODequeAsDoubleListIterator( const BI_ODequeAsDoubleList _FAR &d ) : + BI_IDequeAsDoubleListIterator(d.odeque) {} + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* class BI_TCDequeAsDoubleList */ +/* */ +/* Implements an Object dequeue, with the full semantics of */ +/* the BC 2.0 style stack, using a double-linked list as the underlying */ +/* implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +class _CLASSTYPE BI_TCDequeAsDoubleList : public Container +{ + +public: + + friend class _CLASSTYPE BI_TCDequeAsDoubleListIterator; + + Object _FAR & peekLeft() const + { + return ptrToRef(deque.peekLeft()); + } + + Object _FAR & peekRight() const + { + return ptrToRef(deque.peekRight()); + } + + Object _FAR & getLeft() + { + return ptrToRef(deque.getLeft()); + } + + Object _FAR & getRight() + { + return ptrToRef(deque.getRight()); + } + + void putLeft( Object _FAR & o ) + { + deque.putLeft( &o ); + } + + void putRight( Object _FAR & o ) + { + deque.putRight( &o ); + } + + virtual void flush( DeleteType dt = DefDelete ) + { + deque.flush( dt ); + } + + virtual int isEmpty() const + { + return deque.isEmpty(); + } + + virtual countType getItemsInContainer() const + { + return deque.getItemsInContainer(); + } + + void forEach( void (_FAR*f)(Object _FAR &, void _FAR*), void _FAR*args ) + { + deque.forEach( f, args ); + } + + Object _FAR & firstThat( int (_FAR *f)(const Object _FAR &, void _FAR *), + void _FAR *args + ) const + { + return ptrToRef(deque.firstThat( f, args )); + } + + Object _FAR & lastThat( int (_FAR *f)(const Object _FAR &, void _FAR *), + void _FAR *args + ) const + { + return ptrToRef(deque.lastThat( f, args )); + } + + virtual ContainerIterator _FAR & initIterator() const; + + virtual classType isA() const + { + return dequeClass; + } + + virtual char _FAR *nameOf() const + { + return "BI_DequeAsDoubleList"; + } + +protected: + + BI_ODequeAsDoubleList deque; + +}; + +class _CLASSTYPE BI_TCDequeAsDoubleListIterator : public ContainerIterator +{ + +public: + + BI_TCDequeAsDoubleListIterator( const BI_TCDequeAsDoubleList _FAR &o ) : + iter(o.deque) + { + } + + virtual operator int() + { + return int(iter); + } + + virtual Object _FAR & current() + { + return Object::ptrToRef(iter.current()); + } + + virtual Object _FAR & operator ++ ( int ) + { + return Object::ptrToRef(iter++); + } + + virtual Object _FAR & operator ++ () + { + return Object::ptrToRef(++iter); + } + + virtual void restart() + { + iter.restart(); + } + +private: + + BI_ODequeAsDoubleListIterator iter; + +}; + +inline ContainerIterator _FAR & BI_TCDequeAsDoubleList::initIterator() const +{ + return *new BI_TCDequeAsDoubleListIterator( *this ); +} + +#endif // __DEQUES_H + diff --git a/M/TC/CLASSLIB/INCLUDE/DICT.H b/M/TC/CLASSLIB/INCLUDE/DICT.H new file mode 100644 index 0000000..d79d01d --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/DICT.H @@ -0,0 +1,58 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* DICT.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __DICT_H ) +#define __DICT_H + +#if !defined( __CLSTYPES_H ) +#include +#endif // __CLSTYPES_H + +#if !defined( __OBJECT_H ) +#include +#endif // __OBJECT_H + +#if !defined( __SET_H ) +#include +#endif // __SET_H + +#if !defined( __STDLIB_H ) +#include +#endif + +_CLASSDEF(Association) +_CLASSDEF(Dictionary) + +class _CLASSTYPE Dictionary : public Set +{ + +public: + + Dictionary( unsigned sz = DEFAULT_HASH_TABLE_SIZE ) : + Set(sz) + { + } + + virtual void add( Object _FAR & ); + Association _FAR & lookup( const Object _FAR & ) const; + + virtual classType isA() const + { + return dictionaryClass; + } + + virtual char _FAR *nameOf() const + { + return "Dictionary"; + } + +}; + +#endif // __DICT_H + diff --git a/M/TC/CLASSLIB/INCLUDE/DLISTIMP.H b/M/TC/CLASSLIB/INCLUDE/DLISTIMP.H new file mode 100644 index 0000000..03a19eb --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/DLISTIMP.H @@ -0,0 +1,598 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* DLISTIMP.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __DLISTIMP_H ) +#define __DLISTIMP_H + +#if !defined( __MEMMGR_H ) +#include +#endif // __MEMMGR_H + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_DoubleListElement */ +/* */ +/* Node for templates BI_DoubleListImp and BI_IDoubleListImp */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_DoubleListImp; + +template class _CLASSTYPE BI_DoubleListBlockInitializer +{ + +protected: + + BI_DoubleListBlockInitializer() + { + PRECONDITION( count != UINT_MAX ); + if( count++ == 0 ) + BI_DoubleListElement::mgr = + new MemBlocks( sizeof(BI_DoubleListElement), 20 ); + } + + ~BI_DoubleListBlockInitializer() + { + PRECONDITION( count != 0 ); + if( --count == 0 ) + { + delete BI_DoubleListElement::mgr; + BI_DoubleListElement::mgr = 0; + } + } + + static unsigned count; + +}; + +template unsigned BI_DoubleListBlockInitializer::count = 0; + +template class _CLASSTYPE BI_DoubleListElement +{ + +public: + + BI_DoubleListElement( T t, BI_DoubleListElement _FAR *p ) : + data(t) + { + next = p->next; + prev = p; + p->next = this; + next->prev = this; + } + + BI_DoubleListElement(); + + BI_DoubleListElement _FAR *next; + BI_DoubleListElement _FAR *prev; + T data; + + void _FAR *operator new( size_t sz ); + void operator delete( void _FAR * ); + +private: + + friend class BI_DoubleListBlockInitializer; + + static MemBlocks _FAR *mgr; + +}; + +template MemBlocks _FAR *BI_DoubleListElement::mgr = 0; + +template inline BI_DoubleListElement::BI_DoubleListElement() +{ + next = prev = 0; +} + +template +void _FAR *BI_DoubleListElement::operator new( size_t sz ) +{ + PRECONDITION( mgr != 0 ); + return mgr->allocate( sz ); +} + +template +void BI_DoubleListElement::operator delete( void _FAR *b ) +{ + PRECONDITION( mgr != 0 ); + mgr->free( b ); +} + +inline BI_DoubleListElement::BI_DoubleListElement() +{ + next = prev = 0; + data = 0; +} + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_DoubleListImp */ +/* */ +/* Implements a double-linked list of objects of type T. Assumes that */ +/* T has meaningful copy semantics and a default constructor. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_DoubleListIteratorImp; + +template class _CLASSTYPE BI_DoubleListImp : + private BI_DoubleListBlockInitializer +{ + +public: + + friend class BI_DoubleListIteratorImp; + + BI_DoubleListImp() + { + initList(); + } + + ~BI_DoubleListImp() + { + flush(); + } + + T peekHead() const + { + return head.next->data; + } + + T peekTail() const + { + return tail.prev->data; + } + + void add( T ); + void addAtTail( T ); + void detach( T, int = 0 ); + void flush( int = 0 ); + + int isEmpty() const + { + return head.next == &tail; + } + + void forEach( void (_FAR *)(T _FAR &, void _FAR *), void _FAR * ); + T _FAR *firstThat( int (_FAR *)(const T _FAR &, void _FAR *), + void _FAR * + ) const; + T _FAR *lastThat( int (_FAR *)(const T _FAR &, void _FAR *), + void _FAR * + ) const; + +protected: + + BI_DoubleListElement head, tail; + + virtual BI_DoubleListElement _FAR *findDetach( T t ) + { + return findPred(t); + } + + virtual BI_DoubleListElement _FAR *findPred( T ); + +private: + + virtual void removeData( BI_DoubleListElement _FAR * ) + { + } + + void initList(); + +}; + +template void BI_DoubleListImp::initList() +{ + head.next = &tail; + head.prev = &head; + tail.prev = &head; + tail.next = &tail; +} + +template void BI_DoubleListImp::add( T toAdd ) +{ + new BI_DoubleListElement( toAdd, &head ); +} + +template +BI_DoubleListElement _FAR *BI_DoubleListImp::findPred( T t ) +{ + tail.data = t; + BI_DoubleListElement _FAR *cursor = &head; + while( t != cursor->next->data ) + cursor = cursor->next; + return cursor; +} + +template void BI_DoubleListImp::addAtTail( T toAdd ) +{ + new BI_DoubleListElement( toAdd, tail.prev ); +} + +template void BI_DoubleListImp::detach( T toDetach, int del ) +{ + BI_DoubleListElement _FAR *pred = findDetach( toDetach ); + BI_DoubleListElement _FAR *item = pred->next; + if( item != &tail ) + { + pred->next = pred->next->next; + pred->next->prev = pred; + if( del != 0 ) + removeData( item ); + delete item; + } +} + +template void BI_DoubleListImp::flush( int del ) +{ + BI_DoubleListElement _FAR *current = head.next; + while( current != &tail ) + { + BI_DoubleListElement _FAR *temp = current; + current = current->next; + if( del != 0 ) + removeData( temp ); + delete temp; + } + initList(); +} + +template +void BI_DoubleListImp::forEach( void (_FAR *f)(T _FAR &, void _FAR *), + void _FAR *args + ) +{ + BI_DoubleListElement _FAR *cur = head.next; + while( cur->next != cur ) + { + f( cur->data, args ); + cur = cur->next; + } +} + +template +T _FAR *BI_DoubleListImp::firstThat( int (_FAR *cond)(const T _FAR &, void _FAR *), + void _FAR *args + ) const +{ + BI_DoubleListElement _FAR *cur = head.next; + while( cur->next != cur ) + if( cond( cur->data, args ) != 0 ) + return &(cur->data); + else + cur = cur->next; + return 0; +} + +template +T _FAR *BI_DoubleListImp::lastThat( int (_FAR *cond)(const T _FAR &, void _FAR *), + void _FAR *args + ) const +{ + T _FAR *res = 0; + BI_DoubleListElement _FAR *cur = head.next; + while( cur->next != cur ) + { + if( cond( cur->data, args ) != 0 ) + res = &(cur->data); + cur = cur->next; + } + return res; +} + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_SDoubleListImp */ +/* */ +/* Implements a sorted double-linked list of objects of type T. */ +/* Assumes that T has meaningful copy semantics, a meaningful */ +/* < operator, and a default constructor. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_SDoubleListImp : + public BI_DoubleListImp +{ + +public: + + void add( T ); + +protected: + + virtual BI_DoubleListElement _FAR *findDetach( T ); + virtual BI_DoubleListElement _FAR *findPred( T ); + +}; + +template void BI_SDoubleListImp::add( T t ) +{ + new BI_DoubleListElement( t, findPred(t) ); +} + +template +BI_DoubleListElement _FAR *BI_SDoubleListImp::findDetach( T t ) +{ + BI_DoubleListElement _FAR *res = findPred(t); + if( res->next->data == t ) + return res; + else + return &tail; +} + +template +BI_DoubleListElement _FAR *BI_SDoubleListImp::findPred( T t ) +{ + tail.data = t; + BI_DoubleListElement _FAR *cursor = &head; + while( cursor->next->data < t ) + cursor = cursor->next; + return cursor; +} + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_DoubleListIteratorImp */ +/* */ +/* Implements a double list iterator. This iterator works with any */ +/* direct double list. For indirect lists, see */ +/* BI_IDoubleListIteratorImp. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_DoubleListIteratorImp +{ + +public: + + BI_DoubleListIteratorImp( const BI_DoubleListImp _FAR &l ) + { + list = &l; + cur = list->head.next; + } + + + operator int() + { + return cur != &(list->tail); + } + + T current() + { + return cur->data; + } + + T operator ++ ( int ) + { + BI_DoubleListElement _FAR *temp = cur; + cur = cur->next; + return temp->data; + } + + T operator ++ () + { + cur = cur->next; + return cur->data; + } + + void restart() + { + cur = list->head.next; + } + + +private: + + const BI_DoubleListImp _FAR *list; + BI_DoubleListElement _FAR *cur; + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_InternalIDoubleListImp */ +/* */ +/* Implements a double-linked list of pointers to objects of type T. */ +/* This is implemented through the form of BI_DoubleListImp specified by */ +/* List. Since pointers always have meaningful copy semantics, */ +/* this class can handle any type of object. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_InternalIDoubleListImp : + public List +{ + +public: + + T _FAR *peekHead() const { return (T _FAR *)head.next->data; } + T _FAR *peekTail() const { return (T _FAR *)tail.prev->data; } + + void add( T _FAR *t ) { List::add( t ); } + void addAtTail( T _FAR *t ) { List::addAtTail( t ); } + void detach( T _FAR *t, int del = 0 ) { List::detach( t, del ); } + + void forEach( void (_FAR *)(T _FAR &, void _FAR *), void _FAR * ); + T _FAR *firstThat( int (_FAR *)(const T _FAR &, void _FAR *), + void _FAR * + ) const; + T _FAR *lastThat( int (_FAR *)(const T _FAR &, void _FAR *), + void _FAR * + ) const; + +protected: + + virtual BI_DoubleListElement _FAR*findPred( void _FAR* ) = 0; + +private: + + virtual void removeData( BI_DoubleListElement _FAR *block ) + { + delete (T _FAR *)(block->data); + } + +}; + +template +void BI_InternalIDoubleListImp::forEach( void (_FAR *f)(T _FAR &, void _FAR *), + void _FAR *args + ) +{ + BI_DoubleListElement _FAR *cur = head.next; + while( cur->next != cur ) + { + f( *(T _FAR *)cur->data, args ); + cur = cur->next; + } +} + +template +T _FAR *BI_InternalIDoubleListImp::firstThat( int (_FAR *cond)(const T _FAR &, void _FAR *), + void _FAR *args + ) const +{ + BI_DoubleListElement _FAR *cur = head.next; + while( cur->next != cur ) + if( cond( *(T _FAR *)(cur->data), args ) != 0 ) + return (T _FAR *)cur->data; + else + cur = cur->next; + return 0; +} + +template +T _FAR *BI_InternalIDoubleListImp::lastThat( int (_FAR *cond)(const T _FAR &, void _FAR *), + void _FAR *args + ) const +{ + T _FAR *res = 0; + BI_DoubleListElement _FAR *cur = head.next; + while( cur->next != cur ) + { + if( cond( *(T _FAR *)(cur->data), args ) != 0 ) + res = (T _FAR *)(cur->data); + cur = cur->next; + } + return res; +} + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_IDoubleListImp */ +/* */ +/* Implements a double-linked list of pointers to objects of */ +/* type T. This is implemented through the template */ +/* BI_InternalIDoubleListImp. Since pointers always have meaningful */ +/* copy semantics, this class can handle any type of object. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_IDoubleListImp : + public BI_InternalIDoubleListImp > +{ + +protected: + + virtual BI_DoubleListElement _FAR *findPred( void _FAR * ); + +}; + +template +BI_DoubleListElement _FAR *BI_IDoubleListImp::findPred( void _FAR *t ) +{ + tail.data = t; + BI_DoubleListElement _FAR *cursor = &head; + while( !(*(T _FAR *)t == *(T _FAR *)(cursor->next->data)) ) + cursor = cursor->next; + return cursor; +} + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_ISDoubleListImp */ +/* */ +/* Implements a sorted double-linked list of pointers to objects of */ +/* type T. This is implemented through the template */ +/* BI_InternalIDoubleListImp. Since pointers always have meaningful */ +/* copy semantics, this class can handle any type of object. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_ISDoubleListImp : + public BI_InternalIDoubleListImp > +{ + +protected: + + virtual BI_DoubleListElement _FAR *findDetach( void _FAR * ); + virtual BI_DoubleListElement _FAR *findPred( void _FAR * ); + +}; + +template +BI_DoubleListElement _FAR *BI_ISDoubleListImp::findDetach( void _FAR *t ) +{ + BI_DoubleListElement _FAR *res = findPred(t); + if( *(T _FAR *)(res->next->data) == *(T _FAR *)t ) + return res; + else + return &tail; +} + +template +BI_DoubleListElement _FAR *BI_ISDoubleListImp::findPred( void _FAR *t ) +{ + tail.data = t; + BI_DoubleListElement _FAR *cursor = &head; + while( *(T _FAR *)(cursor->next->data) < *(T _FAR *)t ) + cursor = cursor->next; + return cursor; +} + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_IDoubleListIteratorImp */ +/* */ +/* Implements a double list iterator. This iterator works with any */ +/* indirect double list. For direct lists, see BI_DoubleListIteratorImp.*/ +/* */ +/*------------------------------------------------------------------------*/ + +template +class _CLASSTYPE BI_IDoubleListIteratorImp : + public BI_DoubleListIteratorImp +{ + +public: + + BI_IDoubleListIteratorImp( const BI_DoubleListImp _FAR &l ) : + BI_DoubleListIteratorImp(l) {} + + T _FAR *current() + { + return (T _FAR *)BI_DoubleListIteratorImp::current(); + } + + T _FAR *operator ++ (int) + { + return (T _FAR *)BI_DoubleListIteratorImp::operator ++ (1); + } + + T _FAR *operator ++ () + { + return (T _FAR *)BI_DoubleListIteratorImp::operator ++ (); + } + + +}; + +#endif // __DLISTIMP_H + diff --git a/M/TC/CLASSLIB/INCLUDE/HASHTBL.H b/M/TC/CLASSLIB/INCLUDE/HASHTBL.H new file mode 100644 index 0000000..8fbea78 --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/HASHTBL.H @@ -0,0 +1,123 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* HASHTBL.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __HASHTBL_H ) +#define __HASHTBL_H + +#if !defined( __RESOURCE_H ) +#include +#endif // __RESOURCE_H + +#if !defined( __CLSTYPES_H ) +#include +#endif // __CLSTYPES_H + +#if !defined( __CLSDEFS_H ) +#include +#endif // __CLSDEFS_H + +#if !defined( __COLLECT_H ) +#include +#endif // __COLLECT_H + +#if !defined( __LIST_H ) +#include +#endif // __LIST_H + +#if !defined( __VECTIMP_H ) +#include +#endif // __VECTIMP_H + +_CLASSDEF(ContainerIterator) +_CLASSDEF(HashTable) +_CLASSDEF(HashTableIterator) + +class _CLASSTYPE HashTable : public Collection +{ + +public: + + friend class HashTableIterator; + + HashTable( sizeType = DEFAULT_HASH_TABLE_SIZE ); + virtual ~HashTable() { flush(); } + + virtual void add( Object _FAR & ); + virtual void detach( Object _FAR &, DeleteType = NoDelete ); + virtual void flush( DeleteType = DefDelete ); + + virtual int isEmpty() const + { + return itemsInContainer == 0; + } + + virtual countType getItemsInContainer() const + { + return itemsInContainer; + } + + virtual Object _FAR & findMember( Object _FAR & ) const; + + virtual ContainerIterator& initIterator() const; + + virtual classType isA() const + { + return hashTableClass; + } + + virtual char _FAR *nameOf() const + { + return "HashTable"; + } + +private: + + hashValueType getHashValue( Object _FAR & ) const; + sizeType size; + BI_IVectorImp table; + + unsigned itemsInContainer; + + DeleteType delItem( DeleteType dt ) + { + return delObj(dt) ? Delete : NoDelete; + } + +}; + +inline sizeType HashTable::getHashValue( Object _FAR & ofObject ) const +{ + return ofObject.hashValue() % size; +} + +class _CLASSTYPE HashTableIterator : public ContainerIterator +{ + +public: + + HashTableIterator( const HashTable _FAR & ); + ~HashTableIterator(); + + virtual operator int(); + virtual Object _FAR & current(); + virtual Object _FAR & operator ++ ( int ); + virtual Object _FAR & operator ++ (); + virtual void restart(); + +private: + + BI_IVectorIteratorImp _FAR *arrayIterator; + ContainerIterator _FAR *listIterator; + const HashTable _FAR & beingIterated; + + void scan(); +}; + +#endif // __HASHTBL_H + diff --git a/M/TC/CLASSLIB/INCLUDE/LDATE.H b/M/TC/CLASSLIB/INCLUDE/LDATE.H new file mode 100644 index 0000000..8cacbf8 --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/LDATE.H @@ -0,0 +1,149 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* LDATE.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __LDATE_H ) +#define __LDATE_H + +#if !defined( __CHECKS_H ) +#include +#endif // __CHECKS_H + +#if !defined( __DOS_H ) +#include +#endif // __DOS_H + +#if !defined( __SORTABLE_H ) +#include +#endif // __SORTABLE_H + +_CLASSDEF(ostream) +_CLASSDEF(BaseDate) +_CLASSDEF(Date) + +class _CLASSTYPE BaseDate : public Sortable +{ + +public: + + unsigned Month() const; + unsigned Day() const; + unsigned Year() const; + void SetMonth( unsigned char ); + void SetDay( unsigned char ); + void SetYear( unsigned ); + + virtual hashValueType hashValue() const; + virtual int isEqual( const Object _FAR & ) const; + virtual int isLessThan( const Object _FAR & ) const; + virtual void printOn( ostream _FAR & ) const = 0; + +protected: + + BaseDate(); + BaseDate( unsigned char, unsigned char, unsigned ); + BaseDate( const BaseDate _FAR & ); + +private: + + unsigned char MM; + unsigned char DD; + unsigned int YY; + +}; + +inline BaseDate::BaseDate() +{ + struct date d; + getdate( &d ); + MM = d.da_mon; + DD = d.da_day; + YY = d.da_year; +} + +inline BaseDate::BaseDate( unsigned char M, unsigned char D, unsigned Y ) +{ + SetMonth( M ); + SetDay( D ); + SetYear( Y ); +} + +inline BaseDate::BaseDate( const BaseDate _FAR & B ) : + MM(B.MM), DD(B.DD), YY(B.YY) +{ +} + +inline unsigned BaseDate::Month() const +{ + return MM; +} + +inline unsigned BaseDate::Day() const +{ + return DD; +} + +inline unsigned BaseDate::Year() const +{ + return YY; +} + +inline void BaseDate::SetMonth( unsigned char M ) +{ + PRECONDITION( M > 0 && M < 13 ); + MM = M; +} + +inline void BaseDate::SetDay( unsigned char D ) +{ + PRECONDITION( D < 32 ); + DD = D; +} + +inline void BaseDate::SetYear( unsigned Y ) +{ + YY = Y; +} + +class _CLASSTYPE Date : public BaseDate +{ + +public: + + Date(); + Date( unsigned char, unsigned char, unsigned ); + Date( const Date _FAR & ); + + virtual classType isA() const + { + return dateClass; + } + + virtual char _FAR *nameOf() const + { + return "Date"; + } + + virtual void printOn( ostream _FAR & ) const; + +}; + +inline Date::Date() +{ +} + +inline Date::Date( unsigned char M, unsigned char D, unsigned Y ) : + BaseDate( M, D, Y ) +{ +} + +inline Date::Date( const Date& D ) : BaseDate( D ) +{ +} + +#endif // __LDATE_H diff --git a/M/TC/CLASSLIB/INCLUDE/LIST.H b/M/TC/CLASSLIB/INCLUDE/LIST.H new file mode 100644 index 0000000..94cde1e --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/LIST.H @@ -0,0 +1,180 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* LIST.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __LIST_H ) +#define __LIST_H + +#if !defined( __MEMMGR_H ) +#include +#endif // __MEMMGR_H + +#if !defined( __COLLECT_H ) +#include +#endif // __COLLECT_H + +_CLASSDEF(List) +_CLASSDEF(ListIterator) + +class _CLASSTYPE ListBlockInitializer +{ + +protected: + + ListBlockInitializer(); + ~ListBlockInitializer(); + + static unsigned count; + +}; + +class _CLASSTYPE List : public Collection, private ListBlockInitializer +{ + +public: + + List() : + headEntry( 0, &tailEntry ), + tailEntry( 0, &tailEntry ), + head(&headEntry), + tail(&tailEntry), + itemsInContainer(0) + { + } + + virtual ~List() + { + flush(); + } + + Object _FAR & peekHead() const + { + return ptrToRef(head->next->data); + } + + void add( Object _FAR & ); + virtual void detach( Object _FAR &, DeleteType = NoDelete ); + virtual void flush( DeleteType = DefDelete ); + + virtual int isEmpty() const + { + return itemsInContainer == 0; + } + + virtual countType getItemsInContainer() const + { + return itemsInContainer; + } + + virtual ContainerIterator _FAR & initIterator() const; + + virtual classType isA() const + { + return listClass; + } + + virtual char _FAR *nameOf() const + { + return "List"; + } + +private: + + class _CLASSTYPE ListElement + { + + public: + + ListElement( Object _FAR *o, ListElement _FAR *n = 0 ) + { + data = o; next = n; + } + + private: + + ListElement _FAR *next; + Object _FAR *data; + + void *operator new( size_t sz ) + { + PRECONDITION( mgr != 0 ); + return mgr->allocate( sz ); + } + void operator delete( void *b ) + { + PRECONDITION( mgr != 0 ); + mgr->free( b ); + } + + static MemBlocks *mgr; + + friend class List; + friend class ListIterator; + friend class ListBlockInitializer; + + }; + + ListElement _FAR *head; + ListElement _FAR *tail; + + ListElement headEntry, tailEntry; + + unsigned itemsInContainer; + + ListElement _FAR *findPred( const Object _FAR & o ); + + friend class ListIterator; + friend class ListBlockInitializer; + +}; + +inline ListBlockInitializer::ListBlockInitializer() +{ + PRECONDITION( count != UINT_MAX ); + if( count++ == 0 ) + List::ListElement::mgr = + new MemBlocks( sizeof(List::ListElement), 20 ); +} + +inline ListBlockInitializer::~ListBlockInitializer() +{ + PRECONDITION( count != 0 ); + if( --count == 0 ) + { + delete List::ListElement::mgr; + List::ListElement::mgr = 0; + } +} + +class _CLASSTYPE ListIterator : public ContainerIterator +{ + +public: + + ListIterator( const List _FAR & ); + virtual ~ListIterator(); + + virtual operator int(); + virtual Object _FAR & current(); + virtual Object _FAR & operator ++ ( int ); + virtual Object _FAR & operator ++ (); + virtual void restart(); + +private: + + List::ListElement _FAR *currentElement; + List::ListElement _FAR *startingElement; +}; + +inline ListIterator::ListIterator( const List _FAR & toIterate ) +{ + startingElement = currentElement = toIterate.head->next; +} + +#endif // __LIST_H + diff --git a/M/TC/CLASSLIB/INCLUDE/LISTIMP.H b/M/TC/CLASSLIB/INCLUDE/LISTIMP.H new file mode 100644 index 0000000..fcb3e4c --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/LISTIMP.H @@ -0,0 +1,581 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* LISTIMP.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __LISTIMP_H ) +#define __LISTIMP_H + +#if !defined( ___DEFS_H ) +#include <_defs.h> +#endif // ___DEFS_H + +#if !defined( __MEMMGR_H ) +#include +#endif // __MEMMGR_H + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_ListElement */ +/* */ +/* Node for templates BI_ListImp and BI_IListImp */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_ListImp; + +template class _CLASSTYPE BI_ListBlockInitializer +{ + +protected: + + BI_ListBlockInitializer() + { + PRECONDITION( count != UINT_MAX ); + if( count++ == 0 ) + BI_ListElement::mgr = + new MemBlocks( sizeof(BI_ListElement), 20 ); + } + + ~BI_ListBlockInitializer() + { + PRECONDITION( count != 0 ); + if( --count == 0 ) + { + delete BI_ListElement::mgr; + BI_ListElement::mgr = 0; + } + } + + static unsigned count; + +}; + +template unsigned BI_ListBlockInitializer::count = 0; + +template class _CLASSTYPE BI_ListElement +{ + +public: + + BI_ListElement( T t, BI_ListElement _FAR *p ) : + data(t) + { + next = p->next; + p->next = this; + } + + BI_ListElement(); + + BI_ListElement _FAR *next; + T data; + + void _FAR *operator new( size_t sz ); + void operator delete( void _FAR * ); + +private: + + friend class BI_ListBlockInitializer; + + static MemBlocks *mgr; + +}; + +template MemBlocks *BI_ListElement::mgr = 0; + +template inline BI_ListElement::BI_ListElement() +{ + next = 0; +} + +template void _FAR *BI_ListElement::operator new( size_t sz ) +{ + PRECONDITION( mgr != 0 ); + return mgr->allocate( sz ); +} + +template void BI_ListElement::operator delete( void _FAR *b ) +{ + PRECONDITION( mgr != 0 ); + mgr->free( b ); +} + +inline BI_ListElement::BI_ListElement() +{ + next = 0; + data = 0; +} + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_ListImp */ +/* */ +/* Implements a list of objects of type T. Assumes that */ +/* T has meaningful copy semantics and a default constructor. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_ListIteratorImp; + +template class _CLASSTYPE BI_ListImp : + private BI_ListBlockInitializer +{ + +public: + + friend class BI_ListIteratorImp; + + BI_ListImp() + { + initList(); + } + + ~BI_ListImp() + { + flush(); + } + + T peekHead() const + { + return head.next->data; + } + + void add( T ); + void detach( T, int = 0 ); + void flush( int del = 0 ); + + int isEmpty() const + { + return head.next == &tail; + } + + void forEach( void (_FAR *)(T _FAR &, void _FAR *), void _FAR * ); + T _FAR *firstThat( int (_FAR *)(const T _FAR &, void _FAR *), + void _FAR * + ) const; + T _FAR *lastThat( int (_FAR *)(const T _FAR &, void _FAR *), + void _FAR * + ) const; + +protected: + + BI_ListElement head, tail; + + virtual BI_ListElement _FAR *findDetach( T t ) + { + return findPred(t); + } + + virtual BI_ListElement _FAR *findPred( T ); + +private: + + virtual void removeData( BI_ListElement _FAR * ) + { + } + + void initList(); + +}; + +template void BI_ListImp::initList() +{ + head.next = &tail; + tail.next = &tail; +} + +template void BI_ListImp::add( T toAdd ) +{ + new BI_ListElement( toAdd, &head ); +} + +template BI_ListElement _FAR *BI_ListImp::findPred( T t ) +{ + tail.data = t; + BI_ListElement _FAR *cursor = &head; + while( !(t == cursor->next->data) ) + cursor = cursor->next; + return cursor; +} + +template void BI_ListImp::detach( T toDetach, int del ) +{ + BI_ListElement _FAR *pred = findDetach( toDetach ); + BI_ListElement _FAR *item = pred->next; + if( item != &tail ) + { + pred->next = pred->next->next; + if( del != 0 ) + removeData( item ); + delete item; + } +} + +template void BI_ListImp::flush( int del ) +{ + BI_ListElement _FAR *current = head.next; + while( current != &tail ) + { + BI_ListElement _FAR *temp = current; + current = current->next; + if( del != 0 ) + removeData( temp ); + delete temp; + } + initList(); +} + +template +void BI_ListImp::forEach( void (_FAR *f)(T _FAR &, void _FAR *), + void _FAR *args + ) +{ + BI_ListElement _FAR *cur = head.next; + while( cur->next != cur ) + { + f( cur->data, args ); + cur = cur->next; + } +} + +template +T _FAR *BI_ListImp::firstThat( int (_FAR *cond)(const T _FAR &, void _FAR *), + void _FAR *args + ) const +{ + BI_ListElement _FAR *cur = head.next; + while( cur->next != cur ) + if( cond( cur->data, args ) != 0 ) + return &(cur->data); + else + cur = cur->next; + return 0; +} + +template +T _FAR *BI_ListImp::lastThat( int (_FAR *cond)(const T _FAR &, void _FAR *), + void _FAR *args + ) const +{ + T _FAR *res = 0; + BI_ListElement _FAR *cur = head.next; + while( cur->next != cur ) + { + if( cond( cur->data, args ) != 0 ) + res = &(cur->data); + cur = cur->next; + } + return res; +} + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_SListImp */ +/* */ +/* Implements a sorted list of objects of type T. Assumes that */ +/* T has meaningful copy semantics, a meaningful < operator, and a */ +/* default constructor. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_SListImp : public BI_ListImp +{ + +public: + + void add( T ); + +protected: + + virtual BI_ListElement _FAR *findDetach( T t ); + virtual BI_ListElement _FAR *findPred( T ); + +}; + +template void BI_SListImp::add( T t ) +{ + new BI_ListElement( t, findPred(t) ); +} + +template BI_ListElement _FAR *BI_SListImp::findDetach( T t ) +{ + BI_ListElement _FAR *res = findPred(t); + if( res->next->data == t ) + return res; + else + return &tail; +} + +template BI_ListElement _FAR *BI_SListImp::findPred( T t ) +{ + tail.data = t; + BI_ListElement _FAR *cursor = &head; + while( cursor->next->data < t ) + cursor = cursor->next; + return cursor; +} + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_ListIteratorImp */ +/* */ +/* Implements a list iterator. This iterator works with any direct */ +/* list. For indirect lists, see BI_IListIteratorImp. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_ListIteratorImp +{ + +public: + + BI_ListIteratorImp( const BI_ListImp _FAR &l ) + { + list = &l; + cur = list->head.next; + } + + operator int() + { + return cur != &(list->tail); + } + + T current() + { + return cur->data; + } + + T operator ++ ( int ) + { + BI_ListElement _FAR *temp = cur; + cur = cur->next; + return temp->data; + } + + T operator ++ () + { + cur = cur->next; + return cur->data; + } + + void restart() + { + cur = list->head.next; + } + +private: + + const BI_ListImp _FAR *list; + BI_ListElement _FAR *cur; + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_InternalIListImp */ +/* */ +/* Implements a list of pointers to objects of type T. */ +/* This is implemented through the form of BI_ListImp specified by List. */ +/* Since pointers always have meaningful copy semantics, this class */ +/* can handle any type of object. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_InternalIListImp : + public List +{ +public: + + T _FAR *peekHead() const + { + return (T _FAR *)List::peekHead(); + } + + void add( T _FAR *t ) + { + List::add( t ); + } + + void detach( T _FAR *t, int del = 0 ) + { + List::detach( t, del ); + } + + void forEach( void (_FAR *)(T _FAR &, void _FAR *), void _FAR * ); + T _FAR *firstThat( int (_FAR *)(const T _FAR &, void _FAR *), + void _FAR * + ) const; + T _FAR *lastThat( int (_FAR *)(const T _FAR &, void _FAR *), + void _FAR * + ) const; + +protected: + + virtual BI_ListElement _FAR *findPred( void _FAR * ) = 0; + +private: + + virtual void removeData( BI_ListElement _FAR *block ) + { + delete (T _FAR *)(block->data); + } +}; + +template +void BI_InternalIListImp::forEach( void (_FAR *f)(T _FAR &, void _FAR *), + void _FAR *args + ) +{ + BI_ListElement _FAR *cur = head.next; + while( cur->next != cur ) + { + f( *(T _FAR *)cur->data, args ); + cur = cur->next; + } +} + +template +T _FAR *BI_InternalIListImp::firstThat( int (_FAR *cond)(const T _FAR &, void _FAR *), + void _FAR *args + ) const +{ + BI_ListElement _FAR *cur = head.next; + while( cur->next != cur ) + if( cond( *(T _FAR *)(cur->data), args ) != 0 ) + return (T _FAR *)cur->data; + else + cur = cur->next; + return 0; +} + +template +T _FAR *BI_InternalIListImp::lastThat( int (_FAR *cond)(const T _FAR &, void _FAR *), + void _FAR *args + ) const +{ + T _FAR *res = 0; + BI_ListElement _FAR *cur = head.next; + while( cur->next != cur ) + { + if( cond( *(T _FAR *)(cur->data), args ) != 0 ) + res = (T _FAR *)(cur->data); + cur = cur->next; + } + return res; +} + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_IListImp */ +/* */ +/* Implements a list of pointers to objects of type T. */ +/* This is implemented through the template BI_InternalIListImp. Since */ +/* pointers always have meaningful copy semantics, this class */ +/* can handle any type of object. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_IListImp : + public BI_InternalIListImp > +{ + +protected: + + virtual BI_ListElement _FAR *findPred( void _FAR * ); + +}; + +template +BI_ListElement _FAR *BI_IListImp::findPred( void _FAR *t ) +{ + tail.data = t; + BI_ListElement _FAR *cursor = &head; + while( !(*(T _FAR *)t == *(T _FAR *)(cursor->next->data)) ) + cursor = cursor->next; + return cursor; +} + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_ISListImp */ +/* */ +/* Implements a sorted list of pointers to objects of type T. */ +/* This is implemented through the template BI_InternalIListImp. Since */ +/* pointers always have meaningful copy semantics, this class */ +/* can handle any type of object. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_ISListImp : + public BI_InternalIListImp > +{ + +protected: + + virtual BI_ListElement _FAR *findDetach( void _FAR * ); + virtual BI_ListElement _FAR *findPred( void _FAR * ); + +}; + +template +BI_ListElement _FAR *BI_ISListImp::findDetach( void _FAR *t ) +{ + BI_ListElement _FAR *res = findPred(t); + if( *(T _FAR *)(res->next->data) == *(T _FAR *)t ) + return res; + else + return &tail; +} + +template +BI_ListElement _FAR *BI_ISListImp::findPred( void _FAR *t ) +{ + tail.data = t; + BI_ListElement _FAR *cursor = &head; + while( *(T _FAR *)(cursor->next->data) < *(T _FAR *)t ) + cursor = cursor->next; + return cursor; +} + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_IListIteratorImp */ +/* */ +/* Implements a list iterator. This iterator works with any indirect */ +/* list. For direct lists, see BI_ListIteratorImp. */ +/* */ +/*------------------------------------------------------------------------*/ + +template +class _CLASSTYPE BI_IListIteratorImp : public BI_ListIteratorImp +{ + +public: + + BI_IListIteratorImp( const BI_ListImp _FAR &l ) : + BI_ListIteratorImp(l) {} + + T _FAR *current() + { + return (T _FAR *)BI_ListIteratorImp::current(); + } + + T _FAR *operator ++ (int) + { + return (T _FAR *)BI_ListIteratorImp::operator ++ (1); + } + + T _FAR *operator ++ () + { + return (T _FAR *)BI_ListIteratorImp::operator ++ (); + } + + +}; + +#endif // __LISTIMP_H + diff --git a/M/TC/CLASSLIB/INCLUDE/LTIME.H b/M/TC/CLASSLIB/INCLUDE/LTIME.H new file mode 100644 index 0000000..1ee322c --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/LTIME.H @@ -0,0 +1,175 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* LTIME.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __LTIME_H ) +#define __LTIME_H + +#if !defined( __CHECKS_H ) +#include +#endif // __CHECKS_H + +#if !defined( __DOS_H ) +#include +#endif // __DOS_H + +#if !defined( __SORTABLE_H ) +#include +#endif // __SORTABLE_H + +_CLASSDEF(ostream) +_CLASSDEF(BaseTime) +_CLASSDEF(Time) + +class _CLASSTYPE BaseTime : public Sortable +{ + +public: + + unsigned hour() const; + unsigned minute() const; + unsigned second() const; + unsigned hundredths() const; + void setHour( unsigned char ); + void setMinute( unsigned char ); + void setSecond( unsigned char ); + void setHundredths( unsigned char ); + + virtual classType isA() const = 0; + virtual char _FAR *nameOf() const = 0; + virtual hashValueType hashValue() const; + virtual int isEqual( const Object _FAR & ) const; + virtual int isLessThan( const Object _FAR & ) const; + virtual void printOn( ostream _FAR & ) const = 0; + +protected: + + BaseTime(); + BaseTime( const BaseTime _FAR & ); + BaseTime( unsigned char, + unsigned char = 0, + unsigned char = 0, + unsigned char = 0 + ); + +private: + + unsigned char HH; + unsigned char MM; + unsigned char SS; + unsigned char HD; +}; + +inline BaseTime::BaseTime() +{ + struct time t; + gettime( &t ); + HH = t.ti_hour; + MM = t.ti_min; + SS = t.ti_sec; + HD = t.ti_hund; +} + +inline BaseTime::BaseTime( const BaseTime _FAR & B ) : + HH(B.HH), MM(B.MM), SS(B.SS), HD(B.HD) +{ +} + +inline BaseTime::BaseTime( unsigned char H, unsigned char M, unsigned char S, unsigned char D ) +{ + setHour( H ); + setMinute( M ); + setSecond( S ); + setHundredths( D ); +} + +inline unsigned BaseTime::hour() const +{ + return HH; +} + +inline unsigned BaseTime::minute() const +{ + return MM; +} + +inline unsigned BaseTime::second() const +{ + return SS; +} + +inline unsigned BaseTime::hundredths() const +{ + return HD; +} + +inline void BaseTime::setHour( unsigned char anHour ) +{ + PRECONDITION( anHour < 24 ); + HH = anHour; +} + +inline void BaseTime::setMinute( unsigned char M ) +{ + PRECONDITION( M < 60 ); + MM = M; +} + +inline void BaseTime::setSecond( unsigned char S ) +{ + PRECONDITION( S < 60 ); + SS = S; +} + +inline void BaseTime::setHundredths( unsigned char D ) +{ + PRECONDITION( D < 100 ); + HD = D; +} + +class _CLASSTYPE Time : public BaseTime +{ + +public: + + Time(); + Time( const Time _FAR & ); + Time( unsigned char, + unsigned char = 0, + unsigned char = 0, + unsigned char = 0 + ); + + virtual classType isA() const + { + return timeClass; + } + + virtual char _FAR *nameOf() const + { + return "Time"; + } + + virtual void printOn( ostream _FAR & ) const; +}; + +inline Time::Time() : BaseTime() +{ +} + +inline Time::Time( const Time& T ) : BaseTime( T ) +{ +} + +inline Time::Time( unsigned char H, unsigned char M, unsigned char S, + unsigned char D ) : BaseTime( H, M, S, D ) +{ +} + +#endif // __LTIME_H + diff --git a/M/TC/CLASSLIB/INCLUDE/MEMMGR.H b/M/TC/CLASSLIB/INCLUDE/MEMMGR.H new file mode 100644 index 0000000..75fa6dc --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/MEMMGR.H @@ -0,0 +1,247 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* MEMMGR.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __MEMMGR_H ) +#define __MEMMGR_H + +#if !defined( __STDTEMPL_H ) +#include +#endif // __STDTEMPL_H + +#if !defined( __RESOURCE_H ) +#include +#endif // __RESOURCE_H + +#if !defined( __STDLIB_H ) +#include +#endif // __STDLIB_H + +#if !defined( __CHECKS_H ) +#include +#endif // __CHECKS_H + +_CLASSDEF(HeaderBlock) +_CLASSDEF(BlockList) +_CLASSDEF(BaseMemBlocks) +_CLASSDEF(MemStack) +_CLASSDEF(Marker) +_CLASSDEF(BMarker) + +class _CLASSTYPE HeaderBlock +{ + +public: + + void _FAR *operator new( size_t, size_t ); + void _FAR *operator new( size_t ); + +}; + +inline void _FAR *HeaderBlock::operator new( size_t sz, size_t extra ) +{ + return ::operator new( sz + extra ); +} + +inline void _FAR *HeaderBlock::operator new( size_t ) +{ + CHECK(0); + return 0; +} + +class _CLASSTYPE BlockList : public HeaderBlock +{ + +public: + + BlockList( BlockList _FAR * ); + +private: + + BlockList _FAR *next; + + friend class BaseMemBlocks; + +}; + +inline BlockList::BlockList( BlockList _FAR *nxt ) : + next( nxt ) +{ +} + +class _CLASSTYPE BaseMemBlocks +{ + +public: + + BaseMemBlocks( size_t = 8192 ); + ~BaseMemBlocks(); + + char _FAR *block() const { return (char _FAR *)curBlock; } + unsigned count() const { return blockCount; } + allocBlock( size_t ); + void freeTo( unsigned ); + +protected: + + const size_t blockSize; + +private: + + BlockList _FAR *curBlock; + unsigned blockCount; + +}; + +inline BaseMemBlocks::BaseMemBlocks( size_t sz ) : + curBlock(0), + blockCount(0), + blockSize(sz) +{ + CHECK( sz != 0 ); +} + +inline BaseMemBlocks::~BaseMemBlocks() +{ +#if !defined( WINDOWS_WEP_BUG ) + freeTo( 0 ); +#endif +} + +class _CLASSTYPE MemStack : public BaseMemBlocks +{ + +public: + + friend class Marker; + + MemStack( size_t = 8192 ); + + void *allocate( size_t ); + +private: + + size_t curLoc; + +}; + +inline void _FAR *operator new( size_t sz, MemStack& m ) +{ + return m.allocate( sz ); +} + +inline MemStack::MemStack( size_t sz ) : + BaseMemBlocks( sz ), + curLoc(sz) +{ + CHECK( sz != 0 ); +} + +class _CLASSTYPE Marker +{ + +public: + + Marker( MemStack _FAR & ms ) : + memstk(ms), + blk(ms.count()), + curLoc(ms.curLoc) + { + } + + ~Marker() + { + PRECONDITION( blk < memstk.count() || + (blk == memstk.count() && curLoc <= memstk.curLoc ) + ); + memstk.freeTo( blk ); + memstk.curLoc = curLoc; + } + + +private: + + const unsigned blk; + const size_t curLoc; + MemStack& memstk; + +}; + +class _CLASSTYPE MemBlocks +{ + +public: + + MemBlocks( size_t, unsigned = 100 ); + + void _FAR *allocate( size_t ); + void free( void _FAR * ); + +private: + + void _FAR *freeList; + MemStack mem; + size_t size; + + friend class BMarker; + +}; + +inline MemBlocks::MemBlocks( size_t sz, unsigned count ) : + mem( sz*count ), + freeList(0), + size( max(sz, sizeof(void _FAR *)) ) +{ + CHECK( sz != 0 && count != 0 ); +} + +#pragma argsused +inline void _FAR *MemBlocks::allocate( size_t sz ) +{ + PRECONDITION( size == max(sz, sizeof(void _FAR *)) ); + if( freeList == 0 ) + return mem.allocate( size ); + else + { + void _FAR *temp = freeList; + freeList = *(void _FAR * _FAR *)temp; + return temp; + } +} + +inline void MemBlocks::free( void _FAR * block ) +{ + *(void _FAR * _FAR *)block = freeList; + freeList = block; +} + +class _CLASSTYPE BMarker +{ + +public: + + BMarker( MemBlocks _FAR & mb ) : + memstk(mb.mem), + blk(mb.mem.count()) + {} + + ~BMarker() + { + PRECONDITION( blk <= memstk.count() ); + memstk.freeTo( blk ); + } + + +private: + + const unsigned blk; + MemStack _FAR & memstk; + +}; + +#endif // __MEMMGR_H diff --git a/M/TC/CLASSLIB/INCLUDE/OBJECT.H b/M/TC/CLASSLIB/INCLUDE/OBJECT.H new file mode 100644 index 0000000..f79f388 --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/OBJECT.H @@ -0,0 +1,152 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* OBJECT.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __OBJECT_H ) +#define __OBJECT_H + +#if !defined( __CLSTYPES_H ) +#include +#endif // __CLSTYPES_H + +#if !defined( __CLSDEFS_H ) +#include +#endif // __CLSDEFS_H + +#if !defined( __STDDEF_H ) +#include +#endif // __STDDEF_H + +#if !defined( __IOSTREAM_H ) +#include +#endif // __IOSTREAM_H + +_CLASSDEF(Object) +_CLASSDEF(Error) + +class _CLASSTYPE Object +{ + +public: + + virtual ~Object() + { + } + + virtual classType isA() const = 0; + virtual char _FAR *nameOf() const = 0; + virtual hashValueType hashValue() const = 0; + virtual int isEqual( const Object _FAR & ) const = 0; + + virtual int isSortable() const + { + return 0; + } + + virtual int isAssociation() const + { + return 0; + } + + void _FAR *operator new( size_t s ); + virtual void forEach( iterFuncType, void _FAR * ); + virtual Object _FAR & firstThat( condFuncType, void _FAR * ) const; + virtual Object _FAR & lastThat( condFuncType, void _FAR * ) const; + virtual void printOn( ostream _FAR & ) const = 0; + + static Object _FAR *ZERO; + + static Object _FAR & ptrToRef( Object _FAR *p ) + { return p == 0 ? *ZERO : *p; } + + friend ostream _FAR& operator << ( ostream _FAR&, const Object _FAR& ); + +}; + +#define NOOBJECT (*(Object::ZERO)) + +inline void Object::forEach( iterFuncType func, void _FAR *args ) +{ + ( *func )( *this, args ); +} + +inline Object _FAR & Object::firstThat( condFuncType func, + void _FAR *args + ) const +{ + return (*func)( *this, args ) == 0 ? NOOBJECT : *this; +} + +inline Object _FAR & Object::lastThat( condFuncType func, + void _FAR *args + ) const +{ + return Object::firstThat( func, args ); +} + +inline ostream _FAR& operator << ( ostream _FAR& out, const Object _FAR& obj ) +{ + obj.printOn( out ); + return out; +} + +inline int operator == ( const Object _FAR& test1, const Object _FAR& test2 ) +{ + return (test1.isA() == test2.isA()) && test1.isEqual( test2 ); +} + +inline int operator !=( const Object _FAR& test1, const Object _FAR& test2 ) +{ + return !( test1 == test2 ); +} + + +class _CLASSTYPE Error : public Object +{ + +public: + + virtual classType isA() const + { + return errorClass; + } + + virtual char _FAR *nameOf() const + { + return "Error"; + } + + virtual hashValueType hashValue() const + { + return ERROR_CLASS_HASH_VALUE; + } + + virtual int isEqual( const Object _FAR & ) const + { + return 1; + } + + virtual void printOn( ostream _FAR & ) const; + + void operator delete( void _FAR * ); + +}; + + +inline void Error::printOn( ostream _FAR & out ) const +{ + out << nameOf() << '\n'; +} + +inline void Error::operator delete( void _FAR * ) +{ + ClassLib_error( __EDELERROR ); +} + +#endif + diff --git a/M/TC/CLASSLIB/INCLUDE/PRIORTYQ.H b/M/TC/CLASSLIB/INCLUDE/PRIORTYQ.H new file mode 100644 index 0000000..5b75a8f --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/PRIORTYQ.H @@ -0,0 +1,109 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* PRIORTYQ.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __PRIORTYQ_H ) +#define __PRIORTYQ_H + +#if !defined( __BTREE_H ) +#include "Btree.h" +#endif + +#if !defined( __SHDDEL_H ) +#include +#endif // __SHDDEL_H + +_CLASSDEF(PriorityQueue) + +class _CLASSTYPE PriorityQueue : + public Container, + public virtual TShouldDelete +{ + +public: + + int isEmpty() const + { + return tree.isEmpty(); + } + + countType getItemsInContainer() const + { + return tree.getItemsInContainer(); + } + + void put(Object& o) + { + tree.add(o); + } + + Object& get() + { + if( isEmpty() ) + return NOOBJECT; + else + { + Object& obj = tree[0]; + tree.detach( obj ); // does not delete + return obj; + } + } + + Object& peekLeft() + { + return (isEmpty()?NOOBJECT:tree[0]); + } + + void detachLeft( DeleteType dt = NoDelete ) + { + if( !isEmpty() ) + tree.detach( tree[0], dt ); + } + + void flush( DeleteType dt = DefDelete ) + { + tree.flush( dt ); + } + + int hasMember( Object& obj ) const + { + return tree.hasMember( obj ); + } + + int ownsElements() + { + return tree.ownsElements(); + } + + void ownsElements( int del ) + { + tree.ownsElements( del ); + } + + virtual classType isA() const + { + return priorityQueueClass; + } + + virtual char _FAR *nameOf() const + { + return "PriorityQueue"; + } + + virtual ContainerIterator _FAR & initIterator() const + { + return tree.initIterator(); + } + +private: + + Btree tree; + +}; + +#endif diff --git a/M/TC/CLASSLIB/INCLUDE/QUEUE.H b/M/TC/CLASSLIB/INCLUDE/QUEUE.H new file mode 100644 index 0000000..46003dd --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/QUEUE.H @@ -0,0 +1,87 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* QUEUE.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __QUEUE_H ) +#define __QUEUE_H + +#if defined( TEMPLATES ) + + #if !defined( __QUEUES_H ) + #include + #endif // __QUEUES_H + + #define Queue BI_TCQueueAsDoubleList + #define PQueue PBI_TCQueueAsDoubleList + #define RQueue RBI_TCQueueAsDoubleList + #define RPQueue RPBI_TCQueueAsDoubleList + #define PCQueue PCBI_TCQueueAsDoubleList + #define RCQueue RCBI_TCQueueAsDoubleList + + _CLASSDEF( BI_TCQueueAsDoubleList ) + + #define QueueIterator BI_TCQueueAsDoubleListIterator + #define PQueueIterator PBI_TCQueueAsDoubleListIterator + #define RQueueIterator RBI_TCQueueAsDoubleListIterator + #define RPQueueIterator RPBI_TCQueueAsDoubleListIterator + #define PCQueueIterator PCBI_TCQueueAsDoubleListIterator + #define RCQueueIterator RCBI_TCQueueAsDoubleListIterator + + _CLASSDEF( BI_TCQueueAsDoubleListIterator ) + +#else // TEMPLATES + + #if !defined( __CLSTYPES_H ) + #include + #endif // __CLSTYPES_H + + #if !defined( __DEQUE_H ) + #include + #endif // __DEQUE_H + + _CLASSDEF(Queue) + + class _CLASSTYPE Queue : public Deque + { + + public: + + Object _FAR & get() + { + return Deque::getRight(); + } + + void put( Object _FAR & o ) + { + Deque::putLeft( o ); + } + + virtual classType isA() const + { + return queueClass; + } + + virtual char _FAR *nameOf() const + { + return "Queue"; + } + + private: + + Object _FAR & getLeft(); + Object _FAR & getRight(); + + void putLeft( Object _FAR & ); + void putRight( Object _FAR & ); + + }; + +#endif // TEMPLATES + +#endif // __QUEUE_H + diff --git a/M/TC/CLASSLIB/INCLUDE/QUEUES.H b/M/TC/CLASSLIB/INCLUDE/QUEUES.H new file mode 100644 index 0000000..47a3e0d --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/QUEUES.H @@ -0,0 +1,445 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* QUEUES.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __QUEUES_H ) +#define __QUEUES_H + +#if !defined( ___DEFS_H ) +#include <_defs.h> +#endif // ___DEFS_H + +#if !defined( __DEQUES_H ) +#include +#endif // __DEQUES_H + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_QueueAsVector */ +/* */ +/* Implements a queue of objects of type T, using a vector as */ +/* the underlying implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_QueueAsVector : + public BI_DequeAsVector +{ + +public: + + BI_QueueAsVector( unsigned sz = DEFAULT_QUEUE_SIZE ) : + BI_DequeAsVector(sz) + { + } + + T get() + { + return BI_DequeAsVector::getRight(); + } + + void put( T t ) + { + BI_DequeAsVector::putLeft( t ); + } + +private: + + T getLeft(); + T getRight(); + + void putLeft( T ); + void putRight( T ); + +}; + +template class _CLASSTYPE BI_QueueAsVectorIterator : + public BI_DequeAsVectorIterator +{ + +public: + + BI_QueueAsVectorIterator( const BI_DequeAsVector _FAR &q ) : + BI_DequeAsVectorIterator(q) {} + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_IQueueAsVector */ +/* */ +/* Implements a queue of pointers to objects of type T, */ +/* using a vector as the underlying implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_IQueueAsVector : + public BI_IDequeAsVector +{ + +public: + + BI_IQueueAsVector( unsigned sz = DEFAULT_QUEUE_SIZE ) : + BI_IDequeAsVector(sz) + { + } + + T _FAR *get() + { + return BI_IDequeAsVector::getRight(); + } + + void put( T _FAR *t ) + { + BI_IDequeAsVector::putLeft( t ); + } + +private: + + T _FAR *getLeft(); + T _FAR *getRight(); + + void putLeft( T _FAR * ); + void putRight( T _FAR * ); + +}; + +template class _CLASSTYPE BI_IQueueAsVectorIterator : + public BI_IDequeAsVectorIterator +{ + +public: + + BI_IQueueAsVectorIterator( const BI_IDequeAsVector _FAR &q ) : + BI_IDequeAsVectorIterator(q) {} + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* class BI_OQueueAsVector */ +/* */ +/* Implements a queue of pointers to Object, */ +/* using a vector as the underlying implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +class _CLASSTYPE BI_OQueueAsVector : public BI_ODequeAsVector +{ + +public: + + BI_OQueueAsVector( unsigned sz = DEFAULT_QUEUE_SIZE ) : + BI_ODequeAsVector(sz) + { + } + + Object _FAR *get() + { + return BI_ODequeAsVector::getRight(); + } + + void put( Object _FAR *t ) + { + BI_ODequeAsVector::putLeft( t ); + } + +private: + + Object _FAR *getLeft(); + Object _FAR *getRight(); + + void putLeft( Object _FAR * ); + void putRight( Object _FAR * ); + +}; + +class _CLASSTYPE BI_OQueueAsVectorIterator : + public BI_ODequeAsVectorIterator +{ + +public: + + BI_OQueueAsVectorIterator( const BI_ODequeAsVector _FAR &q ) : + BI_ODequeAsVectorIterator(q) {} + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* class BI_TCQueueAsVector */ +/* */ +/* Implements an Object queue, with the full semantics of */ +/* the BC 2.0 style queue, using a vector as the underlying */ +/* implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +class _CLASSTYPE BI_TCQueueAsVector : public BI_TCDequeAsVector +{ + +public: + + BI_TCQueueAsVector( unsigned sz = DEFAULT_QUEUE_SIZE ) : + BI_TCDequeAsVector(sz) + { + } + + Object _FAR & get() + { + return BI_TCDequeAsVector::getRight(); + } + + void put( Object _FAR & t ) + { BI_TCDequeAsVector::putLeft( t ); + } + + virtual classType isA() const + { + return queueClass; + } + + virtual char _FAR *nameOf() const + { + return "BI_TCQueueAsDoubleList"; + } + + virtual ContainerIterator _FAR & initIterator() const; + +private: + + Object _FAR & getLeft(); + Object _FAR & getRight(); + + void putLeft( Object _FAR & ); + void putRight( Object _FAR & ); + +}; + +class _CLASSTYPE BI_TCQueueAsVectorIterator : + public BI_TCDequeAsVectorIterator +{ + +public: + + BI_TCQueueAsVectorIterator( const BI_TCQueueAsVector _FAR &q ) : + BI_TCDequeAsVectorIterator(q) + { + } + +}; + +inline ContainerIterator _FAR & BI_TCQueueAsVector::initIterator() const +{ + return *new BI_TCQueueAsVectorIterator( *this ); +} + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_QueueAsDoubleList */ +/* */ +/* Implements a queue of objects of type T, using a double linked list */ +/* as the underlying implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_QueueAsDoubleList : + public BI_DequeAsDoubleList +{ + +public: + + T get() + { + return BI_DequeAsDoubleList::getRight(); + } + + void put( T t ) + { + BI_DequeAsDoubleList::putLeft( t ); + } + +private: + + T getLeft(); + T getRight(); + + void putLeft( T ); + void putRight( T ); + +}; + +template class _CLASSTYPE BI_QueueAsDoubleListIterator : + public BI_DequeAsDoubleListIterator +{ + +public: + + BI_QueueAsDoubleListIterator( const BI_QueueAsDoubleList _FAR & q ) : + BI_DequeAsDoubleListIterator(q) + { + } + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_IQueueAsDoubleList */ +/* */ +/* Implements a queue of pointers to objects of type T, */ +/* using a double linked list as the underlying implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_IQueueAsDoubleList : + public BI_IDequeAsDoubleList +{ + +public: + + T _FAR *get() + { + return BI_IDequeAsDoubleList::getRight(); + } + + void put( T _FAR *t ) + { + BI_IDequeAsDoubleList::putLeft( t ); + } + +private: + + T _FAR *getLeft(); + T _FAR *getRight(); + + void putLeft( T _FAR * ); + void putRight( T _FAR * ); + +}; + +template class _CLASSTYPE BI_IQueueAsDoubleListIterator : + public BI_IDequeAsDoubleListIterator +{ + +public: + + BI_IQueueAsDoubleListIterator( const BI_IQueueAsDoubleList _FAR& q ) : + BI_IDequeAsDoubleListIterator(q) {} + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* class BI_OQueueAsDoubleList */ +/* */ +/* Implements a queue of pointers to Object, */ +/* using a double linked list as the underlying implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +class _CLASSTYPE BI_OQueueAsDoubleList : public BI_ODequeAsDoubleList +{ + +public: + + Object _FAR *get() + { + return BI_ODequeAsDoubleList::getRight(); + } + + void put( Object _FAR *t ) + { + BI_ODequeAsDoubleList::putLeft( t ); + } + +private: + + Object _FAR *getLeft(); + Object _FAR *getRight(); + + void putLeft( Object _FAR * ); + void putRight( Object _FAR * ); + +}; + +class _CLASSTYPE BI_OQueueAsDoubleListIterator : + public BI_ODequeAsDoubleListIterator +{ + +public: + + BI_OQueueAsDoubleListIterator( const BI_OQueueAsDoubleList _FAR & q ) : + BI_ODequeAsDoubleListIterator(q) {} + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* class BI_TCQueueAsDoubleList */ +/* */ +/* Implements an Object queue, with the full semantics of */ +/* the BC 2.0 style queue, using a double linked list as the underlying */ +/* implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +class _CLASSTYPE BI_TCQueueAsDoubleList : public BI_TCDequeAsDoubleList +{ + +public: + + Object _FAR & get() + { + return BI_TCDequeAsDoubleList::getRight(); + } + + void put( Object _FAR & t ) + { + BI_TCDequeAsDoubleList::putLeft( t ); + } + + virtual classType isA() const + { + return queueClass; + } + + virtual char _FAR *nameOf() const + { + return "BI_TCQueueAsDoubleList"; + } + + virtual ContainerIterator _FAR & initIterator() const; + +private: + + Object _FAR & getLeft(); + Object _FAR & getRight(); + + void putLeft( Object _FAR & ); + void putRight( Object _FAR & ); + +}; + +class _CLASSTYPE BI_TCQueueAsDoubleListIterator : + public BI_TCDequeAsDoubleListIterator +{ + +public: + + BI_TCQueueAsDoubleListIterator( const BI_TCQueueAsDoubleList _FAR &q ) : + BI_TCDequeAsDoubleListIterator(q) {} + +}; + +inline ContainerIterator _FAR & BI_TCQueueAsDoubleList::initIterator() const +{ + return *new BI_TCQueueAsDoubleListIterator( *this ); +} + +#endif // __QUEUES_H + diff --git a/M/TC/CLASSLIB/INCLUDE/RESOURCE.H b/M/TC/CLASSLIB/INCLUDE/RESOURCE.H new file mode 100644 index 0000000..be4918d --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/RESOURCE.H @@ -0,0 +1,29 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* RESOURCE.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __RESOURCE_H ) +#define __RESOURCE_H + +#if !defined( __LIMITS_H ) +#include +#endif // __LIMITS_H + +#if defined( __DLL__ ) +#define WINDOWS_WEP_BUG // no destructors for static objects in a DLL +#endif + +const DEFAULT_HASH_TABLE_SIZE = 111; +const DEFAULT_BAG_SIZE = 29; +const DEFAULT_SET_SIZE = 29; +const DEFAULT_DEQUE_SIZE = 20; +const DEFAULT_QUEUE_SIZE = 20; +const DEFAULT_STACK_SIZE = 20; +const DEFAULT_ARRAY_SIZE = 20; + +#endif diff --git a/M/TC/CLASSLIB/INCLUDE/SET.H b/M/TC/CLASSLIB/INCLUDE/SET.H new file mode 100644 index 0000000..5b8ccfe --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/SET.H @@ -0,0 +1,85 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* SET.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __SET_H ) +#define __SET_H + +#if defined( TEMPLATES ) + + #if !defined( __SETS_H ) + #include + #endif // __SETS_H + + #define Set BI_TCSetAsVector + #define PSet PBI_TCSetAsVector + #define RSet RBI_TCSetAsVector + #define RPSet RPBI_TCSetAsVector + #define PCSet PCBI_TCSetAsVector + #define RCSet RCBI_TCSetAsVector + + _CLASSDEF( BI_TCSetAsVector ) + + #define SetIterator BI_TCSetAsVectorIterator + #define PSetIterator PBI_TCSetAsVectorIterator + #define RSetIterator RBI_TCSetAsVectorIterator + #define RPSetIterator RPBI_TCSetAsVectorIterator + #define PCSetIterator PCBI_TCSetAsVectorIterator + #define RCSetIterator RCBI_TCSetAsVectorIterator + + _CLASSDEF( BI_TCSetAsVectorIterator ) + +#else // TEMPLATES + + #if !defined( __RESOURCE_H ) + #include + #endif // __RESOURCE_H + + #if !defined( __CLSTYPES_H ) + #include + #endif // __CLSTYPES_H + + #if !defined( __BAG_H ) + #include + #endif // __BAG_H + + _CLASSDEF(Set) + + class _CLASSTYPE Set : public Bag + { + + public: + + Set( sizeType setSize = DEFAULT_SET_SIZE ) : + Bag( setSize ) + { + } + + virtual void add( Object _FAR & toAdd ) + { + if( !(Bag::hasMember( toAdd )) ) + { + Bag::add( toAdd ); + } + } + virtual classType isA() const + { + return setClass; + } + + virtual char _FAR *nameOf() const + { + return "Set"; + } + + }; + +#endif // TEMPLATES + +#endif // __SET_H + diff --git a/M/TC/CLASSLIB/INCLUDE/SETS.H b/M/TC/CLASSLIB/INCLUDE/SETS.H new file mode 100644 index 0000000..140599b --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/SETS.H @@ -0,0 +1,210 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* SETS.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __SETS_H ) +#define __SETS_H + +#if !defined( __CHECKS_H ) +#include +#endif // __CHECKS_H + +#if !defined( __RESOURCE_H ) +#include +#endif // __RESOURCE_H + +#if !defined( __BAGS_H ) +#include +#endif // __BAGS_H + +#if !defined( __COLLECT_H ) +#include +#endif // __COLLECT_H + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_SetAsVector */ +/* */ +/* Implements a set of objects of type T, using a vector as */ +/* the underlying implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_SetAsVector : public BI_BagAsVector +{ + +public: + + BI_SetAsVector( unsigned sz = DEFAULT_SET_SIZE ) : + BI_BagAsVector(sz) + { + } + + void add( T ); + +}; + +template void BI_SetAsVector::add( T t ) +{ + if( hasMember(t) ) + return; + else + BI_BagAsVector::add(t); +} + +template class BI_SetAsVectorIterator : + public BI_BagAsVectorIterator +{ + +public: + + BI_SetAsVectorIterator( const BI_SetAsVector _FAR &s ) : + BI_BagAsVectorIterator(s) {} + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_ISetAsVector */ +/* */ +/* Implements a set of pointers to objects of type T, */ +/* using a vector as the underlying implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_ISetAsVector : + public BI_IBagAsVector +{ + +public: + + BI_ISetAsVector( unsigned sz = DEFAULT_SET_SIZE ) : + BI_IBagAsVector(sz) + { + } + + void add( T _FAR * ); + +}; + +template void BI_ISetAsVector::add( T _FAR *t ) +{ + if( hasMember(t) ) + return; + else + BI_IBagAsVector::add(t); +} + +template class _CLASSTYPE BI_ISetAsVectorIterator : + public BI_IBagAsVectorIterator +{ + +public: + + BI_ISetAsVectorIterator( const BI_ISetAsVector _FAR &s ) : + BI_IBagAsVectorIterator(s) {} + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* class BI_OSetAsVector */ +/* */ +/* Implements a set of pointers to Object, */ +/* using a vector as the underlying implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +class _CLASSTYPE BI_OSetAsVector : public BI_OBagAsVector +{ + +public: + + BI_OSetAsVector( unsigned sz = DEFAULT_SET_SIZE ) : + BI_OBagAsVector(sz) + { + } + + void add( Object _FAR *o ) + { + if( !hasMember(o) ) + BI_OBagAsVector::add(o); + } + + +}; + +class BI_OSetAsVectorIterator : public BI_OBagAsVectorIterator +{ + +public: + + BI_OSetAsVectorIterator( const BI_OSetAsVector _FAR &s ) : + BI_OBagAsVectorIterator(s) {} + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* class BI_TCSetAsVector */ +/* */ +/* Implements an Object set, with the full semantics of */ +/* the BC 2.0 style Set, using a vector as the underlying */ +/* implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +class _CLASSTYPE BI_TCSetAsVector : public BI_TCBagAsVector +{ + +public: + + BI_TCSetAsVector( unsigned sz = DEFAULT_SET_SIZE ) : + BI_TCBagAsVector(sz) + { + } + + virtual void add( Object _FAR &o ) + { + if( !hasMember(o) ) + BI_TCBagAsVector::add(o); + } + + virtual classType isA() const + { + return setClass; + } + + virtual char _FAR *nameOf() const + { + return "BI_TCSetAsVector"; + } + + virtual ContainerIterator _FAR & BI_TCSetAsVector::initIterator() const; + +}; + +class BI_TCSetAsVectorIterator : public BI_TCBagAsVectorIterator +{ + +public: + + BI_TCSetAsVectorIterator( const BI_TCSetAsVector _FAR &s ) : + BI_TCBagAsVectorIterator(s) + { + } + +}; + +inline ContainerIterator _FAR & BI_TCSetAsVector::initIterator() const +{ + return *new BI_TCSetAsVectorIterator( *this ); +} + +#endif // __SETS_H + diff --git a/M/TC/CLASSLIB/INCLUDE/SHDDEL.H b/M/TC/CLASSLIB/INCLUDE/SHDDEL.H new file mode 100644 index 0000000..0b85015 --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/SHDDEL.H @@ -0,0 +1,55 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* SHDDEL.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __SHDDEL_H ) +#define __SHDDEL_H + +#if !defined( ___DEFS_H ) +#include <_defs.h> +#endif // ___DEFS_H + +_CLASSDEF(TShouldDelete) + +class _CLASSTYPE TShouldDelete +{ + +public: + + enum DeleteType { NoDelete, DefDelete, Delete }; + + TShouldDelete( DeleteType dt = Delete ) + { + ownsElements( dt ); + } + + int ownsElements() + { + return shouldDelete == Delete; + } + + void ownsElements( int del ) + { + shouldDelete = (del == 0) ? NoDelete : Delete; + } + +protected: + + int delObj( DeleteType dt ) + { + return dt == Delete || (dt==DefDelete && shouldDelete==Delete); + } + +private: + + DeleteType shouldDelete; + +}; + +#endif // __SHDDEL_H + diff --git a/M/TC/CLASSLIB/INCLUDE/SORTABLE.H b/M/TC/CLASSLIB/INCLUDE/SORTABLE.H new file mode 100644 index 0000000..f566b53 --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/SORTABLE.H @@ -0,0 +1,68 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* SORTABLE.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( _SORTABLE_H ) +#define _SORTABLE_H + +#if !defined( __CLSDEFS_H ) +#include +#endif // __CLSDEFS_H + +#if !defined( __OBJECT_H ) +#include +#endif // __OBJECT_H + +_CLASSDEF(ostream) +_CLASSDEF(Sortable) + +class _CLASSTYPE Sortable : public Object +{ + +public: + + virtual int isEqual( const Object _FAR & ) const = 0; + virtual int isLessThan( const Object _FAR & ) const = 0; + virtual int isSortable() const + { + return 1; + } + + virtual classType isA() const = 0; + virtual char _FAR *nameOf() const = 0; + virtual hashValueType hashValue() const = 0; + virtual void printOn( ostream& ) const = 0; + +}; + + +inline +int operator < ( const Sortable _FAR & test1, const Sortable _FAR & test2 ) +{ + return ( (test1.isA() == test2.isA()) && test1.isLessThan( test2 ) ); +} + +inline +int operator > ( const Sortable _FAR & test1, const Sortable _FAR & test2 ) +{ + return !( test1 < test2 ) && test1 != test2; +} + +inline +int operator >=( const Sortable _FAR & test1, const Sortable _FAR & test2 ) +{ + return ( !( test1 <( test2 ) ) ); +} + +inline +int operator <=( const Sortable _FAR & test1, const Sortable _FAR & test2 ) +{ + return ( test1 < test2 || test1 == test2 ); +} + +#endif diff --git a/M/TC/CLASSLIB/INCLUDE/SORTARRY.H b/M/TC/CLASSLIB/INCLUDE/SORTARRY.H new file mode 100644 index 0000000..2f7455b --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/SORTARRY.H @@ -0,0 +1,83 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* SORTARRY.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __SORTARRY_H ) +#define __SORTARRY_H + +#if defined( TEMPLATES ) + + #if !defined( __ARRAYS_H ) + #include + #endif // __ARRAYS_H + + #define SortedArray BI_TCSArrayAsVector + #define PSortedArray PBI_TCSArrayAsVector + #define RSortedArray RBI_TCSArrayAsVector + #define RPSortedArray RPBI_TCSArrayAsVector + #define PCSortedArray PCBI_TCSArrayAsVector + #define RCSortedArray RCBI_TCSArrayAsVector + + _CLASSDEF( BI_TCSArrayAsVector ) + + #define SortedArrayIterator BI_TCSArrayAsVectorIterator + #define PSortedArrayIterator PBI_TCSArrayAsVectorIterator + #define RSortedArrayIterator RBI_TCSArrayAsVectorIterator + #define RPSortedArrayIterator RPBI_TCSArrayAsVectorIterator + #define PCSortedArrayIterator PCBI_TCSArrayAsVectorIterator + #define RCSortedArrayIterator RCBI_TCSArrayAsVectorIterator + + _CLASSDEF( BI_TCSortedArrayAsVectorIterator ) + +#else // TEMPLATES + + #if !defined( __CLSTYPES_H ) + #include + #endif // __CLSTYPES_H + + #if !defined( __SORTABLE_H ) + #include + #endif // __SORTABLE_H + + #if !defined( __ABSTARRY_H ) + #include + #endif // __ABSTARRY_H + + _CLASSDEF(SortedArray) + + class _CLASSTYPE SortedArray : public AbstractArray + { + + public: + + SortedArray( int upper, int lower = 0, sizeType aDelta = 0 ); + + virtual void add( Object _FAR & ); + virtual void detach( Object _FAR &, DeleteType = NoDelete ); + + virtual classType isA() const + { + return sortedArrayClass; + } + + virtual char _FAR *nameOf() const + { + return "SortedArray"; + } + + }; + + inline SortedArray::SortedArray( int upper, int lower, sizeType aDelta ) : + AbstractArray( upper, lower, aDelta ) + { + } + +#endif // TEMPLATES + +#endif // __SORTARRY_H + diff --git a/M/TC/CLASSLIB/INCLUDE/STACK.H b/M/TC/CLASSLIB/INCLUDE/STACK.H new file mode 100644 index 0000000..d38e032 --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/STACK.H @@ -0,0 +1,101 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* STACK.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __STACK_H ) +#define __STACK_H + +#if defined( TEMPLATES ) + + #if !defined( __STACKS_H ) + #include + #endif // __STACKS_H + + #define Stack BI_TCStackAsList + #define PStack PBI_TCStackAsList + #define RStack RBI_TCStackAsList + #define RPStack RPBI_TCStackAsList + #define PCStack PCBI_TCStackAsList + #define RCStack RCBI_TCStackAsList + + _CLASSDEF( BI_TCStackAsList ) + + #define StackIterator BI_TCStackAsListIterator + #define PStackIterator PBI_TCStackAsListIterator + #define RStackIterator RBI_TCStackAsListIterator + #define RPStackIterator RPBI_TCStackAsListIterator + #define PCStackIterator PCBI_TCStackAsListIterator + #define RCStackIterator RCBI_TCStackAsListIterator + + _CLASSDEF( BI_TCStackAsListIterator ) + +#else // TEMPLATES + + #if !defined( __CLSTYPES_H ) + #include + #endif // __CLSTYPES_H + + #if !defined( __CONTAIN_H ) + #include + #endif // __CONTAIN_H + + #if !defined( __LIST_H ) + #include + #endif // __LIST_H + + _CLASSDEF(Stack) + + class _CLASSTYPE Stack : public Container + { + + public: + + void push( Object _FAR & ); + Object _FAR & pop(); + Object _FAR & top() const + { + return theStack.peekHead(); + } + + virtual int isEmpty() const + { + return theStack.isEmpty(); + } + + virtual countType getItemsInContainer() const + { + return theStack.getItemsInContainer(); + } + + virtual void flush( DeleteType dt = DefDelete ) + { + theStack.flush( dt ); + } + + virtual ContainerIterator _FAR & initIterator() const; + + virtual classType isA() const + { + return stackClass; + } + + virtual char _FAR *nameOf() const + { + return "Stack"; + } + + private: + + List theStack; + + }; + +#endif // TEMPLATES + +#endif // __STACK_H + diff --git a/M/TC/CLASSLIB/INCLUDE/STACKS.H b/M/TC/CLASSLIB/INCLUDE/STACKS.H new file mode 100644 index 0000000..690dca4 --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/STACKS.H @@ -0,0 +1,894 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* STACKS.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __STACKS_H ) +#define __STACKS_H + +#if !defined( ___DEFS_H ) +#include <_defs.h> +#endif // ___DEFS_H + +#if !defined( __CHECKS_H ) +#include +#endif // __CHECKS_H + +#if !defined( __SHDDEL_H ) +#include +#endif // __SHDDEL_H + +#if !defined( __VECTIMP_H ) +#include +#endif // __VECTIMP_H + +#if !defined( __LISTIMP_H ) +#include +#endif // __LISTIMP_H + +#if !defined( __CONTAIN_H ) +#include +#endif // __CONTAIN_H + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_StackAsVectorImp */ +/* */ +/* Implements the fundamental stack operations, using a vector */ +/* as the underlying implementation. The type Vect specifies the */ +/* form of the vector, either a BI_VectorImp or a */ +/* BI_IVectorImp. The type T specifies the type of the */ +/* objects to be put on the stack. When using BI_VectorImp, */ +/* T should be the same as T0. When using BI_IVectorImp, T */ +/* should be of type pointer to T0. See BI_StackAsVector and */ +/* BI_IStackAsVector for examples. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_StackAsVectorImp +{ + +public: + + BI_StackAsVectorImp( unsigned max = DEFAULT_STACK_SIZE ) : + data(max), + current(0) + { + } + + void push( T t ) + { + PRECONDITION( current < data.limit() ); + data[current++] = t; + } + + T pop() + { + PRECONDITION( current > 0 ); + return data[--current]; + } + + T top() const + { + PRECONDITION( current > 0 ); + return data[current-1]; + } + + int isEmpty() const + { + return current == 0; + } + + int isFull() const + { + return current == data.limit(); + } + + int getItemsInContainer() const + { + return current; + } + + void flush( TShouldDelete::DeleteType = TShouldDelete::DefDelete ) + { + current = 0; + } + +protected: + + Vect data; + unsigned current; + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_StackAsVector */ +/* */ +/* Implements a stack of objects of type T, using a vector as */ +/* the underlying implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_StackAsVector : + public BI_StackAsVectorImp,T> +{ + +public: + + friend class _CLASSTYPE BI_StackAsVectorIterator; + + BI_StackAsVector( unsigned max = DEFAULT_STACK_SIZE ) : + BI_StackAsVectorImp,T>( max ) + { + } + + void forEach( void (_FAR *f)(T _FAR &, void _FAR *), void _FAR *args ) + { + if( !isEmpty() ) + data.forEach( f, args, 0, current ); + } + + T _FAR *firstThat( int (_FAR *f)(const T _FAR &, void _FAR *), + void _FAR *args + ) const + { + if( isEmpty() ) + return 0; + return data.firstThat( f, args, 0, current ); + } + + T _FAR *lastThat( int (_FAR * f)(const T _FAR &, void _FAR *), + void _FAR *args + ) const + { + if( isEmpty() ) + return 0; + return data.lastThat( f, args, 0, current ); + } + +}; + +template class _CLASSTYPE BI_StackAsVectorIterator : + public BI_VectorIteratorImp +{ + +public: + + BI_StackAsVectorIterator( const BI_StackAsVector _FAR & s ) : + BI_VectorIteratorImp(s.data,0,s.current) + { + } + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_IStackAsVector */ +/* */ +/* Implements a stack of pointers to objects of type T, */ +/* using a vector as the underlying implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_IStackAsVector : + public BI_StackAsVectorImp, T _FAR * >, + public virtual TShouldDelete +{ + +public: + + friend class _CLASSTYPE BI_IStackAsVectorIterator; + + BI_IStackAsVector( unsigned max = DEFAULT_STACK_SIZE ) : + BI_StackAsVectorImp,T _FAR *>( max ) + { + } + + ~BI_IStackAsVector() + { + flush(); + } + + void push( T _FAR *t ) + { + BI_StackAsVectorImp,T _FAR *>::push( t ); + } + + T _FAR *pop() + + { + return (T _FAR *)BI_StackAsVectorImp,T _FAR *>::pop(); + } + + T _FAR *top() const + { + return (T _FAR *)BI_StackAsVectorImp,T _FAR *>::top(); + } + + void forEach( void (_FAR *f)(T _FAR &, void _FAR *), void _FAR *args ) + { + if( !isEmpty() ) + data.forEach( f, args, 0, current ); + } + + T _FAR *firstThat( int (_FAR *f)(const T _FAR &, void _FAR *), void _FAR *args ) const + { + if( isEmpty() ) + return 0; + return data.firstThat( f, args, 0, current ); + } + + T _FAR *lastThat( int (_FAR *f)(const T _FAR &, void _FAR *), void _FAR *args ) const + { + if( isEmpty() ) + return 0; + return data.lastThat( f, args, 0, current ); + } + + void flush( DeleteType dt = DefDelete ) + { + data.flush( delObj(dt), current ); + BI_StackAsVectorImp,T _FAR *>::flush(); + } + +}; + +template class _CLASSTYPE BI_IStackAsVectorIterator : + public BI_IVectorIteratorImp +{ + +public: + + BI_IStackAsVectorIterator( const BI_IStackAsVector _FAR & s ) : + BI_IVectorIteratorImp(s.data,0,s.current) + { + } + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* class BI_OStackAsVector */ +/* */ +/* Implements a stack of pointers to Object, */ +/* using a vector as the underlying implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +class _CLASSTYPE BI_OStackAsVector +{ + +public: + + friend class _CLASSTYPE BI_OStackAsVectorIterator; + + BI_OStackAsVector( unsigned max = DEFAULT_STACK_SIZE ) : + ostack( max ) + { + } + + + void push( Object _FAR *t ) + { + ostack.push( t ); + } + + Object _FAR *pop() + { + return (Object _FAR *)(ostack.pop()); + } + + Object _FAR *top() const + { + return (Object _FAR *)(ostack.top()); + } + + int isEmpty() const + { + return ostack.isEmpty(); + } + + int isFull() const + { + return ostack.isFull(); + } + + void forEach( void (_FAR*f)(Object _FAR &, void _FAR*), void _FAR*args ) + { + ostack.forEach( f, args ); + } + + Object _FAR *firstThat( int (_FAR *f)(const Object _FAR &, void _FAR *), + void _FAR *args + ) const + { + return ostack.firstThat( f, args ); + } + + Object _FAR *lastThat( int (_FAR *f)(const Object _FAR &, void _FAR *), + void _FAR *args + ) const + { + return ostack.lastThat( f, args ); + } + + void flush( TShouldDelete::DeleteType dt ) + { + ostack.flush( dt ); + } + + int getItemsInContainer() const + { + return ostack.getItemsInContainer(); + } + +private: + + BI_IStackAsVector ostack; + +}; + +class _CLASSTYPE BI_OStackAsVectorIterator : + public BI_IStackAsVectorIterator +{ + +public: + + BI_OStackAsVectorIterator( const BI_OStackAsVector _FAR & s ) : + BI_IStackAsVectorIterator(s.ostack) + { + } + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* class BI_TCStackAsVector */ +/* */ +/* Implements an Object stack, with the full semantics of */ +/* the BC 2.0 style stack, using a vector as the underlying */ +/* implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +class _CLASSTYPE BI_TCStackAsVector : public Container +{ + +public: + + friend class _CLASSTYPE BI_TCStackAsVectorIterator; + + BI_TCStackAsVector( unsigned lim = DEFAULT_STACK_SIZE ) : + stk(lim) + { + } + + void push( Object _FAR & o ) + { + stk.push( &o ); + } + + Object _FAR & pop() + { + return ptrToRef(stk.pop()); + } + + Object _FAR & top() const + { + return ptrToRef(stk.top()); + } + + virtual int isEmpty() const + { + return stk.isEmpty(); + } + + virtual countType getItemsInContainer() const + { + return stk.getItemsInContainer(); + } + + virtual void flush( DeleteType dt = DefDelete ) + { + stk.flush( dt ); + } + + virtual ContainerIterator _FAR & initIterator() const; + + virtual classType isA() const + { + return stackClass; + } + + virtual char _FAR *nameOf() const + { + return "BI_TCStackAsVector"; + } + + virtual void forEach( iterFuncType f, void _FAR *args ) + { + stk.forEach( f, args ); + } + + virtual Object _FAR & firstThat( condFuncType f, void _FAR *args ) const + { + return ptrToRef(stk.firstThat( f, args )); + } + + virtual Object _FAR & lastThat( condFuncType f, void _FAR *args ) const + { + return ptrToRef(stk.lastThat( f, args )); + } + +private: + + BI_OStackAsVector stk; + +}; + +class _CLASSTYPE BI_TCStackAsVectorIterator : public ContainerIterator +{ + +public: + + BI_TCStackAsVectorIterator( const BI_TCStackAsVector _FAR & s ) : + iter(s.stk) + { + } + + virtual operator int() + { + return int(iter); + } + + virtual Object _FAR & current() + { + return Object::ptrToRef(iter.current()); + } + + virtual Object _FAR & operator ++ ( int ) + { + return Object::ptrToRef(iter++); + } + + virtual Object _FAR & operator ++ () + { + return Object::ptrToRef(++iter); + } + + virtual void restart() + { + iter.restart(); + } + +private: + + BI_OStackAsVectorIterator iter; + +}; + +inline ContainerIterator _FAR & BI_TCStackAsVector::initIterator() const +{ + return *new BI_TCStackAsVectorIterator( *this ); +} + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_StackAsListImp */ +/* */ +/* Implements the fundamental stack operations, using a stack */ +/* as the underlying implementation. The type Stk specifies the */ +/* form of the stack, either a BI_StackImp or a */ +/* BI_IStackImp. The type T specifies the type of the */ +/* objects to be put on the stack. When using BI_StackImp, */ +/* T should be the same as T0. When using BI_IStackImp, T */ +/* should be of type pointer to T0. See BI_StackAsList and */ +/* BI_IStackAsList for examples. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_StackAsListImp +{ + +public: + + BI_StackAsListImp() : + itemsInContainer(0) + { + } + + void push( T t ) + { + data.add( t ); + itemsInContainer++; + } + + T pop() + { + T t = top(); + data.detach( t, 0 ); + itemsInContainer--; + return t; + } + + T top() const + { + PRECONDITION( !data.isEmpty() ); + return data.peekHead(); + } + + int isEmpty() const + { + return data.isEmpty(); + } + + int isFull() const + { + return 0; + } + + void flush( TShouldDelete::DeleteType = TShouldDelete::DefDelete ) + { + data.flush( 0 ); + itemsInContainer = 0; + } + + int getItemsInContainer() const + { + return itemsInContainer; + } + +protected: + + Stk data; + int itemsInContainer; + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_StackAsList */ +/* */ +/* Implements a stack of objects of type T, using a list as */ +/* the underlying implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_StackAsList : + public BI_StackAsListImp,T> +{ + +public: + + friend class _CLASSTYPE BI_StackAsListIterator; + + void forEach( void (_FAR *f)(T _FAR &, void _FAR *), void _FAR *args ) + { + data.forEach( f, args ); + } + + T _FAR *firstThat( int (_FAR *f)(const T _FAR &, void _FAR *), + void _FAR *args + ) const + { + return data.firstThat( f, args ); + } + + T _FAR *lastThat( int (_FAR *f)(const T _FAR &, void _FAR *), + void _FAR *args + ) const + { + return data.lastThat( f, args ); + } + +}; + +template class _CLASSTYPE BI_StackAsListIterator : + public BI_ListIteratorImp +{ + +public: + + BI_StackAsListIterator( const BI_StackAsList _FAR & s ) : + BI_ListIteratorImp(s.data) + { + } + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_IStackAsList */ +/* */ +/* Implements a stack of pointers to objects of type T, */ +/* using a linked list as the underlying implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_IStackAsList : + public BI_StackAsListImp,T _FAR *>, + public virtual TShouldDelete +{ + +public: + + friend class _CLASSTYPE BI_IStackAsListIterator; + + ~BI_IStackAsList() + { + flush(); + } + + void push( T _FAR *t ) + { + BI_StackAsListImp,T _FAR *>::push( t ); + } + + T _FAR *pop() + { + return (T _FAR *)BI_StackAsListImp,T _FAR *>::pop(); + } + + T _FAR *top() const + { + return (T _FAR *)BI_StackAsListImp,T _FAR *>::top(); + } + + void forEach( void (_FAR *f)(T _FAR &, void _FAR *), void _FAR *args ) + { + data.forEach( f, args ); + } + + T _FAR *firstThat( int (_FAR *f)(const T _FAR &, void _FAR *), + void _FAR *args + ) const + { + return data.firstThat( f, args ); + } + + T _FAR *lastThat( int (_FAR *f)(const T _FAR &, void _FAR *), + void _FAR *args + ) const + { + return data.lastThat( f, args ); + } + + void flush( DeleteType dt = DefDelete ) + { data.flush( delObj(dt) ); } +}; + +template class _CLASSTYPE BI_IStackAsListIterator : + public BI_IListIteratorImp +{ + +public: + + BI_IStackAsListIterator( const BI_IStackAsList _FAR & s ) : + BI_IListIteratorImp(s.data) + { + } + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* class BI_OStackAsList */ +/* */ +/* Implements a stack of pointers to Object, */ +/* using a list as the underlying implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +class _CLASSTYPE BI_OStackAsList +{ + +public: + + friend class _CLASSTYPE BI_OStackAsListIterator; + + void push( Object _FAR *t ) + { + ostack.push( t ); + } + + Object _FAR *pop() + { + return (Object _FAR *)(ostack.pop()); + } + + Object _FAR *top() const + { + return (Object _FAR *)(ostack.top()); + } + + int isEmpty() const + { + return ostack.isEmpty(); + } + + int isFull() const + { + return ostack.isFull(); + } + + void forEach( void (_FAR*f)(Object _FAR &, void _FAR*), void _FAR*args ) + { + ostack.forEach( f, args ); + } + + Object _FAR *firstThat( int (_FAR *f)(const Object _FAR &, void _FAR *), + void _FAR *args + ) const + { + return ostack.firstThat( f, args ); + } + + Object _FAR *lastThat( int (_FAR *f)(const Object _FAR &, void _FAR *), + void _FAR *args + ) const + { + return ostack.lastThat( f, args ); + } + + void flush( TShouldDelete::DeleteType dt = TShouldDelete::DefDelete ) + { + ostack.flush( dt ); + } + + int getItemsInContainer() const + { + return ostack.getItemsInContainer(); + } + +private: + + BI_IStackAsList ostack; + +}; + +class _CLASSTYPE BI_OStackAsListIterator : + public BI_IStackAsListIterator +{ + +public: + + BI_OStackAsListIterator( const BI_OStackAsList _FAR & s ) : + BI_IStackAsListIterator(s.ostack) + { + } + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* class BI_TCStackAsList */ +/* */ +/* Implements an Object stack, with the full semantics of */ +/* the BC 2.0 style stack, using a list as the underlying */ +/* implementation. */ +/* */ +/*------------------------------------------------------------------------*/ + +class _CLASSTYPE BI_TCStackAsList : public Container +{ + +public: + + friend class _CLASSTYPE BI_TCStackAsListIterator; + + void push( Object _FAR & o ) + { + stk.push( &o ); + } + + Object _FAR & pop() + { + return ptrToRef(stk.pop()); + } + + Object _FAR & top() const + { + return ptrToRef(stk.top()); + } + + virtual int isEmpty() const + { + return stk.isEmpty(); + } + + virtual countType getItemsInContainer() const + { + return stk.getItemsInContainer(); + } + + virtual void flush( DeleteType dt = DefDelete ) + { + stk.flush( dt ); + } + + virtual ContainerIterator _FAR & initIterator() const; + + virtual classType isA() const + { + return stackClass; + } + + virtual char _FAR * nameOf() const + { + return "BI_TCStackAsList"; + } + + virtual void forEach( iterFuncType f, void _FAR *args ) + { + stk.forEach( f, args ); + } + + virtual Object _FAR & firstThat( condFuncType f, void _FAR *args ) const + { + return ptrToRef(stk.firstThat( f, args )); + } + + virtual Object _FAR & lastThat( condFuncType f, void _FAR *args ) const + { + return ptrToRef(stk.lastThat( f, args )); + } + +private: + + BI_OStackAsList stk; + +}; + +class _CLASSTYPE BI_TCStackAsListIterator : public ContainerIterator +{ + +public: + + BI_TCStackAsListIterator( const BI_TCStackAsList _FAR & s ) : + iter(s.stk) + { + } + + virtual operator int() + { + return int(iter); + } + + virtual Object _FAR & current() + { + return Object::ptrToRef(iter.current()); + } + + virtual Object _FAR & operator ++ ( int ) + { + return Object::ptrToRef(iter++); + } + + virtual Object _FAR & operator ++ () + { + return Object::ptrToRef(++iter); + } + + virtual void restart() + { + iter.restart(); + } + +private: + + BI_OStackAsListIterator iter; + +}; + +inline ContainerIterator _FAR & BI_TCStackAsList::initIterator() const +{ + return *new BI_TCStackAsListIterator( *this ); +} + +#endif // __STACKS_H + diff --git a/M/TC/CLASSLIB/INCLUDE/STDTEMPL.H b/M/TC/CLASSLIB/INCLUDE/STDTEMPL.H new file mode 100644 index 0000000..5a9fa27 --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/STDTEMPL.H @@ -0,0 +1,54 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* STDTEMPL.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/* */ +/* Implements commonly used template functions min(), max(), range() */ +/* */ +/* T min( T, T ) returns the lesser of its arguments */ +/* */ +/* T min( T, T, T ) returns the least of its arguments */ +/* */ +/* T max( T, T ) returns the greater of its arguments */ +/* */ +/* T max( T, T, T ) returns the greatest of its arguments */ +/* */ +/* T range( T minVal, T maxVal, T val ) returns val if val is */ +/* between minVal and maxVal. If val is greater than maxVal, */ +/* returns maxVal. If val is less than minVal, returns minVal. */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __STDTEMPL_H ) +#define __STDTEMPL_H + +template inline T min( T t1, T t2 ) +{ + return t1>t2 ? t2 : t1; +} + +template inline T min( T t1, T t2, T t3 ) +{ + return t1>t2 ? (t2>t3 ? t3 : t2) : (t1>t3 ? t3 : t1 ); +} + +template inline T max( T t1, T t2 ) +{ + return t1>t2 ? t1 : t2; +} + +template inline T max( T t1, T t2, T t3 ) +{ + return t1>t2 ? (t1>t3 ? t1 : t3) : (t2>t3 ? t2 : t3); +} + +template inline T range( T minVal, T maxVal, T val ) +{ + return min( maxVal, max( minVal, val ) ); +} + +#endif // __STDTEMPL_H + diff --git a/M/TC/CLASSLIB/INCLUDE/STRNG.H b/M/TC/CLASSLIB/INCLUDE/STRNG.H new file mode 100644 index 0000000..f5a6f65 --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/STRNG.H @@ -0,0 +1,76 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* STRNG.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( _STRNG_H ) +#define _STRNG_H + +#if !defined( __CLSTYPES_H ) +#include +#endif // __CLSTYPES_H + +#if !defined( __SORTABLE_H ) +#include +#endif // __SORTABLE_H + +#if !defined( __STRING_H ) +#include +#endif // __STRING_H + +#if !defined( __CHECKS_H ) +#include +#endif // __CHECKS_H + +_CLASSDEF(ostream) +_CLASSDEF(String) + +class _CLASSTYPE String : public Sortable +{ + +public: + + String( const char _FAR * = "" ); + String( const String _FAR & ); + virtual ~String() + { + delete theString; + } + + + String& operator = ( const String _FAR & ); + operator const char _FAR *() const; + + virtual int isEqual( const Object _FAR & ) const; + virtual int isLessThan( const Object _FAR & ) const;\ + + virtual classType isA() const + { + return stringClass; + } + + virtual char _FAR *nameOf() const + { + return "String"; + } + + virtual hashValueType hashValue() const; + virtual void printOn( ostream _FAR & ) const; + +private: + + sizeType len; + char _FAR *theString; + +}; + +inline String::operator const char _FAR *() const +{ + return theString; +} + +#endif diff --git a/M/TC/CLASSLIB/INCLUDE/TIMER.H b/M/TC/CLASSLIB/INCLUDE/TIMER.H new file mode 100644 index 0000000..371fe30 --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/TIMER.H @@ -0,0 +1,72 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* TIMER.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __TIMER_H ) +#define __TIMER_H + +#if defined( _Windows ) && !defined( _BUILDRTLDLL ) +#error Timer not available for Windows +#endif + +#if !defined( __DEFS_H ) +#include <_defs.h> +#endif + + +class Timer +{ + +public: + + Timer(); + + void start(); + void stop(); + void reset(); + + int status(); + double time(); + + static double resolution(); + +private: + + static unsigned adjust; + static unsigned calibrate(); + int running; + + struct TIME + { + unsigned long dosCount; + unsigned timerCount; + }; + + TIME startTime; + + double time_; + +}; + +inline int Timer::status() +{ + return running; +} + +inline double Timer::time() +{ + return time_/1.E6; +} + +inline double Timer::resolution() +{ + return 839/1.E9; +} + +#endif // __TIMER_H + diff --git a/M/TC/CLASSLIB/INCLUDE/VECTIMP.H b/M/TC/CLASSLIB/INCLUDE/VECTIMP.H new file mode 100644 index 0000000..ecd2aa4 --- /dev/null +++ b/M/TC/CLASSLIB/INCLUDE/VECTIMP.H @@ -0,0 +1,992 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* VECTIMP.H */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __VECTIMP_H ) +#define __VECTIMP_H + +#if !defined( __CONTAIN_H ) +#include +#endif // __CONTAIN_H + +#if !defined( __LIMITS_H ) +#include +#endif // __LIMITS_H + +#if !defined( __CHECKS_H ) +#include +#endif // __CHECKS_H + +#if !defined( __STDTEMPL_H ) +#include +#endif // __STDTEMPL_H + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_VectorImp */ +/* */ +/* Implements a vector of objects of type T. Assumes that */ +/* T has meaningful copy semantics and a default constructor. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_VectorImp +{ + +public: + + friend class _CLASSTYPE BI_VectorIteratorImp; + + BI_VectorImp() : + data(0), + lim(0) + { + } + + BI_VectorImp( unsigned sz, unsigned = 0 ) : + data( new T[sz] ), + lim(sz) + { + } + + BI_VectorImp( const BI_VectorImp _FAR & ); + + const BI_VectorImp _FAR & operator = ( const BI_VectorImp _FAR & ); + + ~BI_VectorImp() + { + delete [] data; + } + + T _FAR & operator [] ( unsigned index ) const + { + PRECONDITION( lim > 0 && data != 0 && index < lim ); + return data[index]; + } + + unsigned limit() const + { + return lim; + } + + virtual unsigned top() const + { + return lim; + } + + void resize( unsigned, unsigned = 0 ); + + void flush( unsigned = 0, unsigned = UINT_MAX, unsigned = 0 ) {} + + void forEach( void (_FAR *f)(T _FAR &, void _FAR *), void _FAR *args ) + { + forEach( f, args, 0, lim ); + } + + void forEach( void (_FAR *)(T _FAR &, void _FAR *), + void _FAR *, + unsigned, + unsigned + ); + + T _FAR *firstThat( int (_FAR *)(const T _FAR &, void _FAR *), + void _FAR *, + unsigned, + unsigned + ) const; + + T _FAR *firstThat( int (_FAR *cond)(const T _FAR &, void _FAR *), + void _FAR *args + ) const + { + return firstThat( cond, args, 0, lim ); + } + + T _FAR *lastThat( int (_FAR *)(const T _FAR &, void _FAR *), + void _FAR *, + unsigned, + unsigned + ) const; + + T _FAR *lastThat( int (_FAR *cond)(const T _FAR &, void _FAR *), + void _FAR *args + ) const + { + return lastThat( cond, args, 0, lim ); + } + + virtual unsigned getDelta() const + { + return 0; + } + +protected: + + T _FAR * data; + unsigned lim; + + virtual void zero( unsigned, unsigned ) + { + } + +}; + +template +BI_VectorImp::BI_VectorImp( const BI_VectorImp _FAR & v ) : + data( new T[v.lim] ), + lim(v.lim) +{ + PRECONDITION( lim == 0 || (data != 0 && v.data != 0) ); + for( unsigned i = 0; i < lim; i++ ) + data[i] = v.data[i]; +} + +template +const BI_VectorImp _FAR & BI_VectorImp::operator = ( const BI_VectorImp _FAR & v ) +{ + if( data != v.data ) + { + delete [] data; + data = new T[v.lim]; + CHECK( data != 0 ); + lim = v.lim; + for( unsigned i = 0; i < lim; i++ ) + data[i] = v.data[i]; + } + return *this; +} + +inline unsigned nextDelta( unsigned sz, unsigned delta ) +{ + return (sz%delta) ? ((sz+delta)/delta)*delta : sz; +} + +template +void BI_VectorImp::resize( unsigned newSz, unsigned offset ) +{ + if( newSz <= lim || getDelta() == 0 ) + return; + unsigned sz = lim + nextDelta( newSz - lim, getDelta() ); + T _FAR *temp = new T[sz]; + unsigned last = min( sz-offset, lim ); + for( unsigned i = 0; i < last; i++ ) + temp[i+offset] = data[i]; + delete [] data; + data = temp; + lim = sz; + zero( last+offset, sz ); +} + +template +void BI_VectorImp::forEach( void (_FAR *f)( T _FAR &, void _FAR * ), + void _FAR *args, + unsigned start, + unsigned stop + ) +{ + for( unsigned cur = start; cur < stop; cur++ ) + f( data[cur], args ); +} + +template +T _FAR *BI_VectorImp::firstThat( int (_FAR *cond)( const T _FAR &, void _FAR * ), + void _FAR *args, + unsigned start, + unsigned stop + ) const +{ + for( unsigned cur = start; cur < stop; cur++ ) + if( cond( data[cur], args ) != 0 ) + return &data[cur]; + return 0; +} + +template +T _FAR *BI_VectorImp::lastThat( int (_FAR *cond)( const T _FAR &, void _FAR * ), + void _FAR *args, + unsigned start, + unsigned stop + ) const +{ + T _FAR *res = 0; + for( unsigned cur = start; cur < stop; cur++ ) + if( cond( data[cur], args ) != 0 ) + res = &data[cur]; + return res; +} + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_CVectorImp */ +/* */ +/* Implements a counted vector of objects of type T. Assumes that */ +/* T has meaningful copy semantics and a default constructor. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_CVectorImp : public BI_VectorImp +{ + +public: + + BI_CVectorImp() : + count_(0), + delta(0) + { + } + + BI_CVectorImp( unsigned sz, unsigned d = 0 ) : + BI_VectorImp( sz ), + count_(0), + delta(d) + { + } + + void add( T ); + void addAt( T, unsigned ); + void detach( T, int = 0 ); + void detach( unsigned, int = 0 ); + + int isEmpty() const + { + return count_ == 0; + } + + void forEach( void (_FAR *f)(T _FAR &, void _FAR *), void _FAR *args ) + { + forEach( f, args, 0, count_ ); + } + + void forEach( void (_FAR *func)(T _FAR &, void _FAR *), + void _FAR *args, + unsigned low, + unsigned high + ) + { + BI_VectorImp::forEach( func, args, low, high ); + } + + T _FAR *firstThat( int (_FAR *cond)(const T _FAR &, void _FAR *), + void _FAR *args + ) const + { + return firstThat( cond, args, 0, count_ ); + } + + T _FAR *firstThat( int (_FAR *cond)(const T _FAR &, void _FAR *), + void _FAR *args, + unsigned low, + unsigned high + ) const + { + return BI_VectorImp::firstThat( cond, args, low, high ); + } + + T _FAR *lastThat( int (_FAR *cond)(const T _FAR &, void _FAR *), + void _FAR *args + ) const + { + return lastThat( cond, args, 0, count_ ); + } + + T _FAR *lastThat( int (_FAR *cond)(const T _FAR &, void _FAR *), + void _FAR *args, + unsigned low, + unsigned high + ) const + { + return BI_VectorImp::lastThat( cond, args, low, high ); + } + + void flush( unsigned del = 0, + unsigned stop = UINT_MAX, + unsigned start = 0 + ) + { + BI_VectorImp::flush( del, stop, start ); count_ = 0; + } + + virtual unsigned find( T ) const; + + virtual unsigned top() const + { + return count_; + } + + unsigned count() const + { + return count_; + } + + virtual unsigned getDelta() const + { + return delta; + } + +protected: + + unsigned count_; + unsigned delta; + +private: + + virtual void removeData( T ) + { + } + +}; + +template void BI_CVectorImp::add( T t ) +{ + if( ++count_ > lim ) + resize( count_ ); + data[count_-1] = t; +} + +template void BI_CVectorImp::addAt( T t, unsigned loc ) +{ + if( loc >= lim ) + resize( loc+1 ); + data[loc] = t; +} + +template void BI_CVectorImp::detach( T t, int del ) +{ + detach( find(t), del ); +} + +template void BI_CVectorImp::detach( unsigned loc, int del ) +{ + if( loc >= lim ) + return; + if( del ) + removeData( data[loc] ); + if( loc >= count_ ) + { + zero( loc, loc+1 ); // removing an element that's not + return; // in the counted portion + } + count_--; + for( unsigned cur = loc; cur < count_; cur++ ) + data[cur] = data[cur+1]; + zero( count_, count_+1 ); +} + +template unsigned BI_CVectorImp::find( T t ) const +{ + if( count_ != 0 ) + { + for( unsigned loc = 0; loc < count_; loc++ ) + if( data[loc] == t ) + return loc; + } + return UINT_MAX; +} + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_SVectorImp */ +/* */ +/* Implements a sorted vector of objects of type T. Assumes that */ +/* T has meaningful copy semantics, a meaningful < operator, */ +/* and a default constructor. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_SVectorImp : public BI_CVectorImp +{ + +public: + + BI_SVectorImp() + { + } + + BI_SVectorImp( unsigned sz, unsigned d = 0 ) : + BI_CVectorImp( sz, d ) + { + } + + void add( T ); + + virtual unsigned find( T ) const; + +}; + +template void BI_SVectorImp::add( T t ) +{ + unsigned loc = count_++; + if( count_ > lim ) + resize( count_ ); + while( loc > 0 && t < data[loc-1] ) + { + data[loc] = data[loc-1]; + loc--; + } + data[loc] = t; +} + +template unsigned BI_SVectorImp::find( T t ) const +{ + unsigned lower = 0; + unsigned upper = count_-1; + if( count_ != 0 ) + { + while( lower < upper ) + { + unsigned middle = (lower+upper)/2; + if( data[middle] == t ) + return middle; + if( data[middle] < t ) + lower = middle+1; + else + upper = middle-1; + } + } + if( lower == upper && data[lower] == t ) + return lower; + else + return UINT_MAX; +} + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_VectorIteratorImp */ +/* */ +/* Implements a vector iterator. This iterator works with any direct */ +/* vector. For indirect vectors, see BI_IVectorIteratorImp. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_VectorIteratorImp +{ + +public: + + BI_VectorIteratorImp( const BI_VectorImp _FAR &v ) + { + vect = &v; + restart(0,v.limit()); + } + + BI_VectorIteratorImp( const BI_VectorImp _FAR &v, + unsigned start, + unsigned stop + ) + { + vect = &v; + restart( start, stop ); + } + + + operator int() + { + return cur < upper; + } + + T current() + { + return (cur < upper) ? (*vect)[cur] : (*vect)[upper-1]; + } + + T operator ++ ( int ) + { + if( cur >= upper ) + return (*vect)[upper-1]; + else + return (*vect)[cur++]; + } + + T operator ++ () + { + if( cur < upper ) + cur++; + if( cur >= upper ) + return (*vect)[upper-1]; + else + return (*vect)[cur]; + } + + void restart() + { + restart(lower,upper); + } + + void restart( unsigned start, unsigned stop ) + { + cur = lower = start; + upper = stop; + } + +private: + + const BI_VectorImp _FAR *vect; + unsigned cur; + unsigned lower, upper; + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_InternalIVectorImp */ +/* */ +/* Implements a vector of pointers to objects of type T. */ +/* This is implemented through the form of BI_VectorImp specified by */ +/* Vect. Since pointers always have meaningful copy semantics, */ +/* this class can handle any type of object. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_InternalIVectorImp : + public Vect +{ + +public: + + BI_InternalIVectorImp( unsigned sz, unsigned d = 0 ) : + Vect( sz, d ) + { + zero( 0, sz ); + } + + ~BI_InternalIVectorImp() + { + flush(); + } + + T _FAR * _FAR & operator [] ( unsigned index ) + { + PRECONDITION( lim == 0 || data != 0 && index < lim ); + return (T _FAR *)(data[index]); + } + + T _FAR * _FAR & operator [] ( unsigned index ) const + { + PRECONDITION( lim > 0 && data != 0 && index < lim ); + return (T _FAR *)(data[index]); + } + + void flush( unsigned = 0, unsigned = UINT_MAX, unsigned = 0 ); + + void forEach( void (_FAR *f)(T _FAR &, void _FAR *), void _FAR *args ) + { + forEach( f, args, 0, lim ); + } + + void forEach( void (_FAR *)(T _FAR &, void _FAR *), + void _FAR *, + unsigned, + unsigned + ); + + T _FAR *firstThat( int (_FAR *cond)(const T _FAR &, void _FAR *), + void _FAR *args + ) const + { + return firstThat( cond, args, 0, lim ); + } + + T _FAR *firstThat( int (_FAR *)(const T _FAR &, void _FAR *), + void _FAR *, + unsigned, + unsigned + ) const; + + T _FAR *lastThat( int (_FAR *cond)(const T _FAR &, void _FAR *), + void _FAR *args + ) const + { + return lastThat( cond, args, 0, lim ); + } + + T _FAR *lastThat( int (_FAR *)(const T _FAR &, void _FAR *), + void _FAR *, + unsigned, + unsigned + ) const; + + virtual void zero( unsigned, unsigned ); + +private: + + static void delObj( T _FAR &, void _FAR * ); + +}; + +template +void BI_InternalIVectorImp::delObj( T _FAR &tRef, void _FAR * ) +{ + delete &tRef; +} + +template +void BI_InternalIVectorImp::flush( + unsigned del, + unsigned upr, + unsigned lwr + ) +{ + upr = min( upr, limit() ); + Vect::flush( del, upr, lwr ); + if( del ) + forEach( delObj, 0, lwr, upr ); + zero( lwr, upr ); +} + +template +void BI_InternalIVectorImp::forEach( void (_FAR *f)( T _FAR &, void _FAR * ), + void _FAR *args, + unsigned start, + unsigned stop + ) +{ + for( unsigned cur = start; cur < stop; cur++ ) + if( data[cur] != 0 ) + f( *(T _FAR *)(data[cur]), args ); +} + +template +T _FAR *BI_InternalIVectorImp::firstThat( int (_FAR *cond)( const T _FAR &, void _FAR * ), + void _FAR *args, + unsigned start, + unsigned stop + ) const +{ + for( unsigned cur = start; cur < stop; cur++ ) + if( data[cur] != 0 && cond( *(T _FAR *)(data[cur]), args ) != 0 ) + return (T _FAR *)data[cur]; + return 0; +} + +template +T _FAR *BI_InternalIVectorImp::lastThat( int (_FAR *cond)( const T _FAR &, void _FAR * ), + void _FAR *args, + unsigned start, + unsigned stop + ) const +{ + T _FAR *res = 0; + for( unsigned cur = start; cur < stop; cur++ ) + if( data[cur] != 0 && cond( *(T _FAR *)(data[cur]), args ) != 0 ) + res = (T _FAR *)data[cur]; + return res; +} + +template +void BI_InternalIVectorImp::zero( unsigned lwr, unsigned upr ) +{ + for( unsigned i = lwr; i < min( limit(), upr ); i++ ) + data[i] = 0; +} + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_InternalICVectorImp */ +/* */ +/* Implements a counted vector of pointers to objects of type T. */ +/* This is implemented through the form of BI_VectorImp specified by */ +/* Vect. Since pointers always have meaningful copy semantics, */ +/* this class can handle any type of object. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_InternalICVectorImp : + public BI_InternalIVectorImp +{ + +public: + + BI_InternalICVectorImp( unsigned sz, unsigned d = 0 ) : + BI_InternalIVectorImp( sz, d ) + { + } + + void add( T _FAR *t ); + + unsigned find( T _FAR *t ) const + { + PRECONDITION( t->isSortable() ); + return find( (void _FAR *)t ); + } + +protected: + + virtual unsigned find( void _FAR * ) const = 0; + +private: + + virtual void removeData( void _FAR *t ) + { + delete (T _FAR *)t; + } + +}; + +template +void BI_InternalICVectorImp::add( T _FAR *t ) +{ + while( count_ < limit() && (*this)[count_] != 0 ) + count_++; + Vect::add(t); +} + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_InternalISVectorImp */ +/* */ +/* Implements a counted vector of pointers to objects of type T. */ +/* This is implemented through the form of BI_VectorImp specified by */ +/* Vect. Since pointers always have meaningful copy semantics, */ +/* this class can handle any type of object. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_InternalISVectorImp : + public BI_InternalICVectorImp +{ + +public: + + BI_InternalISVectorImp( unsigned sz, unsigned d = 0 ) : + BI_InternalICVectorImp( sz, d ) + { + } + + void add( T _FAR *t ); + + unsigned find( T _FAR *t ) const + { + return BI_InternalICVectorImp::find( (void _FAR *)t ); + } + +protected: + + virtual unsigned find( void _FAR * ) const = 0; + +}; + +template +void BI_InternalISVectorImp::add( T _FAR *t ) +{ + unsigned loc = count_++; + if( count_ > lim ) + resize( count_ ); + while( loc > 0 && *t < *(T _FAR *)(*this)[loc-1] ) + { + (*this)[loc] = (*this)[loc-1]; + loc--; + } + (*this)[loc] = t; +} + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_IVectorImp */ +/* */ +/* Implements a vector of pointers to objects of type T. */ +/* This is implemented through the template BI_InternalIVectorImp. */ +/* Since pointers always have meaningful copy semantics, this class */ +/* can handle any type of object. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_IVectorImp : + public BI_InternalIVectorImp > +{ + +public: + + BI_IVectorImp( unsigned sz ) : + BI_InternalIVectorImp >(sz) + { + } + + +}; + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_ICVectorImp */ +/* */ +/* Implements a counted vector of pointers to objects of type T. */ +/* This is implemented through the template BI_InternalICVectorImp. */ +/* Since pointers always have meaningful copy semantics, this class */ +/* can handle any type of object. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_ICVectorImp : + public BI_InternalICVectorImp > +{ + +public: + + BI_ICVectorImp( unsigned sz, unsigned d = 0 ) : + BI_InternalICVectorImp >(sz) + { + delta = d; + } + + unsigned find( T _FAR *t ) const + { + return find( (void _FAR *)t ); + } + +protected: + + virtual unsigned find( void _FAR * ) const; + +}; + +template unsigned BI_ICVectorImp::find( void _FAR *t ) const +{ + if( limit() != 0 ) + { + for( unsigned loc = 0; loc < limit(); loc++ ) + if( data[loc] && + *(const T _FAR *)(data[loc]) == *(const T _FAR *)t + ) + return loc; + } + return UINT_MAX; +} + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_ISVectorImp */ +/* */ +/* Implements a sorted vector of pointers to objects of type T. */ +/* This is implemented through the template BI_InternalICVectorImp. */ +/* Since pointers always have meaningful copy semantics, this class */ +/* can handle any type of object. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_ISVectorImp : + public BI_InternalICVectorImp > +{ + +public: + + BI_ISVectorImp( unsigned sz, unsigned d = 0 ) : + BI_InternalICVectorImp >(sz) + { + delta = d; + } + + unsigned find( T _FAR *t ) const + { + return find( (void _FAR *)t ); + } + +protected: + + virtual unsigned find( void _FAR * ) const; + +}; + +template unsigned BI_ISVectorImp::find( void _FAR *t ) const +{ + unsigned lower = 0; + unsigned upper = count_-1; + if( count_ != 0 ) + { + while( lower < upper ) + { + unsigned middle = (lower+upper)/2; + if( *(const T _FAR *)(data[middle]) == *(const T _FAR *)t ) + return middle; + if( *(const T _FAR *)(data[middle]) < *(const T _FAR *)t ) + lower = middle+1; + else + upper = middle-1; + } + } + if( lower == upper && *(const T _FAR*)(data[lower]) == *(const T _FAR*)t ) + return lower; + else + return UINT_MAX; +} + +/*------------------------------------------------------------------------*/ +/* */ +/* template class BI_IVectorIteratorImp */ +/* */ +/* Implements a vector iterator. This iterator works with any indirect */ +/* vector. For direct vectors, see BI_VectorIteratorImp. */ +/* */ +/*------------------------------------------------------------------------*/ + +template class _CLASSTYPE BI_IVectorIteratorImp : + public BI_VectorIteratorImp +{ + +public: + + BI_IVectorIteratorImp( const BI_VectorImp _FAR &v ) : + BI_VectorIteratorImp(v) + { + bump(); + } + + BI_IVectorIteratorImp( const BI_VectorImp _FAR &v, + unsigned l, unsigned u + ) : + BI_VectorIteratorImp(v,l,u) + { + bump(); + } + + T _FAR *current() + { + return (T _FAR *)BI_VectorIteratorImp::current(); + } + + T _FAR *operator ++ ( int ); + T _FAR *operator ++ (); + + void restart() + { + BI_VectorIteratorImp::restart(); + bump(); + } + + void restart( unsigned start, unsigned stop ) + { + BI_VectorIteratorImp::restart( start, stop ); + bump(); + } + +private: + + void bump(); + +}; + +template T _FAR * BI_IVectorIteratorImp::operator ++ () +{ + BI_VectorIteratorImp::operator++(); + bump(); + return (T _FAR *)current(); +} + +template T _FAR * BI_IVectorIteratorImp::operator ++ ( int ) +{ + void *temp = current(); + BI_VectorIteratorImp::operator++(1); + bump(); + return (T _FAR *)temp; +} + +template void BI_IVectorIteratorImp::bump() +{ + while( *this != 0 && current() == 0 ) + BI_VectorIteratorImp::operator++(); +} + +#endif // __VECTIMP_H diff --git a/M/TC/CLASSLIB/LIB/TCLASDBS.LIB b/M/TC/CLASSLIB/LIB/TCLASDBS.LIB new file mode 100644 index 0000000..16f08df Binary files /dev/null and b/M/TC/CLASSLIB/LIB/TCLASDBS.LIB differ diff --git a/M/TC/CLASSLIB/LIB/TCLASSS.LIB b/M/TC/CLASSLIB/LIB/TCLASSS.LIB new file mode 100644 index 0000000..5baa75d Binary files /dev/null and b/M/TC/CLASSLIB/LIB/TCLASSS.LIB differ diff --git a/M/TC/CLASSLIB/OBJS/DL/BIDSDBL.PRJ b/M/TC/CLASSLIB/OBJS/DL/BIDSDBL.PRJ new file mode 100644 index 0000000..4b207a6 Binary files /dev/null and b/M/TC/CLASSLIB/OBJS/DL/BIDSDBL.PRJ differ diff --git a/M/TC/CLASSLIB/OBJS/DL/TCLASDBL.PRJ b/M/TC/CLASSLIB/OBJS/DL/TCLASDBL.PRJ new file mode 100644 index 0000000..58e16c3 Binary files /dev/null and b/M/TC/CLASSLIB/OBJS/DL/TCLASDBL.PRJ differ diff --git a/M/TC/CLASSLIB/OBJS/DS/BIDSDBS.PRJ b/M/TC/CLASSLIB/OBJS/DS/BIDSDBS.PRJ new file mode 100644 index 0000000..02e1cfb Binary files /dev/null and b/M/TC/CLASSLIB/OBJS/DS/BIDSDBS.PRJ differ diff --git a/M/TC/CLASSLIB/OBJS/DS/TCLASDBS.PRJ b/M/TC/CLASSLIB/OBJS/DS/TCLASDBS.PRJ new file mode 100644 index 0000000..37e0ebf Binary files /dev/null and b/M/TC/CLASSLIB/OBJS/DS/TCLASDBS.PRJ differ diff --git a/M/TC/CLASSLIB/OBJS/L/BIDSL.PRJ b/M/TC/CLASSLIB/OBJS/L/BIDSL.PRJ new file mode 100644 index 0000000..5305971 Binary files /dev/null and b/M/TC/CLASSLIB/OBJS/L/BIDSL.PRJ differ diff --git a/M/TC/CLASSLIB/OBJS/L/TCLASSL.PRJ b/M/TC/CLASSLIB/OBJS/L/TCLASSL.PRJ new file mode 100644 index 0000000..a7b5cdc Binary files /dev/null and b/M/TC/CLASSLIB/OBJS/L/TCLASSL.PRJ differ diff --git a/M/TC/CLASSLIB/OBJS/S/BIDSS.PRJ b/M/TC/CLASSLIB/OBJS/S/BIDSS.PRJ new file mode 100644 index 0000000..e1c54ce Binary files /dev/null and b/M/TC/CLASSLIB/OBJS/S/BIDSS.PRJ differ diff --git a/M/TC/CLASSLIB/OBJS/S/TCLASSS.PRJ b/M/TC/CLASSLIB/OBJS/S/TCLASSS.PRJ new file mode 100644 index 0000000..4e5e75e Binary files /dev/null and b/M/TC/CLASSLIB/OBJS/S/TCLASSS.PRJ differ diff --git a/M/TC/CLASSLIB/SOURCE/ABSTARRY.CPP b/M/TC/CLASSLIB/SOURCE/ABSTARRY.CPP new file mode 100644 index 0000000..1d2018a --- /dev/null +++ b/M/TC/CLASSLIB/SOURCE/ABSTARRY.CPP @@ -0,0 +1,272 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* ABSTARRY.CPP */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( CHECKS_H ) +#include +#endif // CHECKS_H + +#if !defined( __ABSTARRY_H ) +#include +#endif // __ABSTARRY_H + +#ifndef __IOSTREAM_H +#include +#endif + +#ifndef __STDLIB_H +#include +#endif + +#if !defined( __MEM_H ) +#include +#endif // __MEM_H + +AbstractArray::AbstractArray( int anUpper, int aLower, sizeType aDelta ) +{ + PRECONDITION( anUpper >= aLower ); + lastElementIndex = aLower - 1; + lowerbound = aLower; + upperbound = anUpper; + delta = aDelta; + + theArray = new Object *[ arraySize() ]; + if( theArray == 0 ) + ClassLib_error(__ENOMEM); + + for( int i = 0; i < arraySize(); i++ ) + { + theArray[ i ] = ZERO; + } +} + +AbstractArray::~AbstractArray() +{ + PRECONDITION( theArray != 0 ); + if( ownsElements() ) + for( int i = 0; i < arraySize(); i++ ) + if( theArray[ i ] != ZERO ) + delete theArray[ i ]; + delete [] theArray; +} + +void AbstractArray::detach( Object& toDetach, DeleteType dt ) +{ + detach( find( toDetach ), dt ); +} + +void AbstractArray::detach( int atIndex, DeleteType dt ) +{ + PRECONDITION( atIndex >= lowerbound && + atIndex <= upperbound && theArray != 0 + ); + + if( ptrAt(atIndex) != ZERO ) + { + if( delObj(dt) ) + delete ptrAt(atIndex); + itemsInContainer--; + } + removeEntry(atIndex); + if( atIndex <= lastElementIndex ) + lastElementIndex--; + CHECK( itemsInContainer != UINT_MAX ); +} + +void AbstractArray::flush( DeleteType dt ) +{ + if( delObj(dt) ) + for( unsigned i = 0; i <= zeroBase(upperbound); i++ ) + if( theArray[i] != ZERO ) + delete theArray[i]; + + for( unsigned i = 0; i <= zeroBase(upperbound); i++ ) + theArray[i] = ZERO; + + itemsInContainer = 0; + lastElementIndex = lowerbound-1; +} + +inline unsigned nextDelta( unsigned sz, unsigned delta ) +{ + return (sz%delta) ? ((sz+delta)/delta)*delta : sz; +} + +void AbstractArray::reallocate( sizeType newSize ) +{ + PRECONDITION( newSize > arraySize() ); + if( delta == 0 ) + ClassLib_error(__EEXPANDFS); + + sizeType adjustedSize = arraySize() + + nextDelta( newSize - arraySize(), delta ); + Object **newArray = new Object *[ adjustedSize ]; + if( newArray == 0 ) + ClassLib_error(__ENOMEM); + + memcpy( newArray, theArray, arraySize() * sizeof( theArray[0] ) ); + + for( int i = arraySize(); i < adjustedSize; i++ ) + newArray[i] = ZERO; + + delete [] theArray; + theArray = newArray; + upperbound = adjustedSize + lowerbound - 1; +} + +void AbstractArray::setData( int loc, Object *data ) +{ + PRECONDITION( loc >= lowerbound && loc <= upperbound ); + theArray[ zeroBase(loc) ] = data; +} + +void AbstractArray::insertEntry( int loc ) +{ + PRECONDITION( loc >= lowerbound && loc <= upperbound ); + memmove( theArray + zeroBase(loc) + 1, + theArray + zeroBase(loc), + (upperbound - loc)*sizeof( theArray[0] ) + ); +} + +void AbstractArray::removeEntry( int loc ) +{ + if( loc >= lastElementIndex ) + theArray[zeroBase(loc)] = ZERO; + else + squeezeEntry( zeroBase(loc) ); +} + +void AbstractArray::squeezeEntry( int squeezePoint ) +{ + PRECONDITION( squeezePoint >= 0 && + squeezePoint <= zeroBase(lastElementIndex) + ); + + memmove( theArray + squeezePoint, + theArray + squeezePoint + 1, + (zeroBase(lastElementIndex)-squeezePoint)*sizeof( theArray[0] ) + ); + theArray[zeroBase(lastElementIndex)] = ZERO; +} + +int AbstractArray::find( const Object& o ) +{ + if( o == NOOBJECT ) + return INT_MIN; + + for( int index = 0; index < arraySize(); index++ ) + if( *(theArray[index]) == o ) + return boundBase(index); + return INT_MIN; +} + +inline int isZero( const Object *o ) +{ + return o == &NOOBJECT; +} + +int AbstractArray::isEqual( const Object& testObject ) const +{ + PRECONDITION( isA() == testObject.isA() ); + AbstractArray& test = (AbstractArray&)testObject; + if( lowerbound != test.lowerbound || upperbound != test.upperbound ) + return 0; + + for( int i = 0; i < arraySize(); i++ ) + { + if( isZero(theArray[i]) != isZero(test.theArray[i]) ) + return 0; + if( *(theArray[i]) != *(test.theArray[i]) ) + return 0; + } + return 1; +} + +ContainerIterator& AbstractArray::initIterator() const +{ + return *( (ContainerIterator *)new ArrayIterator( *this ) ); +} + +void AbstractArray::printContentsOn( ostream& outputStream ) const +{ + ContainerIterator& printIterator = initIterator(); + printHeader( outputStream ); + while( printIterator != 0 ) + { + Object& arrayObject = printIterator++; + if( arrayObject != NOOBJECT ) + { + arrayObject.printOn( outputStream ); + if( printIterator != 0 ) + printSeparator( outputStream ); + else + break; + } + } + printTrailer( outputStream ); + delete &printIterator; +} + +ArrayIterator::ArrayIterator( const AbstractArray& toIterate ) : + beingIterated( toIterate ), + currentIndex( toIterate.lowerbound ) +{ + restart(); +} + +ArrayIterator::~ArrayIterator() +{ +} + +ArrayIterator::operator int() +{ + return currentIndex <= beingIterated.upperbound; +} + +Object& ArrayIterator::current() +{ + if ( currentIndex <= beingIterated.upperbound ) + return beingIterated.objectAt( currentIndex ); + else + return NOOBJECT; +} + +void ArrayIterator::scan() +{ + if( currentIndex > beingIterated.upperbound ) + return; + + while( ++currentIndex <= beingIterated.upperbound && + beingIterated.objectAt( currentIndex ) == NOOBJECT ) + ; // empty body +} + +void ArrayIterator::restart() +{ + currentIndex = beingIterated.lowerbound; + if( beingIterated.objectAt( currentIndex ) == NOOBJECT ) + scan(); +} + +Object& ArrayIterator::operator ++ ( int ) +{ + Object& res = (currentIndex <= beingIterated.upperbound) ? + beingIterated.objectAt( currentIndex ) : NOOBJECT; + + scan(); + + return res; +} + +Object& ArrayIterator::operator ++ () +{ + scan(); + return (currentIndex <= beingIterated.upperbound) ? + beingIterated.objectAt( currentIndex ) : NOOBJECT; +} diff --git a/M/TC/CLASSLIB/SOURCE/ARRAY.CPP b/M/TC/CLASSLIB/SOURCE/ARRAY.CPP new file mode 100644 index 0000000..ed7c41b --- /dev/null +++ b/M/TC/CLASSLIB/SOURCE/ARRAY.CPP @@ -0,0 +1,46 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* ARRAY.CPP */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( CHECKS_H ) +#include +#endif // CHECKS_H + +#if !defined( __ARRAY_H ) +#include +#endif // __ARRAY_H + +void Array::add( Object& toAdd ) +{ + lastElementIndex++; + while( ptrAt( lastElementIndex ) != ZERO && + lastElementIndex <= upperbound + ) + lastElementIndex++; + + if( lastElementIndex > upperbound ) + reallocate( lastElementIndex - lowerbound + 1 ); + + setData( lastElementIndex, &toAdd ); + itemsInContainer++; + CHECK( itemsInContainer > 0 ); +} + +void Array::addAt( Object& toAdd, int atIndex ) +{ + PRECONDITION( atIndex >= lowerbound ); + if( atIndex > upperbound ) + reallocate( atIndex - lowerbound + 1 ); + + if( ptrAt( atIndex ) != ZERO ) + { + delete ptrAt( atIndex ); + } + + setData( atIndex, &toAdd ); +} diff --git a/M/TC/CLASSLIB/SOURCE/ASSOC.CPP b/M/TC/CLASSLIB/SOURCE/ASSOC.CPP new file mode 100644 index 0000000..76f3100 --- /dev/null +++ b/M/TC/CLASSLIB/SOURCE/ASSOC.CPP @@ -0,0 +1,45 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* ASSOC.CPP */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( CHECKS_H ) +#include +#endif // CHECKS_H + +#if !defined( __ASSOC_H ) +#include +#endif // __ASSOC_H + +#ifndef __IOSTREAM_H +#include +#endif + +Association::~Association() +{ + if( !ownsElements() ) + return; + if( &aKey != ZERO ) + delete &aKey; + if( &aValue != ZERO ) + delete &aValue; +} + +void Association::printOn( ostream& outputStream ) const +{ + outputStream << " " << nameOf() << " { "; + aKey.printOn( outputStream ); + outputStream << ", "; + aValue.printOn( outputStream ); + outputStream << " }\n"; +} + +int Association::isEqual( const Object& toObject ) const +{ + return aKey == ( (Association&)toObject ).key(); +} + diff --git a/M/TC/CLASSLIB/SOURCE/BABSTARY.CPP b/M/TC/CLASSLIB/SOURCE/BABSTARY.CPP new file mode 100644 index 0000000..e712caf --- /dev/null +++ b/M/TC/CLASSLIB/SOURCE/BABSTARY.CPP @@ -0,0 +1,87 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* BABSTARY.CPP */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( TEMPLATES ) +#define TEMPLATES +#endif + +#if !defined( CHECKS_H ) +#include +#endif // CHECKS_H + +#if !defined( __ABSTARRY_H ) +#include +#endif // __ABSTARRY_H + +#ifndef __IOSTREAM_H +#include +#endif + +#ifndef __STDLIB_H +#include +#endif + +#if !defined( __MEM_H ) +#include +#endif // __MEM_H + +inline int isZero( const Object& o ) +{ + return o == NOOBJECT; +} + +int AbstractArray::isEqual( const Object& obj ) const +{ + PRECONDITION( isA() == obj.isA() ); + AbstractArray& test = (AbstractArray&)obj; + if( lowerBound() != test.lowerBound() || + upperBound() != test.upperBound() + ) + return 0; + + ContainerIterator& iter1 = initIterator(); + ContainerIterator& iter2 = test.initIterator(); + while( iter1 && iter2 ) + if( iter1.current() != iter2.current() ) + { + delete &iter1; + delete &iter2; + return 0; + } + else + { + iter1++; + iter2++; + } + + delete &iter1; + delete &iter2; + return 1; +} + +void AbstractArray::printContentsOn( ostream& outputStream ) const +{ + ContainerIterator& printIterator = initIterator(); + printHeader( outputStream ); + while( printIterator != 0 ) + { + Object& arrayObject = printIterator++; + if( arrayObject != NOOBJECT ) + { + arrayObject.printOn( outputStream ); + if( printIterator != 0 ) + printSeparator( outputStream ); + else + break; + } + } + printTrailer( outputStream ); + delete &printIterator; +} + diff --git a/M/TC/CLASSLIB/SOURCE/BDICT.CPP b/M/TC/CLASSLIB/SOURCE/BDICT.CPP new file mode 100644 index 0000000..b2ebc66 --- /dev/null +++ b/M/TC/CLASSLIB/SOURCE/BDICT.CPP @@ -0,0 +1,46 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* BDICT.CPP */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( TEMPLATES ) +#define TEMPLATES +#endif + +#if !defined( __ASSOC_H ) +#include +#endif // __ASSOC_H + +#if !defined( __DICT_H ) +#include +#endif // __DICT_H + +#if !defined( __IOSTREAM_H ) +#include +#endif // __IOSTREAM_H + +#if !defined( __CLSTYPES_H ) +#include +#endif // __CLSTYPES_H + +void Dictionary::add( Object& objectToAdd ) +{ + if( !objectToAdd.isAssociation() ) + ClassLib_error( __ENOTASSOC ); + else + Set::add( objectToAdd ); +} + +Association& Dictionary::lookup( const Object& toLookUp ) const +{ + Association toFind( (Object&)toLookUp, NOOBJECT ); + toFind.ownsElements(0); + + Association& found = (Association&)findMember( toFind ); + return found; +} + diff --git a/M/TC/CLASSLIB/SOURCE/BSORTARY.CPP b/M/TC/CLASSLIB/SOURCE/BSORTARY.CPP new file mode 100644 index 0000000..cb9f95f --- /dev/null +++ b/M/TC/CLASSLIB/SOURCE/BSORTARY.CPP @@ -0,0 +1,62 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* BSORTARY.CPP */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( TEMPLATES ) +#define TEMPLATES +#endif + +#if !defined( __SORTABLE_H ) +#include +#endif // __SORTABLE_H + +#if !defined( __ARRAYS_H ) +#include +#endif // __ARRAYS_H + +void BI_ISObjectVector::add( Object _FAR *o ) +{ + if( count_ >= lim ) + resize( count_+1 ); + unsigned loc = count_++; + while( loc > 0 && *(Sortable _FAR *)o < *(Sortable _FAR *)(data[loc-1]) ) + { + data[loc] = data[loc-1]; + loc--; + } + data[loc] = o; +} + +unsigned BI_ISObjectVector::find( void _FAR * obj ) const +{ + unsigned lower = 0; + unsigned upper = count_-1; + if( count_ != 0 ) + { + while( lower < upper && upper != UINT_MAX ) + { + unsigned middle = (lower+upper)/2; + if( *(const Sortable _FAR *)(data[middle]) == + *(const Sortable _FAR *)obj + ) + return middle; + if( *(const Sortable _FAR *)(data[middle]) < + *(const Sortable _FAR *)obj + ) + lower = middle+1; + else + upper = middle-1; + } + } + if( lower == upper && + *(const Sortable _FAR *)(data[lower]) == *(const Sortable _FAR *)obj + ) + return lower; + else + return UINT_MAX; +} diff --git a/M/TC/CLASSLIB/SOURCE/BTREE.CPP b/M/TC/CLASSLIB/SOURCE/BTREE.CPP new file mode 100644 index 0000000..6310881 --- /dev/null +++ b/M/TC/CLASSLIB/SOURCE/BTREE.CPP @@ -0,0 +1,497 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* BTREE.CPP */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( CHECKS_H ) +#include +#endif // CHECKS_H + +#if !defined( __BTREE_H ) +#include +#endif // __BTREE_H + +#ifndef __STDLIB_H +#include +#endif + +#ifndef __IOSTREAM_H +#include +#endif + +/* + +Implementation notes: + +This implements B-trees with several refinements. Most of them can be found +in Knuth Vol 3, but some were developed to adapt to restrictions imposed +by C++. First, a restatement of Knuth's properties that a B-tree must +satisfy, assuming we make the enhancement he suggests in the paragraph +at the bottom of page 476. Instead of storing null pointers to non-existent +nodes (which Knuth calls the leaves) we utilize the space to store keys. +Therefore, what Knuth calls level (l-1) is the bottom of our tree, and +we call the nodes at this level LeafNodes. Other nodes are called InnerNodes. +The other enhancement we have adopted is in the paragraph at the bottom of +page 477: overflow control. + +The following are modifications of Knuth's properties on page 478: + +i) Every InnerNode has at most Order keys, and at most Order+1 sub-trees. +ii) Every LeafNode has at most 2*(Order+1) keys. +iii)An InnerNode with k keys has k+1 sub-trees. +iv) Every InnerNode that is not the root has at least InnerLowWaterMark keys. +v) Every LeafNode that is not the root has at least LeafLowWaterMark keys. +vi) If the root is a LeafNode, it has at least one key. +vii)If the root is an InnerNode, it has at least one key and two sub-trees. +viii)All LeafNodes are the same distance from the root as all the other + LeafNodes. +ix) For InnerNode n with key n[i].key, then sub-tree n[i-1].tree contains + all keys <= n[i].key, and sub-tree n[i].tree contains all keys >= n[i].key. +x) Order is at least 3. + +The values of InnerLowWaterMark and LeafLowWaterMark may actually be set +by the user when the tree is initialized, but currently they are set +automatically to: + InnerLowWaterMark = ceiling(Order/2) + LeafLowWaterMark = Order - 1 + +If the tree is only filled, then all the nodes will be at least 2/3 full. +They will almost all be exactly 2/3 full if the elements are added to the +tree in order (either increasing or decreasing). [Knuth says McCreight's +experiments showed almost 100% memory utilization. I don't see how that +can be given the algorithms that Knuth gives. McCreight must have used +a different scheme for balancing. [ No, he used a different scheme for +splitting: he did a two-way split instead of the three way split as we do +here. Which means that McCreight does better on insertion of ordered data, +but we should do better on insertion of random data.]] + +It must also be noted that B-trees were designed for DISK access algorithms, +not necessarily in-memory sorting, as we intend it to be used here. However, +if the order is kept small (< 6?) any inefficiency is negligible for +in-memory sorting. Knuth points out that balanced trees are actually +preferable for memory sorting. I'm not sure that I believe this, but +it's interesting. Also, deleting elements from balanced binary trees, being +beyond the scope of Knuth's book (p. 465), is beyond my scope. B-trees +are good enough. + + +A B-tree is declared to be of a certain ORDER (4 by default). This number +determines the number of keys contained in any interior node of the tree. +Each interior node will contain ORDER keys, and therefore ORDER+1 pointers +to sub-trees. The keys are numbered and indexed 1 to ORDER while the +pointers are numbered and indexed 0 to ORDER. The 0th ptr points to the +sub-tree of all elements that are less than key[1]. Ptr[1] points to the +sub-tree that contains all the elements greater than key[1] and less than +key[2]. etc. The array of pointers and keys is allocated as ORDER+1 +pairs of keys and nodes, meaning that one key field (key[0]) is not used +and therefore wasted. Given that the number of interior nodes is +small, that this waste allows fewer cases of special code, and that it +is useful in certain of the methods, it was felt to be a worthwhile waste. + +The size of the exterior nodes (leaf nodes) does not need to be related to +the size of the interior nodes at all. Since leaf nodes contain only +keys, they may be as large or small as we like independent of the size +of the interior nodes. For no particular reason other than it seems like +a good idea, we will allocate 2*(ORDER+1) keys in each leaf node, and they +will be numbered and indexed from 0 to 2*ORDER+1. It does have the advantage +of keeping the size of the leaf and interior arrays the same, so that if we +find allocation and de-allocation of these arrays expensive, we can modify +their allocation to use a garbage ring, or something. + +Both of these numbers will be run-time constants associated with each tree +(each tree at run-time can be of a different order). The variable `order' +is the order of the tree, and the inclusive upper limit on the indices of +the keys in the interior nodes. The variable `order2' is the inclusive +upper limit on the indices of the leaf nodes, and is designed + (1) to keep the sizes of the two kinds of nodes the same; + (2) to keep the expressions involving the arrays of keys looking + somewhat the same: lower limit upper limit + for inner nodes: 1 order + for leaf nodes: 0 order2 + Remember that index 0 of the inner nodes is special. + +Currently, order2 = 2*(order+1). + + picture: (also see Knuth Vol 3 pg 478) + + +--+--+--+--+--+--... + | | | | | | + parent--->| | | | + | | | | + +*-+*-+*-+--+--+--... + | | | + +----+ | +-----+ + | +-----+ | + V | V + +----------+ | +----------+ + | | | | | + this->| | | | |<--sib + +----------+ | +----------+ + V + data + +It is conceptually VERY convenient to think of the data as being the +very first element of the sib node. Any primitive that tells sib to +perform some action on n nodes should include this `hidden' element. +For InnerNodes, the hidden element has (physical) index 0 in the array, +and in LeafNodes, the hidden element has (virtual) index -1 in the array. +Therefore, there are two `size' primitives for nodes: +Psize - the physical size: how many elements are contained in the + array in the node. +Vsize - the `virtual' size; if the node is pointed to by + element 0 of the parent node, then Vsize == Psize; + otherwise the element in the parent item that points to this + node `belongs' to this node, and Vsize == Psize+1; + +Parent nodes are always InnerNodes. + +These are the primitive operations on Nodes: + +append(elt) - adds an element to the end of the array of elements in a + node. It must never be called where appending the element + would fill the node. +split() - divide a node in two, and create two new nodes. +splitWith(sib) - create a third node between this node and the sib node, + divvying up the elements of their arrays. +pushLeft(n) - move n elements into the left sibling +pushRight(n) - move n elements into the right sibling +balanceWithRight() - even up the number of elements in the two nodes. +balanceWithLeft() - ditto + + +To allow this implementation of btrees to also be an implementation of +sorted arrays/lists, the overhead is included to allow O(log n) access +of elements by their rank (`give me the 5th largest element'). +Therefore, each Item keeps track of the number of keys in and below it +in the tree (remember, each item's tree is all keys to the RIGHT of the +item's own key). + +[ [ < 0 1 2 3 > 4 < 5 6 7 > 8 < 9 10 11 12 > ] 13 [ < 14 15 16 > 17 < 18 19 20 > ] ] + 4 1 1 1 1 4 1 1 1 5 1 1 1 1 7 3 1 1 1 4 1 1 1 +*/ + +//====== Btree functions ======== + +void Btree::finishInit( int O ) +{ + if( O < 3 ) + ClassLib_error( __EORDER3 ); + ownsElements( 0 ); + root = 0; + Order = O; + Order2 = 2 * (O+1); + Leaf_MaxIndex = Order2 - 1; // item[0..Order2-1] + Inner_MaxIndex = Order; // item[1..Order] + // + // the low water marks trigger an exploration for balancing + // or merging nodes. + // When the size of a node falls below X, then it must be possible to + // either balance this node with another node, or it must be possible + // to merge this node with another node. + // This can be guaranteed only if (this->size() < (maxSize()-1)/2). + // + // + Leaf_LowWaterMark = ((Leaf_MaxIndex+1 // == maxSize() + )-1) / 2 // satisfies the above + - 1; // because we compare + // lowwatermark with last + + Inner_LowWaterMark = (Order-1) / 2; +} + +Btree::Btree(int O) : itemsInContainer(0) +{ + finishInit(O); +} + +Btree::~Btree(void) +{ + if( root != 0 ) + delete root; +} + +void Btree::flush( DeleteType dt ) +{ + int oldValue = ownsElements(); + ownsElements( delObj(dt) ); + if( root != 0 ) + delete root; + itemsInContainer = 0; + root = 0; + ownsElements( oldValue ); +} + +int Btree::hasMember( Object& o ) const +{ + if( !o.isSortable() ) + ClassLib_error( __ENOTSORT ); + if( root == 0 ) + return 0; + else + { + Node* loc; + int idx; + return root->found(&(Sortable&)o, &loc, &idx) != NOOBJECT; + } +} + +long Btree::rank( const Object& o ) const +{ + if( !o.isSortable() ) + ClassLib_error( __ENOTSORT ); + if( root == 0 ) + return -1; + else + return root->findRank(&(Sortable&)o); +} + +Object& Btree::findMember( Object& o ) const +{ + if( !o.isSortable() ) + ClassLib_error(__ENOTSORT); + if( root == 0 ) + return NOOBJECT; + else + { + Node* loc; + int idx; + return root->found(&(Sortable&)o, &loc, &idx); + } +} + +void Btree::printOn( ostream& out ) const +{ + if( root == 0 ) + out << "" ; + else + root->printOn(out); +} + +extern "C" void __ErrorMessage( const char * ); + +int Btree::isEqual( const Object& obj ) const +{ + if( obj.isA() == btreeClass ) + { + __ErrorMessage( "Btree isEqual not implemented\n" ); + exit(1); + } + return 0; + + // two btrees are equal only if they have the same number of + // elements, and they are all equal. The structure of the tree + // itself doesn't enter into it. +} + + +long Btree::i_add( const Object& o ) +{ + long r; + if( !o.isSortable() ) + ClassLib_error( __ENOTSORT ); + if( root == 0 ) + { + root = new LeafNode( 0, &(Sortable&)o, this ); + CHECK( root != 0 ); + incrNofKeys(); + r = 0; + } + else + { + Node* loc; + int idx; + if( root->found(&(Sortable&)o, &loc, &idx) != NOOBJECT ) + { + // loc and idx are set to either where the object + // was found, or where it should go in the Btree. + // Nothing is here now, but later we might give the user + // the ability to declare a B-tree as `unique elements only', + // in which case we would handle an exception here. + // cerr << "Multiple entry warning\n"; + } + else + { + CHECK( loc->isLeaf ); + } + if( loc->isLeaf ) + { + if( loc->parent == 0 ) + r = idx; + else + r = idx + loc->parent->findRank_bu( loc ); + } + else + { + InnerNode *iloc = (InnerNode*)loc; + r = iloc->findRank_bu( iloc->getTree( idx ) ); + } + loc->add( &(Sortable&)o, idx ); + } + CHECK( r == rank( (Sortable&)o ) || (Sortable&)o == (*this)[r] ); + return r; +} + +void Btree::add( Object& o ) +{ + if( !o.isSortable() ) + ClassLib_error( __ENOTSORT ); + if (root == 0) + { + root = new LeafNode( 0, &(Sortable&)o, this ); + CHECK( root != 0 ); + incrNofKeys(); + } + else + { + Node* loc; + int idx; + if( root->found(&(Sortable&)o, &loc, &idx) != NOOBJECT ) + { + // loc and idx are set to either where the object + // was found, or where it should go in the Btree. + // Nothing is here now, but later we might give the user + // the ability to declare a B-tree as `unique elements only', + // in which case we would handle an exception here. + } + loc->add( &(Sortable&)o, idx ); + } +} + +void Btree::detach( Object& o, DeleteType dt ) +{ + if( !o.isSortable() ) + ClassLib_error(__ENOTSORT); + if( root == 0 ) + return; + + Node* loc; + int idx; + Object* obj = &(root->found( &(Sortable&)o, &loc, &idx )); + if( *obj == NOOBJECT ) + return; + loc->remove( idx ); + if( delObj(dt) ) + delete obj; +} + +void Btree::rootIsFull() +{ + // the root of the tree is full; create an InnerNode that + // points to it, and then inform the InnerNode that it is full. + Node* oldroot = root; + root = new InnerNode( 0, this, oldroot ); + CHECK( root != 0 ); + oldroot->split(); +} + +void Btree::rootIsEmpty() +{ + if( root->isLeaf ) + { + LeafNode* lroot = (LeafNode*)root; + CHECK( lroot->Psize() == 0 ); + delete lroot; + root = 0; + } + else { + InnerNode* iroot = (InnerNode*)root; + CHECK(iroot->Psize() == 0); + root = iroot->getTree(0); + root->parent = 0; + delete iroot; + } +} + +Item::Item() +{ + nofKeysInTree = 0; + tree = 0; + key = 0; +} + +Item::Item(Node* n, Sortable* o) +{ + nofKeysInTree = n->nofKeys()+1; + tree = n; + key = o; +} + +Item::Item(Sortable* o, Node* n) +{ + nofKeysInTree = n->nofKeys()+1; + tree = n; + key = o; +} + +Item::~Item() +{ +} + +// +//====== Node functions ====== +// + +Node::Node(int isleaf, InnerNode* P, Btree* T) +{ + // nofElts = 0; + last = -1; + /*dbg*/debugKey = 1017; // !*!*!* not for distribution + isLeaf = isleaf; + parent = P; + if( P == 0 ) + { + CHECK( T != 0 ); + tree = T; + } + else + tree = P->tree; +} + +Node::~Node() +{ +} + +// +//===== BtreeIterator methods ===== +// + +void BtreeIterator::restart() +{ + index = 0; +} + +Object& BtreeIterator::operator++() +{ + return beingIterated[++index]; +} + +Object& BtreeIterator::operator++( int ) +{ + return beingIterated[index++]; +} + +Object& BtreeIterator::current() +{ + return beingIterated[index]; +} + + +ContainerIterator& +Btree::initIterator() const +{ + return *( (ContainerIterator *)new BtreeIterator( *this ) ); +} + +BtreeIterator::~BtreeIterator() +{ +} + + +BtreeIterator::operator int() +{ + return index < beingIterated.getItemsInContainer(); +} diff --git a/M/TC/CLASSLIB/SOURCE/BTREEINN.CPP b/M/TC/CLASSLIB/SOURCE/BTREEINN.CPP new file mode 100644 index 0000000..ba37602 --- /dev/null +++ b/M/TC/CLASSLIB/SOURCE/BTREEINN.CPP @@ -0,0 +1,710 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* BTREEINN.CPP */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( CHECKS_H ) +#include +#endif // CHECKS_H + +#if !defined( __BTREE_H ) +#include +#endif // __BTREE_H + +#ifndef __STDLIB_H +#include +#endif + +#ifndef __IOSTREAM_H +#include +#endif + +//====== InnerNode functions ====== + +InnerNode::InnerNode(InnerNode* P, Btree* T) : Node(0,P,T) +{ + item = new Item[maxIndex()+1]; + if( item == 0 ) + ClassLib_error( __ENOMEMIA ); +} + +InnerNode::InnerNode(InnerNode* Parent, Btree* Tree, Node* oldroot) + : Node(0, Parent, Tree) +{ + // called only by Btree to initialize the InnerNode that is + // about to become the root. + item = new Item[maxIndex()+1]; + if( item == 0 ) + ClassLib_error( __ENOMEMIA ); + append( 0, oldroot ); +} + +InnerNode::~InnerNode() +{ + if( last > 0 ) + delete item[0].tree; + for( int i = 1; i <= last; i++ ) + { + delete item[i].tree; + if( tree->ownsElements() ) + delete item[i].key; + } + delete [] item; +} + +// for quick (human reader) lookup, functions are in alphabetical order + +void InnerNode::add( Sortable *obj, int index ) +{ + // this is called only from Btree::add() + PRECONDITION( index >= 1 ); + LeafNode* ln = getTree(index-1)->lastLeafNode(); + ln->add( obj, ln->last+1 ); +} + +void InnerNode::addElt( Item& itm, int at ) +{ + PRECONDITION( 0 <= at && at <= last+1 ); + PRECONDITION( last < maxIndex() ); + for( int i = last+1; i > at ; i-- ) + getItem(i) = getItem(i-1); + setItem( at, itm ); + last++; +} + +void InnerNode::addElt( int at, Sortable* k, Node* t) +{ + Item newitem( k, t ); + addElt( newitem, at ); +} + +void InnerNode::add( Item& itm, int at ) +{ + addElt( itm, at ); + if( isFull() ) + informParent(); +} + +void InnerNode::add( int at, Sortable* k, Node* t) +{ + Item newitem( k, t ); + add( newitem, at ); +} + +void InnerNode::appendFrom( InnerNode* src, int start, int stop ) +{ + // this should never create a full node + // that is, it is not used anywhere where THIS could possibly be + // near full. + if( start > stop ) + return; + PRECONDITION( 0 <= start && start <= src->last ); + PRECONDITION( 0 <= stop && stop <= src->last ); + PRECONDITION( last + stop - start + 1 < maxIndex() ); // full-node check + for( int i = start; i <= stop; i++ ) + setItem( ++last, src->getItem(i) ); +} + +void InnerNode::append( Sortable* D, Node* N ) +{ + // never called from anywhere where it might fill up THIS + PRECONDITION( last < maxIndex() ); + setItem( ++last, D, N ); +} + +void InnerNode::append( Item& itm ) +{ + PRECONDITION( last < maxIndex() ); + setItem( ++last, itm ); +} + +void InnerNode::balanceWithLeft( InnerNode* leftsib, int pidx ) +{ + // THIS has more than LEFTSIB; move some item from THIS to LEFTSIB. + // PIDX is the index of the parent item that will change when keys + // are moved. + PRECONDITION( Vsize() >= leftsib->Psize() ); + PRECONDITION( parent->getTree(pidx) == this ); + int newThisSize = (Vsize() + leftsib->Psize())/2; + int noFromThis = Psize() - newThisSize; + pushLeft( noFromThis, leftsib, pidx ); +} + +void InnerNode::balanceWithRight( InnerNode* rightsib, int pidx ) +{ + // THIS has more than RIGHTSIB; move some items from THIS to RIGHTSIB. + // PIDX is the index of the parent item that will change when keys + // are moved. + PRECONDITION( Psize() >= rightsib->Vsize() ); + PRECONDITION( parent->getTree(pidx) == rightsib ); + int newThisSize = (Psize() + rightsib->Vsize())/2; + int noFromThis = Psize() - newThisSize; + pushRight( noFromThis, rightsib, pidx ); + +} + +void InnerNode::balanceWith( InnerNode* rightsib, int pindx ) +{ + // PINDX is the index of the parent item whose key will change when + // keys are shifted from one InnerNode to the other. + if( Psize() < rightsib->Vsize() ) + rightsib->balanceWithLeft( this, pindx ); + else + balanceWithRight( rightsib, pindx ); +} + +void InnerNode::decrNofKeys( Node *that ) +{ + // THAT is a child of THIS that has just shrunk by 1 + int i = indexOf( that ); + item[i].nofKeysInTree--; + if( parent != 0 ) + parent->decrNofKeys( this ); + else + tree->decrNofKeys(); +} + +long InnerNode::findRank( Sortable* what ) const +{ + // recursively look for WHAT starting in the current node + + if ( *what < *getKey(1) ) + return getTree(0)->findRank(what); + long sum = getNofKeys(0); + for( int i = 1; i < last; i++ ) + { + if( *what == *getKey(i) ) + return sum; + sum++; + if( *what < *getKey(i+1) ) + return sum + getTree(i)->findRank(what); + sum += getNofKeys(i); + } + if( *what == *getKey(last) ) + return sum; + sum++; + // *what > getKey(last), so recurse on last item.tree + return sum + getTree(last)->findRank(what); +} + +long InnerNode::findRank_bu( const Node *that ) const +{ + // findRank_bu is findRank in reverse. + // whereas findRank looks for the object and computes the rank + // along the way while walking DOWN the tree, findRank_bu already + // knows where the object is and has to walk UP the tree from the + // object to compute the rank. + int L = indexOf( that ); + long sum = 0; + for( int i = 0; i < L; i++ ) + sum += getNofKeys(i); + return sum + L + (parent == 0 ? 0 : parent->findRank_bu( this )); +} + +LeafNode*InnerNode::firstLeafNode() +{ + return getTree(0)->firstLeafNode(); +} + +Object& InnerNode::found(Sortable* what, Node** which, int* where ) +{ + // recursively look for WHAT starting in the current node + for( int i = 1 ; i <= last; i++ ) + { + if( *getKey(i) == *what ) + { + // then could go in either item[i].tree or item[i-1].tree + // should go in one with the most room, but that's kinda + // hard to calculate, so we'll stick it in item[i].tree + *which = this; + *where = i; + return *getKey(i); + } + if( *getKey(i) > *what ) + return getTree(i-1)->found(what, which, where); + } + // *what > *(*this)[last].key, so recurse on last item.tree + return getTree(last)->found( what, which, where ); +} + +void InnerNode::incrNofKeys( Node *that ) +{ + // THAT is a child of THIS that has just grown by 1 + int i = indexOf( that ); + item[i].nofKeysInTree++; + if( parent != 0 ) + parent->incrNofKeys( this ); + else + tree->incrNofKeys(); +} + +#pragma warn -rvl + +int InnerNode::indexOf( const Node *that ) const +{ + // returns a number in the range 0 to this->last + // 0 is returned if THAT == tree[0] + for( int i = 0; i <= last; i++ ) + if( getTree(i) == that ) + return i; + CHECK( 0 ); +} + +#pragma warn .rvl + +void InnerNode::informParent() +{ + if( parent == 0 ) + { + // then this is the root of the tree and nees to be split + // inform the btree. + PRECONDITION( tree->root == this ); + tree->rootIsFull(); + } + else + parent->isFull( this ); +} + +void InnerNode::isFull(Node *that) +{ + // the child node THAT is full. We will either redistribute elements + // or create a new node and then redistribute. + // In an attempt to minimize the number of splits, we adopt the following + // strategy: + // * redistribute if possible + // * if not possible, then split with a sibling + if( that->isLeaf ) + { + LeafNode *leaf = (LeafNode *)that; + LeafNode *left, *right; + // split LEAF only if both sibling nodes are full. + int leafidx = indexOf(leaf); + int hasRightSib = (leafidx < last) + && ((right=(LeafNode*)getTree(leafidx+1)) + != 0); + int hasLeftSib = (leafidx > 0) + && ((left=(LeafNode*)getTree(leafidx-1)) + != 0); + int rightSibFull = (hasRightSib && right->isAlmostFull()); + int leftSibFull = (hasLeftSib && left->isAlmostFull()); + if( rightSibFull ) + { + if( leftSibFull ) + { + // both full, so pick one to split with + left->splitWith( leaf, leafidx ); + } + else if( hasLeftSib ) + { + // left sib not full, so balance with it + leaf->balanceWithLeft( left, leafidx ); + } + else + { + // there is no left sibling, so split with right + leaf->splitWith( right, leafidx+1 ); + } + } + else if( hasRightSib ) + { + // right sib not full, so balance with it + leaf->balanceWithRight( right, leafidx+1 ); + } + else if( leftSibFull ) + { + // no right sib, and left sib is full, so split with it + left->splitWith( leaf, leafidx ); + } + else if( hasLeftSib ) + { + // left sib not full so balance with it + leaf->balanceWithLeft( left, leafidx ); + } + else + { + // neither a left or right sib; should never happen + CHECK(0); + } + } + else { + InnerNode *inner = (InnerNode *)that; + // split INNER only if both sibling nodes are full. + int inneridx = indexOf(inner); + InnerNode *left, *right; + int hasRightSib = (inneridx < last) + && ((right=(InnerNode*)getTree(inneridx+1)) + != 0); + int hasLeftSib = (inneridx > 0) + && ((left=(InnerNode*)getTree(inneridx-1)) + != 0); + int rightSibFull = (hasRightSib && right->isAlmostFull()); + int leftSibFull = (hasLeftSib && left->isAlmostFull()); + if( rightSibFull ) + { + if( leftSibFull ) + { + left->splitWith( inner, inneridx ); + } + else if( hasLeftSib ) + { + inner->balanceWithLeft( left, inneridx ); + } + else + { + // there is no left sibling + inner->splitWith(right, inneridx+1); + } + } + else if( hasRightSib ) + { + inner->balanceWithRight( right, inneridx+1 ); + } + else if( leftSibFull ) + { + left->splitWith( inner, inneridx ); + } + else if( hasLeftSib ) + { + inner->balanceWithLeft( left, inneridx ); + } + else { + CHECK(0); + } + } +} + +void InnerNode::isLow( Node *that ) +{ + // the child node THAT is <= half full. We will either redistribute + // elements between children, or THAT will be merged with another child. + // In an attempt to minimize the number of mergers, we adopt the following + // strategy: + // * redistribute if possible + // * if not possible, then merge with a sibling + if( that->isLeaf ) + { + LeafNode *leaf = (LeafNode *)that; + LeafNode *left, *right; + // split LEAF only if both sibling nodes are full. + int leafidx = indexOf(leaf); + int hasRightSib = (leafidx < last) + && ((right=(LeafNode*)getTree(leafidx+1)) + != 0); + int hasLeftSib = (leafidx > 0) + && ((left=(LeafNode*)getTree(leafidx-1)) + != 0); + if( hasRightSib + && (leaf->Psize() + right->Vsize()) >= leaf->maxPsize()) + { + // then cannot merge, + // and balancing this and rightsib will leave them both + // more than half full + leaf->balanceWith( right, leafidx+1 ); + } + else if( hasLeftSib + && (leaf->Vsize() + left->Psize()) >= leaf->maxPsize()) + { + // ditto + left->balanceWith( leaf, leafidx ); + } + else if( hasLeftSib ) + { + // then they should be merged + left->mergeWithRight( leaf, leafidx ); + } + else if( hasRightSib ) + { + leaf->mergeWithRight( right, leafidx+1 ); + } + else + { + CHECK(0); // should never happen + } + } + else + { + InnerNode *inner = (InnerNode *)that; + // + int inneridx = indexOf(inner); + InnerNode *left, *right; + int hasRightSib = (inneridx < last) + && ((right=(InnerNode*)getTree(inneridx+1)) + != 0); + int hasLeftSib = (inneridx > 0) + && ((left=(InnerNode*)getTree(inneridx-1)) + != 0); + if( hasRightSib + && (inner->Psize() + right->Vsize()) >= inner->maxPsize()) + { + // cannot merge + inner->balanceWith( right, inneridx+1 ); + } + else if( hasLeftSib + && (inner->Vsize() + left->Psize()) >= inner->maxPsize()) + { + // cannot merge + left->balanceWith( inner, inneridx ); + } + else if( hasLeftSib ) + { + left->mergeWithRight( inner, inneridx ); + } + else if( hasRightSib ) + { + inner->mergeWithRight( right, inneridx+1 ); + } + else + { + CHECK(0); + } + } +} + +LeafNode*InnerNode::lastLeafNode() +{ + return getTree(last)->lastLeafNode(); +} + +void InnerNode::mergeWithRight( InnerNode* rightsib, int pidx ) +{ + PRECONDITION( Psize() + rightsib->Vsize() < maxIndex() ); + if( rightsib->Psize() > 0 ) + rightsib->pushLeft( rightsib->Psize(), this, pidx ); + rightsib->setKey( 0, parent->getKey( pidx ) ); + appendFrom( rightsib, 0, 0 ); + parent->incNofKeys( pidx-1, rightsib->getNofKeys(0)+1 ); + parent->removeItem( pidx ); + delete rightsib; +} + +long InnerNode::nofKeys() const +{ + long sum = 0; + for( int i = 0; i <= last; i++) + sum += getNofKeys(i); + return sum + Psize(); +} + +Object& InnerNode::operator[]( long idx ) const +{ + for( int j=0; j <= last; j++ ) + { + long R; + if( idx < (R = getNofKeys(j)) ) + return (*getTree(j))[idx]; + if( idx == R ) + { + if( j == last ) + return NOOBJECT; + else + return *getKey(j+1); + } + idx -= R+1; // +1 because of the key in the node + } + return NOOBJECT; +} + +void InnerNode::printOn(ostream& out) const +{ + out << " [ " << "/" << getNofKeys(0) << *getTree(0); + for( int i = 1; i <= last; i++ ) + { + //*!*!*!*!* not for distribution! + CHECK( getTree(i)->debugKey == 1017 ); + if( i > 1 ) + CHECK( *getKey(i-1) <= *getKey(i) ); + out << *getKey(i) << "/" << getNofKeys(i) << *getTree(i); + } + out << " ] "; +} + +void InnerNode::pushLeft( int noFromThis, InnerNode* leftsib, int pidx ) +{ + // noFromThis==1 => moves the parent item into the leftsib, + // and the first item in this's array into the parent item + PRECONDITION( parent->getTree(pidx) == this ); + PRECONDITION( noFromThis > 0 && noFromThis <= Psize() ); + PRECONDITION( noFromThis + leftsib->Psize() < maxPsize() ); + setKey( 0, parent->getKey(pidx) ); // makes appendFrom's job easier + leftsib->appendFrom( this, 0, noFromThis-1 ); + shiftLeft( noFromThis ); + parent->setKey( pidx, getKey(0) ); + parent->setNofKeys( pidx-1, leftsib->nofKeys() ); + parent->setNofKeys( pidx, nofKeys() ); +} + +void InnerNode::pushRight(int noFromThis, InnerNode* rightsib, int pidx) +{ + PRECONDITION( noFromThis > 0 && noFromThis <= Psize() ); + PRECONDITION( noFromThis + rightsib->Psize() < rightsib->maxPsize() ); + PRECONDITION( parent->getTree(pidx) == rightsib ); + // + // The operation is three steps: + // Step I. Make room for the incoming keys in RIGHTSIB. + // Step II. Move the items from THIS into RIGHTSIB. + // Step III.Update the length of THIS. + // + // Step I.: make space for noFromThis items + // + int start = last - noFromThis + 1; + int tgt, src; + tgt = rightsib->last + noFromThis; + src = rightsib->last; + rightsib->last = tgt; + rightsib->setKey( 0, parent->getKey( pidx ) ); incNofKeys(0); + while( src >= 0 ) + { + // do this kind of assignment on InnerNode Items only when + // the parent fields + // of the moved items do not change, as they don't here. + // Otherwise, use setItem so the parents are updated appropriately. + rightsib->getItem(tgt--) = rightsib->getItem(src--); + } + + // Step II.Move the items from THIS into RIGHTSIB + for( int i = last; i >= start; i-- ) + { + // this is the kind of assignment to use when parents change + rightsib->setItem(tgt--, getItem(i)); + } + parent->setKey( pidx, rightsib->getKey(0) ); + decNofKeys(0); + CHECK( tgt == -1 ); + + // Step III. + last -= noFromThis; + + // Step VI. update nofKeys + parent->setNofKeys( pidx-1, nofKeys() ); + parent->setNofKeys( pidx, rightsib->nofKeys() ); +} + +void InnerNode::remove( int index ) +{ + PRECONDITION( index >= 1 && index <= last ); + LeafNode* lf = getTree(index)->firstLeafNode(); + setKey( index, lf->item[0] ); + lf->removeItem(0); +} + +void InnerNode::removeItem( int index ) +{ + PRECONDITION( index >= 1 && index <= last ); + for( int to = index; to < last; to++ ) + item[to] = item[to+1]; + last--; + if( isLow() ) + { + if( parent == 0 ) + { + // then this is the root; when only one child, make the child + // the root + if( Psize() == 0 ) + tree->rootIsEmpty(); + } + else + parent->isLow( this ); + } +} + +void InnerNode::shiftLeft( int cnt ) +{ + if( cnt <= 0 ) + return; + for( int i = cnt; i <= last; i++ ) + getItem(i-cnt) = getItem(i); + last -= cnt; +} + +void InnerNode::split() +{ + // this function is called only when THIS is the only descendent + // of the root node, and THIS needs to be split. + // assumes that idx of THIS in Parent is 0. + InnerNode* newnode = new InnerNode( parent ); + CHECK( newnode != 0 ); + parent->append( getKey(last), newnode ); + newnode->appendFrom( this, last, last ); + last--; + parent->incNofKeys( 1, newnode->getNofKeys(0) ); + parent->decNofKeys( 0, newnode->getNofKeys(0) ); + balanceWithRight( newnode, 1 ); +} + +void +InnerNode::splitWith( InnerNode *rightsib, int keyidx ) +{ + // THIS and SIB are too full; create a NEWnODE, and balance + // the number of keys between the three of them. + // + // picture: (also see Knuth Vol 3 pg 478) + // keyidx keyidx+1 + // +--+--+--+--+--+--... + // | | | | | | + // parent--->| | | | + // | | | | + // +*-+*-+*-+--+--+--... + // | | | + // +----+ | +-----+ + // | +-----+ | + // V | V + // +----------+ | +----------+ + // | | | | | + // this->| | | | |<--sib + // +----------+ | +----------+ + // V + // data + // + // keyidx is the index of where the sibling is, and where the + // newly created node will be recorded (sibling will be moved to + // keyidx+1) + // + PRECONDITION( keyidx > 0 && keyidx <= parent->last ); + // I would like to be able to prove that the following assertion + // is ALWAYS true, but it is beyond my time limits. If this assertion + // ever comes up False, then the code to make it so must be inserted + // here. + // assert(parent->getKey(keyidx) == rightsib->getKey(0)); + // During debugging, this came up False, so + rightsib->setKey(0,parent->getKey(keyidx)); + int nofKeys = Psize() + rightsib->Vsize(); + int newSizeThis = nofKeys / 3; + int newSizeNew = (nofKeys - newSizeThis) / 2; + int newSizeSib = (nofKeys - newSizeThis - newSizeNew); + int noFromThis = Psize() - newSizeThis; + int noFromSib = rightsib->Vsize() - newSizeSib; + // because of their smaller size, this InnerNode may not have to + // give up any elements to the new node. I.e., noFromThis == 0. + // This will not happen for LeafNodes. + // We handle this by pulling an item from the rightsib. + CHECK( noFromThis >= 0 ); + CHECK( noFromSib >= 1 ); + InnerNode* newNode = new InnerNode(parent); + CHECK( newNode != 0 ); + if( noFromThis > 0 ) + { + newNode->append( getItem(last) ); + parent->addElt( keyidx, getKey(last--), newNode ); + if( noFromThis > 2 ) + this->pushRight( noFromThis-1, newNode, keyidx ); + rightsib->pushLeft( noFromSib, newNode, keyidx+1 ); + } + else + { + // pull an element from the rightsib + newNode->append( rightsib->getItem(0) ); + parent->addElt( keyidx+1, rightsib->getKey(1), rightsib); + rightsib->shiftLeft(1); + parent->setTree( keyidx, newNode ); + rightsib->pushLeft( noFromSib-1, newNode, keyidx+1 ); + } + parent->setNofKeys( keyidx-1, this->nofKeys() ); + parent->setNofKeys( keyidx, newNode->nofKeys() ); + parent->setNofKeys( keyidx+1, rightsib->nofKeys() ); + if( parent->isFull() ) + parent->informParent(); +} diff --git a/M/TC/CLASSLIB/SOURCE/BTREELFN.CPP b/M/TC/CLASSLIB/SOURCE/BTREELFN.CPP new file mode 100644 index 0000000..210eb4c --- /dev/null +++ b/M/TC/CLASSLIB/SOURCE/BTREELFN.CPP @@ -0,0 +1,359 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* BTREELFN.CPP */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( CHECKS_H ) +#include +#endif // CHECKS_H + +#if !defined( __BTREE_H ) +#include +#endif // __BTREE_H + +#ifndef __STDLIB_H +#include +#endif + +#ifndef __IOSTREAM_H +#include +#endif + +//====== LeafNode functions ======= + +LeafNode::LeafNode(InnerNode* P, Sortable* O, Btree* T): Node(1, P, T) +{ + item = new Sortable *[maxIndex()+1]; + if( item == 0 ) + ClassLib_error( __ENOMEMLN ); + if( O != 0 ) + item[++last] = O; +} + +LeafNode::~LeafNode() +{ + if( tree->ownsElements() ) + { + for( int i = 0; i <= last; i++ ) + delete item[i]; + } + delete [] item; +} + +void LeafNode::add(Sortable *obj, int index) +{ + // add the object OBJ to the leaf node, inserting it at location INDEX + // in the item array + PRECONDITION( 0 <= index && index <= last+1 ); + PRECONDITION( last <= maxIndex() ); + for( int i = last+1; i > index ; i-- ) + item[i] = item[ i - 1 ]; + item[ index ] = obj; + last++; + + // check for overflow + if( parent == 0 ) + tree->incrNofKeys( ); + else + parent->incrNofKeys( this ); + + if( isFull() ) + { + // it's full; tell parent node + if( parent == 0 ) + { + // this occurs when this leaf is the only node in the + // btree, and this->tree->root == this + CHECK( tree->root == this ); + // in which case we inform the btree, which can be + // considered the parent of this node + tree->rootIsFull(); + } + else + { + // the parent is responsible for splitting/balancing subnodes + parent->isFull( this ); + } + } +} + +void LeafNode::appendFrom( LeafNode* src, int start, int stop ) +{ + // A convenience function, does not worry about the element in + // the parent, simply moves elements from SRC[start] to SRC[stop] + // into the current array. + // This should never create a full node. + // That is, it is not used anywhere where THIS could possibly be + // near full. + // Does NOT handle nofKeys. + if( start > stop ) + return; + PRECONDITION( 0 <= start && start <= src->last ); + PRECONDITION( 0 <= stop && stop <= src->last ); + PRECONDITION( last + stop - start + 1 < maxIndex() ); // full-node check + for( int i = start; i <= stop; i++ ) + item[++last] = src->item[i]; + CHECK( last < maxIndex() ); +} + +void LeafNode::append( Sortable* D ) +{ + // never called from anywhere where it might fill up THIS + // does NOT handle nofKeys. + item[++last] = D; + CHECK( last < maxIndex() ); +} + + +void LeafNode::balanceWithLeft( LeafNode* leftsib, int pidx ) +{ + // THIS has more than LEFTSIB; move some items from THIS to LEFTSIB. + PRECONDITION( Vsize() >= leftsib->Psize() ); + int newThisSize = (Vsize() + leftsib->Psize())/2; + int noFromThis = Psize() - newThisSize; + pushLeft( noFromThis, leftsib, pidx ); +} + +void LeafNode::balanceWithRight( LeafNode* rightsib, int pidx ) +{ + // THIS has more than RIGHTSIB; move some items from THIS to RIGHTSIB. + PRECONDITION( Psize() >= rightsib->Vsize() ); + int newThisSize = (Psize() + rightsib->Vsize())/2; + int noFromThis = Psize() - newThisSize; + pushRight( noFromThis, rightsib, pidx ); +} + +void LeafNode::balanceWith( LeafNode* rightsib, int pidx ) +{ + // PITEM is the parent item whose key will change when keys are shifted + // from one LeafNode to the other. + if( Psize() < rightsib->Vsize() ) + rightsib->balanceWithLeft( this, pidx ); + else + balanceWithRight( rightsib, pidx ); +} + +long LeafNode::findRank( Sortable* what ) const +{ + // WHAT was not in any inner node; it is either here, or it's + // not in the tree + for( int i = 0; i <= last; i++ ) + { + if( *item[i] == *what ) + return i; + if( *item[i] >= *what ) + return -1; + } + return -1; +} + +LeafNode *LeafNode::firstLeafNode() +{ + return this; +} + +Object& LeafNode::found(Sortable* what, Node** which, int* where ) +{ + // WHAT was not in any inner node; it is either here, or it's + // not in the tree + for( int i = 0; i <= last; i++ ) + { + if( *item[i] == *what ) + { + *which = this; + *where = i; + return *item[i]; + } + if( *item[i] >= *what ) + { + *which = this; + *where = i; + return NOOBJECT; + } + } + *which = this; + *where = last+1; + return NOOBJECT; +} + +#pragma warn -rvl + +int LeafNode::indexOf( const Sortable *that ) const +{ + // returns a number in the range 0 to maxIndex() + for( int i = 0; i <= last; i++ ) + { + if( item[i] == that ) + return i; + } + CHECK(0); +} + +#pragma warn .rvl + +LeafNode *LeafNode::lastLeafNode() +{ + return this; +} + +void LeafNode::mergeWithRight( LeafNode* rightsib, int pidx ) +{ + PRECONDITION( Psize() + rightsib->Vsize() < maxPsize() ); + rightsib->pushLeft( rightsib->Psize(), this, pidx ); + append( parent->getKey( pidx ) ); + parent->setNofKeys( pidx-1, nofKeys() ); + // cout << "in mergeWithRight:\n" << *parent << "\n"; + parent->removeItem( pidx ); + delete rightsib; + // cout << "in mergeWithRight:\n" << *parent << "\n"; +} + +long LeafNode::nofKeys( int ) const +{ + return 1; +} + +long LeafNode::nofKeys() const +{ + return Psize(); +} + +void LeafNode::printOn(ostream& out) const +{ + out << " < "; + for( int i = 0; i <= last; i++ ) + out << *item[i] << " " ; + out << "> "; +} + +void LeafNode::pushLeft( int noFromThis, LeafNode* leftsib, int pidx ) +{ + // noFromThis==1 => moves the parent item into the leftsib, + // and the first item in this's array into the parent item + PRECONDITION( noFromThis > 0 && noFromThis <= Psize() ); + PRECONDITION( noFromThis + leftsib->Psize() < maxPsize() ); + PRECONDITION( parent->getTree(pidx) == this ); + leftsib->append( parent->getKey(pidx) ); + if( noFromThis > 1 ) + leftsib->appendFrom( this, 0, noFromThis-2 ); + parent->setKey( pidx, item[noFromThis-1] ); + shiftLeft( noFromThis ); + parent->setNofKeys( pidx-1, leftsib->nofKeys() ); + parent->setNofKeys( pidx, nofKeys() ); +} + +void LeafNode::pushRight( int noFromThis, LeafNode* rightsib, int pidx ) +{ + // noFromThis==1 => moves the parent item into the + // rightsib, and the last item in this's array into the parent + // item + PRECONDITION(noFromThis > 0 && noFromThis <= Psize()); + PRECONDITION(noFromThis + rightsib->Psize() < maxPsize()); + PRECONDITION(parent->getTree(pidx) == rightsib); + // The operation is five steps: + // Step I. Make room for the incoming keys in RIGHTSIB. + // Step II. Move the key in the parent into RIGHTSIB. + // Step III.Move the items from THIS into RIGHTSIB. + // Step IV. Move the item from THIS into the parent. + // Step V. Update the length of THIS. + // + // Step I.: make space for noFromThis items + // + int start = last - noFromThis + 1; + int tgt, src; + tgt = rightsib->last + noFromThis; + src = rightsib->last; + rightsib->last = tgt; + while (src >= 0) + rightsib->item[tgt--] = rightsib->item[src--]; + + // Step II. Move the key from the parent into place + rightsib->item[ tgt-- ] = parent->getKey( pidx ); + + // Step III.Move the items from THIS into RIGHTSIB + for( int i = last; i > start; i-- ) + rightsib->item[tgt--] = item[i]; + CHECK( tgt == -1 ); + + // Step IV. + parent->setKey( pidx, item[ start ] ); + + // Step V. + last -= noFromThis; + + // Step VI. update nofKeys + parent->setNofKeys( pidx-1, nofKeys() ); + parent->setNofKeys( pidx, rightsib->nofKeys() ); +} + +void LeafNode::remove( int index ) +{ + PRECONDITION( index >= 0 && index <= last ); + for( int to = index; to < last; to++ ) + item[to] = item[to+1]; + last--; + if( parent == 0 ) + tree->decrNofKeys(); + else + parent->decrNofKeys( this ); + if( isLow() ) + { + if( parent == 0 ) + { + // then this is the root; when no keys left, inform the tree + if( Psize() == 0 ) + tree->rootIsEmpty(); + } + else + parent->isLow( this ); + } +} + +void LeafNode::shiftLeft( int cnt ) +{ + if( cnt <= 0 ) + return; + for( int i = cnt; i <= last; i++ ) + item[i-cnt] = item[i]; + last -= cnt; +} + +void LeafNode::split() +{ + // this function is called only when THIS is the only descendent + // of the root node, and THIS needs to be split. + // assumes that idx of THIS in Parent is 0. + LeafNode* newnode = new LeafNode( parent ); + CHECK( newnode != 0 ); + parent->append( item[last--], newnode ); + parent->setNofKeys( 0, parent->getTree(0)->nofKeys() ); + parent->setNofKeys( 1, parent->getTree(1)->nofKeys() ); + balanceWithRight( newnode, 1 ); +} + +void LeafNode::splitWith( LeafNode *rightsib, int keyidx ) +{ + PRECONDITION(parent == rightsib->parent); + PRECONDITION(keyidx > 0 && keyidx <= parent->last); + int nofKeys = Psize() + rightsib->Vsize(); + int newSizeThis = nofKeys / 3; + int newSizeNew = (nofKeys - newSizeThis) / 2; + int newSizeSib = (nofKeys - newSizeThis - newSizeNew); + int noFromThis = Psize() - newSizeThis; + int noFromSib = rightsib->Vsize() - newSizeSib; + CHECK(noFromThis >= 0); + CHECK(noFromSib >= 1); + LeafNode* newNode = new LeafNode(parent); + CHECK( newNode != 0 ); + parent->addElt( keyidx, item[last--], newNode ); + parent->setNofKeys( keyidx, 0 ); + parent->decNofKeys( keyidx-1 ); + this->pushRight( noFromThis-1, newNode, keyidx ); + rightsib->pushLeft( noFromSib, newNode, keyidx+1 ); + if( parent->isFull() ) + parent->informParent(); +} diff --git a/M/TC/CLASSLIB/SOURCE/COLLECT.CPP b/M/TC/CLASSLIB/SOURCE/COLLECT.CPP new file mode 100644 index 0000000..921829a --- /dev/null +++ b/M/TC/CLASSLIB/SOURCE/COLLECT.CPP @@ -0,0 +1,29 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* COLLECT.CPP */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __COLLECT_H ) +#include +#endif // __COLLECT_H + +Object _FAR & Collection::findMember( Object _FAR & testObject ) const +{ + ContainerIterator& containerIterator = initIterator(); + while( containerIterator != 0 ) + { + Object& listObject = containerIterator++; + if( listObject == testObject ) + { + delete &containerIterator; + return listObject; + } + } + delete &containerIterator; + return NOOBJECT; +} + diff --git a/M/TC/CLASSLIB/SOURCE/CONTAIN.CPP b/M/TC/CLASSLIB/SOURCE/CONTAIN.CPP new file mode 100644 index 0000000..cde71fd --- /dev/null +++ b/M/TC/CLASSLIB/SOURCE/CONTAIN.CPP @@ -0,0 +1,142 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* CONTAIN.CPP */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( CHECKS_H ) +#include +#endif // CHECKS_H + +#if !defined( __CONTAIN_H ) +#include +#endif // __CONTAIN_H + +#ifndef __IOSTREAM_H +#include +#endif + +void Container::forEach( iterFuncType actionPtr, void *paramListPtr ) +{ + PRECONDITION( actionPtr != 0 ); + ContainerIterator& containerIterator = initIterator(); + while( containerIterator != 0 ) + containerIterator++.forEach( actionPtr, paramListPtr ); + delete &containerIterator; +} + +Object& Container::firstThat( condFuncType testFuncPtr, + void *paramListPtr + ) const +{ + PRECONDITION( testFuncPtr != 0 ); + ContainerIterator &containerIterator = initIterator(); + while( containerIterator != 0 ) + { + Object& testResult = + containerIterator++.firstThat( testFuncPtr, paramListPtr ); + if ( testResult != NOOBJECT ) + { + delete &containerIterator; + return testResult; + } + } + delete &containerIterator; + return NOOBJECT; +} + +Object& Container::lastThat( condFuncType testFuncPtr, + void *paramListPtr + ) const +{ + PRECONDITION( testFuncPtr != 0 ); + ContainerIterator& containerIterator = initIterator(); + Object *lastMet = ZERO; + while( containerIterator != 0 ) + { + Object& testResult = + containerIterator++.lastThat( testFuncPtr, paramListPtr ); + if( testResult != NOOBJECT ) + lastMet = &testResult; + } + delete &containerIterator; + return *lastMet; +} + +int Container::isEqual( const Object& testContainer ) const +{ + PRECONDITION( isA() == testContainer.isA() ); + + int res = 1; + + ContainerIterator& thisIterator = initIterator(); + ContainerIterator& testContainerIterator = + ((Container &)(testContainer)).initIterator(); + while( thisIterator != 0 && testContainerIterator != 0 ) + { + if( thisIterator++ != testContainerIterator++ ) + { + res = 0; + break; + } + } + + if( thisIterator != 0 || testContainerIterator != 0 ) + res = 0; + + delete &testContainerIterator; + delete &thisIterator; + return res; +} + +void Container::printOn( ostream& outputStream ) const +{ + ContainerIterator& printIterator = initIterator(); + printHeader( outputStream ); + while( printIterator != 0 ) + { + printIterator++.printOn( outputStream ); + if ( printIterator != 0 ) + printSeparator( outputStream ); + else + break; + } + printTrailer( outputStream ); + delete &printIterator; +} + +static void getHashValue( Object& o, void *valPtr ) +{ + hashValueType *val = (hashValueType *)valPtr; + *val += o.hashValue(); +} + +#pragma warn -ncf + +hashValueType Container::hashValue() const +{ + hashValueType val = 0; + forEach( getHashValue, &val ); + return val; +} + +#pragma warn .ncf + +void Container::printHeader( ostream& outputStream ) const +{ + outputStream << nameOf() << " {\n "; +} + +void Container::printSeparator( ostream& outputStream ) const +{ + outputStream << ",\n "; +} + +void Container::printTrailer( ostream& outputStream ) const +{ + outputStream << " }\n"; +} + diff --git a/M/TC/CLASSLIB/SOURCE/DBLLIST.CPP b/M/TC/CLASSLIB/SOURCE/DBLLIST.CPP new file mode 100644 index 0000000..932cd0e --- /dev/null +++ b/M/TC/CLASSLIB/SOURCE/DBLLIST.CPP @@ -0,0 +1,184 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* DBLLIST.CPP */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __RESOURCE_H ) +#include +#endif // __RESOURCE_H + +#if !defined( __DBLLIST_H ) +#include +#endif // __DBLLIST_H + +#ifndef __IOSTREAM_H +#include +#define __IOSTREAM_H +#endif + +unsigned DoubleListBlockInitializer::count = 0; + +MemBlocks *DoubleList::ListElement::mgr = 0; + +void DoubleList::flush( DeleteType dt ) +{ + ListElement *current = head->next; + while( current != tail ) + { + ListElement *temp = current; + current = current->next; + if( delObj(dt) ) + delete temp->data; + delete temp; + } + head->next = tail; + tail->prev = head; + itemsInContainer = 0; +} + +void DoubleList::addAtHead( Object& toAdd ) +{ + ListElement *newElement = + new ListElement( &toAdd, head, head->next ); + CHECK( newElement != 0 ); + + head->next->prev = newElement; + head->next = newElement; + + itemsInContainer++; +} + +void DoubleList::addAtTail( Object& toAdd ) +{ + ListElement *newElement = + new ListElement( &toAdd, tail->prev, tail ); + CHECK( newElement != 0 ); + + tail->prev->next = newElement; + tail->prev = newElement; + + itemsInContainer++; +} + +void DoubleList::detach( Object& toDetach, DeleteType dt ) +{ + detachFromHead( toDetach, dt ); +} + +void DoubleList::detachFromHead( Object& toDetach, DeleteType dt ) +{ + tail->data = &toDetach; + ListElement *current = head->next; + while( *(current->data) != toDetach ) + current = current->next; + tail->data = 0; + + if( current->data == 0 ) // not found + return; + + current->next->prev = current->prev; + current->prev->next = current->next; + + if( delObj(dt) ) + delete current->data; + delete current; + + itemsInContainer--; +} + +void DoubleList::detachFromTail( Object& toDetach, DeleteType dt ) +{ + head->data = &toDetach; + ListElement *current = tail->prev; + while( *(current->data) != toDetach ) + current = current->prev; + head->data = 0; + + if( current->data == 0 ) // not found + return; + + current->next->prev = current->prev; + current->prev->next = current->next; + + if( delObj(dt) ) + delete current->data; + delete current; + + itemsInContainer--; +} + +ContainerIterator& DoubleList::initIterator() const +{ + return *( (ContainerIterator *)new DoubleListIterator( *this ) ); +} + +ContainerIterator& DoubleList::initReverseIterator() const +{ + return *( (ContainerIterator *)new DoubleListIterator( *this, 0 ) ); +} + +DoubleListIterator::operator int() +{ + return currentElement != currentElement->next && + currentElement != currentElement->prev; +} + +Object& DoubleListIterator::current() +{ + return *(currentElement->data); +} + +Object& DoubleListIterator::operator ++ ( int ) +{ + if( currentElement != currentElement->next ) + { + currentElement = currentElement->next; + return *(currentElement->prev->data); + } + else + return NOOBJECT; +} + +Object& DoubleListIterator::operator ++ () +{ + currentElement = currentElement->next; + + if( currentElement != currentElement->next ) + return *(currentElement->data); + else + return NOOBJECT; +} + +void DoubleListIterator::restart() +{ + currentElement = startingElement; +} + +Object& DoubleListIterator::operator -- ( int ) +{ + if( currentElement != currentElement->prev ) + { + currentElement = currentElement->prev; + return *(currentElement->next->data); + } + else + return NOOBJECT; +} + +Object& DoubleListIterator::operator -- () +{ + currentElement = currentElement->prev; + + if( currentElement != currentElement->prev ) + return *(currentElement->data); + else + return NOOBJECT; +} + +DoubleListIterator::~DoubleListIterator() +{ +} diff --git a/M/TC/CLASSLIB/SOURCE/DEQUE.CPP b/M/TC/CLASSLIB/SOURCE/DEQUE.CPP new file mode 100644 index 0000000..4db6258 --- /dev/null +++ b/M/TC/CLASSLIB/SOURCE/DEQUE.CPP @@ -0,0 +1,45 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* DEQUE.CPP */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __DEQUE_H ) +#include +#endif // __DEQUE_H + +#ifndef __IOSTREAM_H +#include +#endif + +Object& Deque::getLeft() +{ + Object& temp = theDeque.peekAtHead(); + if( temp != NOOBJECT ) + { + theDeque.detachFromHead( temp ); + itemsInContainer--; + } + return temp; +} + +Object& Deque::getRight() +{ + Object& temp = theDeque.peekAtTail(); + if( temp != NOOBJECT ) + { + theDeque.detachFromTail( temp ); + itemsInContainer--; + } + return temp; +} + +ContainerIterator& Deque::initIterator() const +{ + return *((ContainerIterator *)new DoubleListIterator(this->theDeque)); +} + + diff --git a/M/TC/CLASSLIB/SOURCE/DICT.CPP b/M/TC/CLASSLIB/SOURCE/DICT.CPP new file mode 100644 index 0000000..a5f6d90 --- /dev/null +++ b/M/TC/CLASSLIB/SOURCE/DICT.CPP @@ -0,0 +1,42 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* DICT.CPP */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __ASSOC_H ) +#include +#endif // __ASSOC_H + +#if !defined( __DICT_H ) +#include +#endif // __DICT_H + +#if !defined( __IOSTREAM_H ) +#include +#endif // __IOSTREAM_H + +#if !defined( __CLSTYPES_H ) +#include +#endif // __CLSTYPES_H + +void Dictionary::add( Object& objectToAdd ) +{ + if( !objectToAdd.isAssociation() ) + ClassLib_error( __ENOTASSOC ); + else + Set::add( objectToAdd ); +} + +Association& Dictionary::lookup( const Object& toLookUp ) const +{ + Association toFind( (Object&)toLookUp, NOOBJECT ); + toFind.ownsElements(0); + + Association& found = (Association&)findMember( toFind ); + return found; +} + diff --git a/M/TC/CLASSLIB/SOURCE/HASHTBL.CPP b/M/TC/CLASSLIB/SOURCE/HASHTBL.CPP new file mode 100644 index 0000000..0553c04 --- /dev/null +++ b/M/TC/CLASSLIB/SOURCE/HASHTBL.CPP @@ -0,0 +1,152 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* HASHTBL.CPP */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __HASHTBL_H ) +#include +#endif // __HASHTBL_H + +#ifndef __IOSTREAM_H +#include +#endif + +HashTable::HashTable( sizeType aPrime ) : + size( aPrime ), + table( aPrime ), + itemsInContainer(0) +{ +} + +void HashTable::add( Object& objectToAdd ) +{ + hashValueType index = getHashValue( objectToAdd ); + if( table[ index ] == 0 ) + table[index] = new List; + ((List *)table[ index ])->add( objectToAdd ); + itemsInContainer++; +} + +void HashTable::detach( Object& objectToDetach, DeleteType dt ) +{ + hashValueType index = getHashValue( objectToDetach ); + if( table[ index ] != 0 ) + { + unsigned listSize = ((List *)table[ index ])->getItemsInContainer(); + ((List *)table[ index ])->detach( objectToDetach, delItem(dt) ); + if( ((List *)table[ index ])->getItemsInContainer() != listSize ) + itemsInContainer--; + } +} + +static void setOwner( Object& list, void *owns ) +{ + ((List&)list).ownsElements( *(TShouldDelete::DeleteType *)owns ); +} + +void HashTable::flush( DeleteType dt ) +{ + int shouldDel = delObj( dt ); + table.forEach( setOwner, &shouldDel ); + table.flush( 1 ); + itemsInContainer = 0; +} + +Object& HashTable::findMember( Object& testObject ) const +{ + hashValueType index = getHashValue( testObject ); + if( index >= table.limit() || table[ index ] == 0 ) + { + return NOOBJECT; + } + return ((List *)table[ index ])->findMember( testObject ); +} + +ContainerIterator& HashTable::initIterator() const +{ + return *( (ContainerIterator *)new HashTableIterator( *this ) ); +} + +HashTableIterator::HashTableIterator( const HashTable& toIterate ) : + beingIterated( toIterate ), + listIterator(0) +{ + arrayIterator = new BI_IVectorIteratorImp( toIterate.table ); + restart(); +} + +HashTableIterator::~HashTableIterator() +{ + delete arrayIterator; + delete listIterator; +} + +Object& HashTableIterator::operator ++ ( int ) +{ + Object& res = (listIterator == 0) ? NOOBJECT : listIterator->current(); + scan(); + return res; +} + +Object& HashTableIterator::operator ++ () +{ + scan(); + return (listIterator == 0) ? NOOBJECT : listIterator->current(); +} + +HashTableIterator::operator int() +{ + return int(*arrayIterator); +} + +Object& HashTableIterator::current() +{ + return (listIterator == 0) ? NOOBJECT : listIterator->current(); +} + +void HashTableIterator::restart() +{ + delete listIterator; + + arrayIterator->restart(); + while( *arrayIterator != 0 && arrayIterator->current() == 0 ) + (*arrayIterator)++; + + if( *arrayIterator != 0 ) + { + Object *curList = arrayIterator->current(); + listIterator = &(((List *)curList)->initIterator()); + if( listIterator->current() == NOOBJECT ) + scan(); + } + else + listIterator = 0; +} + +void HashTableIterator::scan() +{ + if( listIterator == 0 ) + return; + + (*listIterator)++; + while( listIterator != 0 && listIterator->current() == NOOBJECT ) + { + delete listIterator; + + (*arrayIterator)++; + while( *arrayIterator != 0 && arrayIterator->current() == 0 ) + (*arrayIterator)++; + + if( arrayIterator->current() != 0 ) + { + Object *cur = arrayIterator->current(); + listIterator = &(((Container *)cur)->initIterator()); + } + else + listIterator = 0; + } +} diff --git a/M/TC/CLASSLIB/SOURCE/LDATE.CPP b/M/TC/CLASSLIB/SOURCE/LDATE.CPP new file mode 100644 index 0000000..8fa1a1b --- /dev/null +++ b/M/TC/CLASSLIB/SOURCE/LDATE.CPP @@ -0,0 +1,70 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* LDATE.CPP */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __LDATE_H ) +#include +#endif // __LDATE_H + +#ifndef __STRSTREAM_H +#include +#endif + +#ifndef __STDIO_H +#include +#endif + +const BufSize = 20; + +static char *MonthNames[] = + { + "", + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + }; + +int BaseDate::isEqual( const Object& testDate ) const +{ + return MM == ((BaseDate&)testDate).MM && + DD == ((BaseDate&)testDate).DD && + YY == ((BaseDate&)testDate).YY; +} + +int BaseDate::isLessThan( const Object& testDate ) const +{ + if( YY != ((BaseDate&)testDate).YY ) + return YY < ((BaseDate&)testDate).YY; + if( MM != ((BaseDate&)testDate).MM ) + return MM < ((BaseDate&)testDate).MM; + return DD < ((BaseDate&)testDate).DD; +} + +hashValueType BaseDate::hashValue() const +{ + return hashValueType( YY + MM + DD ); +} + +void Date::printOn( ostream& outputStream ) const +{ + char temp[BufSize]; + ostrstream os( temp, BufSize ); + os << MonthNames[ Month() ] << " " + << Day() << ", " << Year() << ends; + outputStream << temp; +} + diff --git a/M/TC/CLASSLIB/SOURCE/LIST.CPP b/M/TC/CLASSLIB/SOURCE/LIST.CPP new file mode 100644 index 0000000..4d264da --- /dev/null +++ b/M/TC/CLASSLIB/SOURCE/LIST.CPP @@ -0,0 +1,106 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* LIST.CPP */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __RESOURCE_H ) +#include +#endif // __RESOURCE_H + +#if !defined( __LIST_H ) +#include +#endif // __LIST_H + +unsigned ListBlockInitializer::count = 0; + +MemBlocks *List::ListElement::mgr = 0; + +void List::add( Object& toAdd ) +{ + ListElement *newElement = new ListElement( &toAdd, head->next ); + CHECK( newElement != 0 ); + head->next = newElement; + itemsInContainer++; +} + +List::ListElement *List::findPred( const Object& o ) +{ + tail->data = (Object *)&o; + ListElement *cursor = head; + while( o != *(cursor->next->data) ) + cursor = cursor->next; + tail->data = 0; + return cursor; +} + +void List::detach( Object& toDetach, DeleteType dt ) +{ + ListElement *pred = findPred( toDetach ); + ListElement *item = pred->next; + if( delObj(dt) && pred->next != tail ) + delete item->data; + pred->next = pred->next->next; + if( item != tail ) + { + itemsInContainer--; + delete item; + } +} + +void List::flush( DeleteType dt ) +{ + ListElement *current = head->next; + while( current != tail ) + { + ListElement *temp = current; + current = current->next; + if( delObj(dt) ) + delete temp->data; + delete temp; + } + head->next = tail; + itemsInContainer = 0; +} + +ContainerIterator& List::initIterator() const +{ + return *( (ContainerIterator *)new ListIterator( *this ) ); +} + +ListIterator::~ListIterator() +{ +} + +ListIterator::operator int() +{ + return currentElement->next != currentElement; +} + +Object& ListIterator::current() +{ + return currentElement->data == 0 ? NOOBJECT : *(currentElement->data); +} + +Object& ListIterator::operator ++ ( int ) +{ + Object *data = currentElement->data; + currentElement = currentElement->next; + return data == 0 ? NOOBJECT : *data; +} + +Object& ListIterator::operator ++ () +{ + currentElement = currentElement->next; + return currentElement->data == 0 ? NOOBJECT : *(currentElement->data); +} + +void ListIterator::restart() +{ + currentElement = startingElement; +} + + diff --git a/M/TC/CLASSLIB/SOURCE/LTIME.CPP b/M/TC/CLASSLIB/SOURCE/LTIME.CPP new file mode 100644 index 0000000..77892bb --- /dev/null +++ b/M/TC/CLASSLIB/SOURCE/LTIME.CPP @@ -0,0 +1,66 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* LTIME.CPP */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __LTIME_H ) +#include +#endif // __LTIME_H + +#ifndef __IOMANIP_H +#include +#endif + +#ifndef __STRSTREAM_H +#include +#endif + +#ifndef __STDIO_H +#include +#endif + +const BufSize = 20; + +BaseTime::isEqual( const Object& testTime ) const +{ + return HH == ((BaseTime&)testTime).HH && + MM == ((BaseTime&)testTime).MM && + SS == ((BaseTime&)testTime).SS && + HD == ((BaseTime&)testTime).HD; +} + +BaseTime::isLessThan( const Object& testTime ) const +{ + if( HH != ((BaseTime&)testTime).HH ) + return HH < ((BaseTime&)testTime).HH; + if( MM != ((BaseTime&)testTime).MM ) + return MM < ((BaseTime&)testTime).MM; + if( SS != ((BaseTime&)testTime).SS ) + return SS < ((BaseTime&)testTime).SS; + if( HD != ((BaseTime&)testTime).HD ) + return HD < ((BaseTime&)testTime).HD; + return 0; +} + +hashValueType BaseTime::hashValue() const +{ + return hashValueType( HH + MM + SS + HD ); +} + +void Time::printOn( ostream& outputStream ) const +{ + char temp[BufSize]; + ostrstream os( temp, BufSize ); + os << ((hour()%12 == 0) ? 12 : hour()%12) << ":" + << setfill( '0' ) + << setw( 2 ) << minute() << ":" + << setw( 2 ) << second() << "." + << setw( 2 ) << hundredths() << " " + << ((hour() > 11) ? "p" : "a") << "m" << ends; + outputStream << temp; +} + diff --git a/M/TC/CLASSLIB/SOURCE/MEMMGR.CPP b/M/TC/CLASSLIB/SOURCE/MEMMGR.CPP new file mode 100644 index 0000000..d55aecb --- /dev/null +++ b/M/TC/CLASSLIB/SOURCE/MEMMGR.CPP @@ -0,0 +1,58 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* MEMMGR.CPP */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __STDTEMPL_H ) +#include +#endif // __STDTEMPL_H + +#if !defined( __CHECKS_H ) +#include +#endif // __CHECKS_H + +#if !defined( __MEMMGR_H ) +#include +#endif // __MEMMGR_H + +unsigned max( unsigned, unsigned ); + +int BaseMemBlocks::allocBlock( size_t sz ) +{ + BlockList _FAR *temp = new( max(sz,blockSize) ) BlockList( curBlock-1 ); + if( temp == 0 ) + return 0; + curBlock = temp+1; + blockCount++; + return 1; +} + +void BaseMemBlocks::freeTo( unsigned term ) +{ + PRECONDITION( blockCount >= term ); + while( blockCount > term ) + { + BlockList _FAR *temp = curBlock-1; + curBlock = (temp->next)+1; + delete temp; + blockCount--; + } +} + +void _FAR *MemStack::allocate( size_t sz ) +{ + sz = max( 1, sz ); + if( sz > blockSize - curLoc ) + if( allocBlock( sz ) == 0 ) + return 0; + else + curLoc = 0; + void _FAR *temp = block() + curLoc; + curLoc += sz; + return temp; +} + diff --git a/M/TC/CLASSLIB/SOURCE/OBJECT.CPP b/M/TC/CLASSLIB/SOURCE/OBJECT.CPP new file mode 100644 index 0000000..44d0ad0 --- /dev/null +++ b/M/TC/CLASSLIB/SOURCE/OBJECT.CPP @@ -0,0 +1,93 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* OBJECT.CPP */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( TEMPLATES ) +#define TEMPLATES +#endif + +#if !defined( __CLSDEFS_H ) +#include +#endif // __CLSDEFS_H + +#if !defined( __OBJECT_H ) +#include +#endif // __OBJECT_H + +#if !defined( __STDLIB_H ) +#include +#endif // __STDLIB_H + +#if !defined( __STRSTREA_H ) +#include +#endif // __STRSTREA_H + +#if !defined( __MALLOC_H ) +#include +#endif // __MALLOC_H + +void *Object::operator new( size_t s ) +{ + void *allocated = ::operator new( s ); + if( allocated == 0 ) + return ZERO; + else + return allocated; +} + +Error theErrorObject; + +Object *Object::ZERO = &theErrorObject; + +// Error reporting + +static char *errstring[__ElastError] = +{ + "firstError: [[ Error in error reporting???? ]]", + "EDELERROR: Attemping to delete the ERROR object", + "EXPANDFS: Attempting to expand a fixed size array.", + "EXPANDLB: Attempt to expand lower bound of array.", + "NOMEM: Out of Memory", + "NOTSORT: Object must be sortable.", + "NOTASSOC: Object must be association type.", + "ORDER3: B-trees must be at least of order 3.", + "NOMEMIA: No room for the item array for an InnerNode", + "NOMEMLN: No room for item array for a LeafNode.", + "PRBADCLASS: PersistRegister called with bad class id.", + "PRINCONS: PersistRegister called with inconsistent values.", + "BNZERODIV: Attempt to divide by zero.", + "BNILLLOG: Attempt to take log of zero or negative number.", + "BNNOMEM: No memory for a bignum.", + "RANDOM2SMALL: Bignum RNG must be bigger than 32 bits (> 2 words).", + "BNTEMPSTKOVFL: Too many markTempRing invocations,", + "BNTEMPSTKUNFL: Too many releaseTempRing invocations,", + "BN2MANYTEMPS: Ran out of temporaries on the Temp ring.", + "BN2BIG2PRINT: Bignum has too many digits in current output base.", + "BNNOMEM4PRINT: No memory for temporaries for printing.", + "BNRESULT2BIG: An operation would have resulted in too large of a number.", + "RNG2BIG: Sorry. RNGs are limited to 32767 `digits' in size.", + "BNSQRTILLEGAL: Trying to take sqrt of negative bignum.", +}; + +extern "C" void __ErrorMessage( const char _FAR * ); + +void _FARFUNC ClassLib_error( ClassLib_errors errnum, char _FAR *addstr ) +{ + ostrstream os; + os << endl << "Fatal error from class library:" << endl; + os << "__E" << errstring[errnum] << endl; + if( addstr != 0 ) + os << addstr << endl; + os << ends; + + char *buf = os.str(); + __ErrorMessage( buf ); + delete [] buf; + + exit( errnum ); +} diff --git a/M/TC/CLASSLIB/SOURCE/SORTARRY.CPP b/M/TC/CLASSLIB/SOURCE/SORTARRY.CPP new file mode 100644 index 0000000..8f7dde0 --- /dev/null +++ b/M/TC/CLASSLIB/SOURCE/SORTARRY.CPP @@ -0,0 +1,58 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* SORTARRY.CPP */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __SORTARRY_H ) +#include +#endif // __SORTARRY_H + +#ifndef __STDLIB_H +#include +#endif + +#if !defined( __IOSTREAM_H ) +#include +#endif // __IOSTREAM_H + +void SortedArray::add( Object& toAdd ) +{ + if( toAdd.isSortable() ) + { + if( lastElementIndex == upperbound ) + { + reallocate( arraySize() + 1 ); + } + int insertionPoint = lowerbound; + while( insertionPoint <= lastElementIndex && + (Sortable&)objectAt( insertionPoint ) < (Sortable&)toAdd + ) + insertionPoint++; + + insertEntry( insertionPoint ); + setData( insertionPoint, &toAdd ); + itemsInContainer++; + lastElementIndex++; + } + else + ClassLib_error( __ENOTSORT ); +} + +void SortedArray::detach( Object& toDetach, DeleteType dt ) +{ + int detachPoint = find( toDetach ); + if( detachPoint != INT_MIN ) + { + if( delObj(dt) ) + delete ptrAt( detachPoint ); + removeEntry( detachPoint ); + itemsInContainer--; + if( detachPoint <= lastElementIndex ) + lastElementIndex--; + } +} + diff --git a/M/TC/CLASSLIB/SOURCE/STACK.CPP b/M/TC/CLASSLIB/SOURCE/STACK.CPP new file mode 100644 index 0000000..d17fd5e --- /dev/null +++ b/M/TC/CLASSLIB/SOURCE/STACK.CPP @@ -0,0 +1,37 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* STACK.CPP */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __STACK_H ) +#include +#endif // __STACK_H + +#ifndef __IOSTREAM_H +#include +#endif + +void Stack::push( Object& toPush ) +{ + theStack.add( toPush ); + itemsInContainer++; +} + +Object& Stack::pop() +{ + Object& temp = theStack.peekHead(); + theStack.detach( temp ); + if( temp != NOOBJECT ) + itemsInContainer--; + return temp; +} + +ContainerIterator& Stack::initIterator() const +{ + return *( (ContainerIterator *)new ListIterator( this->theStack ) ); +} + diff --git a/M/TC/CLASSLIB/SOURCE/STRNG.CPP b/M/TC/CLASSLIB/SOURCE/STRNG.CPP new file mode 100644 index 0000000..d8295b4 --- /dev/null +++ b/M/TC/CLASSLIB/SOURCE/STRNG.CPP @@ -0,0 +1,90 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* STRNG.CPP */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __CHECKS_H ) +#include +#endif // __CHECKS_H + +#if !defined( __STRNG_H ) +#include +#endif // __STRNG_H + +#ifndef __STDLIB_H +#include +#endif + +#ifndef __STRING_H +#include +#endif + +#if !defined( __IOSTREAM_H ) +#include +#endif // __IOSTREAM_H + +String::String( const char *aPtr ) +{ + if ( aPtr == 0 ) + aPtr = ""; + + len = strlen( aPtr ) + 1; + theString = new char[ len ]; + CHECK( theString != 0 ); + strcpy( theString, aPtr ); +} + +String::String( const String& sourceString ) +{ + len = sourceString.len; + theString = new char[ len ]; + CHECK( theString != 0 ); + strcpy( theString, sourceString.theString ); +} + +String::isEqual( const Object& testString ) const +{ + return ( len == ((String &)testString).len && + !strcmp( theString, ((String &)testString).theString ) ); +} + +int String::isLessThan( const Object& testString ) const +{ + return ( strcmp ( theString, ((String &)testString).theString ) < 0 ); +} + +hashValueType String::hashValue() const +{ + hashValueType value = hashValueType(0); + for( int i = 0; i < len; i++ ) + { + value ^= theString[i]; + value = _rotl( value, 1 ); + } + return value; +} + +void String::printOn( ostream& outputStream ) const +{ + outputStream << theString; +} + +String& String::operator =( const String& sourceString ) +{ + if ( *this != sourceString ) + { + if ( len != sourceString.len ) + { + delete theString; + len = sourceString.len; + theString = new char[ len ]; + CHECK( theString != 0 ); + } + strcpy( theString, sourceString.theString ); + } + return *this; +} diff --git a/M/TC/CLASSLIB/SOURCE/TIMER.CPP b/M/TC/CLASSLIB/SOURCE/TIMER.CPP new file mode 100644 index 0000000..0599197 --- /dev/null +++ b/M/TC/CLASSLIB/SOURCE/TIMER.CPP @@ -0,0 +1,108 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* TIMER.CPP */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/*------------------------------------------------------------------------*/ + +#if !defined( __TIMER_H ) +#include +#endif // __TIMER_H + +#if !defined( __DOS_H ) +#include +#endif // __DOS_H + +const unsigned long far * const dosTime = + (const unsigned long far * const)MK_FP( 0x40, 0x6C ); + +unsigned Timer::adjust = calibrate(); + +Timer::Timer() : time_(0), running(0) +{ +} + +void Timer::start() +{ + if( !running ) + { + outportb( 0x43, 0x34 ); + asm jmp __1; + __1: + outportb( 0x40, 0 ); + asm jmp __2; + __2: + outportb( 0x40, 0 ); + startTime.dosCount = *dosTime; + startTime.timerCount = 0; + running = 1; + } +} + +void Timer::stop() +{ + outportb( 0x43, 0 ); + unsigned char temp = inportb( 0x40 ); + + TIME stopTime; + stopTime.timerCount = (inportb( 0x40 ) << 8) + temp; + stopTime.dosCount = *dosTime; + + TIME elapsedTime; + elapsedTime.dosCount = stopTime.dosCount - startTime.dosCount; + elapsedTime.timerCount = -( stopTime.timerCount - adjust ); + + const double fudge = 83810.0/100000.0; + time_ += ((elapsedTime.dosCount << 16) + elapsedTime.timerCount)*fudge; + + running = 0; + +} + +void Timer::reset() +{ + time_ = 0; + if( running ) + start(); +} + +unsigned Timer::calibrate() +{ + adjust = 0; + unsigned long sum = 0; + Timer w; + for( int i = 0; i < 100; i++ ) + { + w.start(); + w.stop(); + sum += w.time(); + w.reset(); + } + return (unsigned)((sum+5)/100); +} + +#if defined( TEST_TIMER ) +#include +#include + +int main( void ) +{ + delay( 0 ); + cout << "Resolution: " << Timer::resolution() << endl; + Timer w; + for( unsigned del = 0; del < 10; del++ ) + { + unsigned d1 = del*100; + w.start(); + delay( d1 ); + w.stop(); + printf( "%4u ms., actual time = %6f seconds.\n", d1, w.time() ); + w.reset(); + } + return 0; +} +#endif /* TEST_TIMER */ + + diff --git a/M/TC/CLASSLIB/SOURCE/TMPLINST.CPP b/M/TC/CLASSLIB/SOURCE/TMPLINST.CPP new file mode 100644 index 0000000..3c1956b --- /dev/null +++ b/M/TC/CLASSLIB/SOURCE/TMPLINST.CPP @@ -0,0 +1,62 @@ +/*------------------------------------------------------------------------*/ +/* */ +/* TMPLINST.CPP */ +/* */ +/* Copyright Borland International 1991 */ +/* All Rights Reserved */ +/* */ +/* Provides instantiations of the various Object containers, */ +/* for use in the DLL version of the class libraries. */ +/* */ +/*------------------------------------------------------------------------*/ + + +#if !defined( TEMPLATES ) +#define TEMPLATES +#endif + +#pragma option -Jgd + +#include +#include +#include +#include +#include +#include +#include + +typedef BI_SDoubleListImp dummy1; +typedef BI_DoubleListIteratorImp dummy2; + +typedef BI_IDequeAsVector dummy3; +typedef BI_IDequeAsVectorIterator dummy4; + +typedef BI_IDequeAsDoubleList dummy5; +typedef BI_IDequeAsDoubleListIterator dummy6; + +typedef BI_SListImp dummy7; +typedef BI_ListIteratorImp dummy8; + +typedef BI_IQueueAsVector dummy9; +typedef BI_IQueueAsVectorIterator dummy10; + +typedef BI_IQueueAsDoubleList dummy11; +typedef BI_IQueueAsDoubleListIterator dummy12; + +typedef BI_IStackAsVector dummy13; +typedef BI_IStackAsVectorIterator dummy14; + +typedef BI_IStackAsList dummy15; +typedef BI_IStackAsListIterator dummy16; + +typedef BI_VectorImp dummy17; +typedef BI_CVectorImp dummy18; +typedef BI_SVectorImp dummy19; +typedef BI_VectorIteratorImp dummy20; + +typedef BI_ISetAsVector dummy21; +typedef BI_ISetAsVectorIterator dummy22; + +typedef BI_IVectorImp dummy23; +typedef BI_ICVectorImp dummy24; + diff --git a/M/TC/DOC/ANSI.DOC b/M/TC/DOC/ANSI.DOC new file mode 100644 index 0000000..7dfbceb --- /dev/null +++ b/M/TC/DOC/ANSI.DOC @@ -0,0 +1,538 @@ + ANSI IMPLEMENTATION-SPECIFIC STANDARDS + -------------------------------------- + +Certain aspects of the ANSI C standard are not defined exactly by ANSI. +Instead, each implementor of a C compiler is free to define these aspects +individually. This chapter tells how Borland has chosen to define these +implementation-specific standards. The section numbers refer to the +February 1990 ANSI Standard. Remember that there are differences between +C and C++; this appendix addresses C only. + +2.1.1.3 How to identify a diagnostic. + + When the compiler runs with the correct combination of options, any + message it issues beginning with the words Fatal, Error, or Warning + are diagnostics in the sense that ANSI specifies. The options needed + to insure this interpretation are in the following table. The options are + listed as hot keys you use in the IDE. For example, the first option + corresponds to Options|Compiler|Source, and in the Source Options + dialog box you'd choose ANSI for the Keyword option. + + ----------------------------------------------------------------------------- + Option Action + ----------------------------------------------------------------------------- + O|C|S|A Enable only ANSI keywords. + O|C|S|N No nested comments allowed. + O|C|E|C Use C calling conventions. + O|C|S|I At least 32 significant characters in identifiers. + O|C|M|D|S Turn off all warnings except selected ones. + O|C|M|A|I Turn on warning about inappropriate initializers. + O|C|M|P|C Turn on warning about non-portable pointer comparisons. + O|C|M|A|R Turn on warning about duplicate non-identical definitions. + O|C|M|A|S Turn on warning about suspicious pointer conversion. + O|C|P|N Turn on warning about non-portable pointer conversion. + O|C|M|A|V Turn on warning about void functions returning a value. + O|C|M|A|H Turn on warning about hexadecimal values containg more than + 3 digits. + O|C|M|P|M Turn on warning about mixing pointers to signed and unsigned + char. + O|C|M|A|U Turn on warning about undefined structures. + O|C|M|A|X Turn on warning about variables declared both as external and + as static. + ----------------------------------------------------------------------------- + Choose Options|Compiler|Code Generation and specify Never under SS = DS. + Also don't change the default values in the Segment Names dialog box under + Options|Compiler|Names; each text box should contain an asterisk (*). + + Other options not specifically mentioned here can be set to whatever + you desire. + +2.1.2.2.1 The semantics of the arguments to main. + + The value of argv[0] is a pointer to a null byte when the program is + run on DOS versions prior to version 3.0. For DOS version 3.0 or + later, argv[0] points to the program name. + + The remaining argv strings point to each component of the DOS + command-line arguments. Whitespace separating arguments is removed, + and each sequence of contiguous nonwhitespace characters is treated + as a single argument. Quoted strings are handled correctly (that is, + as one string containing spaces). + +2.1.2.3 What constitutes an interactive device. + + An interactive device is any device that looks like the console. + +2.2.1 The collation sequence of the execution character set. + + The collation sequence for the execution character set uses the + signed value of the character in ASCII. + +2.2.1 Members of the source and execution character sets. + + The source and execution character sets are the extended ASCII set + supported by the IBM PC. Any character other than ^Z (Control-Z) + can appear in string literals, character constants, or comments. + +2.2.1.2 Multibyte characters. + + No multibyte characters are supported in Turbo C++. + +2.2.2 The direction of printing. + + Printing is from left-to-right, the normal direction for the PC. + +2.2.4.2 The number of bits in a character in the execution character set. + + There are 8 bits per character in the execution character set. + +3.1.2 The number of significant initial characters in identifiers. + + The first 32 characters are significant, although you can use a + O|C|S|I to change that number. Both internal and external identifiers use + the same number of significant digits. (The number of significant characters + in C++ identifiers is unlimited.) + +3.1.2 Whether case distinctions are significant in external identifiers. + + The compiler will normally force the linker to distinguish between + uppercase and lowercase. You can use suppress this distinction with + O|L|S|C to uncheck the Case-sensitive Link option. + +3.1.2.5 The representations and sets of values of the various types of +integers. + + ------------------------------------------------------------------------ + Type Minimum value Maximum value + ------------------------------------------------------------------------ + signed char -128 127 + unsigned char 0 255 + signed short -32,768 32,767 + unsigned short 0 65,535 + signed int -32,768 32,767 + unsigned int 0 65,535 + signed long -2,147,483,648 2,147,483,647 + unsigned long 0 4,294,967,295 + + All char types use one 8-bit byte for storage. + + All short and int types use 2 bytes. + + All long types use 4 bytes. + + If alignment is requested (O|C|C|W), all nonchar integer type objects will + be aligned to even byte boundaries. Character types are never aligned. + +3.1.2.5 The representations and sets of values of the various types of +floating-point numbers. + + The IEEE floating-point formats as used by the Intel 8087 are used for all + Turbo C++ floating-point types. The float type uses 32-bit + IEEE real format. The double type uses 64-bit IEEE real format. The long + double type uses 80-bit IEEE extended real format. + +3.1.3.4 The mapping between source and execution character sets. + + Any characters in string literals or character constants will remain + unchanged in the executing program. The source and execution character + sets are the same. + +3.1.3.4 The value of an integer character constant that contains a character +or escape sequence not represented in the basic execution character set or +the extended character set for a wide character constant. + + Wide characters are not supported. They are treated as normal characters. + All legal escape sequences map onto one or another character. If a hex or + octal escape sequence is used that exceeds the range of a character, the + compiler issues a message. + +3.1.3.4 The current locale used to convert multibyte characters into +corresponding wide characters for a wide character constant. + + Wide character constants are recognized, but treated in all ways like + normal character constants. In that sense, the locale is the "C" locale. + +3.1.3.4 The value of an integer constant that contains more than one +character, or a wide character constant that contains more than one multibyte +character. + + Character constants can contain one or two characters. If two characters are + included, the first character occupies the low-order byte of the constant, + and the second character occupies the high-order byte. + +3.2.1.2 The result of converting an integer to a shorter signed integer, or +the result of converting an unsigned integer to a signed integer of equal +length, if the value cannot be represented. + + These conversions are performed by simply truncating the high-order + bits. Signed integers are stored as 2's-complement values, so the resulting + number is interpreted as such a value. If the high-order bit of the smaller + integer is nonzero, the value is interpreted as a negative value; otherwise, + it is positive. + +3.2.1.3 The direction of truncation when an integral number is converted +to a floating-point number that cannot exactly represent the original value. + + The integer value is rounded to the nearest representable value. Thus, + for example, the long value (2 to the 31th power minus 1) is converted to + the float value 2 to the 31th power. Ties are broken according to the rules + of IEEE standard arithmetic. + +3.2.1.4 The direction of truncation or rounding when a floating-point number +is converted to a narrower floating-point number. + + The value is rounded to the nearest representable value. Ties are broken + according to the rules of IEEE standard arithmetic. + +3.3 The results of bitwise operations on signed integers. + + The bitwise operators apply to signed integers as if they were their + corresponding unsigned types. The sign bit is treated as a normal data + bit. The result is then interpreted as a normal 2's complement signed + integer. + +3.3.2.3 What happens when a member of a union object is accessed using a +member of a different type. + + The access is allowed and will simply access the bits stored there. + You'll need a detailed understanding of the bit encodings of floating-point + values in order to understand how to access a floating-type member using a + different member. If the member stored is shorter than the member used to + access the value, the excess bits have the value they had before the short + member was stored. + +3.3.3.4 The type of integer required to hold the maximum size of an array. + + For a normal array, the type is unsigned int, and for huge arrays the + type is signed long. + +3.3.4 The result of casting a pointer to an integer or vice versa. + + When converting between integers and pointers of the same size, no + bits are changed. When converting from a longer type to a shorter, the + high-order bits are truncated. When converting from a shorter integer + type to a longer pointer type, the integer is first widened to an + integer type that is the same size as the pointer type. Thus signed + integers will sign-extend to fill the new bytes. Similarly, smaller + pointer types being converted to larger integer types will first be + widened to a pointer type that is as wide as the integer type. + +3.3.5 The sign of the remainder on integer division. + + The sign of the remainder is negative when only one of the operands is + negative. If neither or both operands are negative, the remainder is + positive. + +3.3.6 The type of integer required to hold the difference between two +pointers to elements of the same array, ptrdiff_t. + + The type is signed int when the pointers are near, or signed long when + the pointers are far or huge. The type of ptrdiff_t depends on the memory + model in use. In small data models, the type is int. In large data models, + the type is long. + +3.3.7 The result of a right shift of a negative signed integral type. + + A negative signed value is sign-extended when right shifted. + +3.5.1 The extent to which objects can actually be placed in registers by +using the register storage-class specifier. + + Objects declared with any two-byte integer or pointer types can be placed + in registers. The compiler will place any small auto objects into registers, + but objects explicitly declared as register will take precedence. At least + two and as many as six registers are available. The number of registers + actually used depends on what registers are needed for temporary values + in the function. + +3.5.2.1 Whether a plain int bit-field is treated as a signed int or as an +unsigned int bit field. + + Plain int bit fields are treated as signed int bit fields. + +3.5.2.1 The order of allocation of bit fields within an int. + + Bit fields are allocated from the low-order bit position to the high-order. + +3.5.2.1 The padding and alignment of members of structures. + + By default, no padding is used in structures. If you use the alignment + option (O|C|C|W), structures are padded to even size, and any members that + do not have character or character array type will be aligned to an even + offset. + +3.5.2.1 Whether a bit-field can straddle a storage-unit boundary. + + When alignment (O|C|C|W) is not requested, bit fields can straddle word + boundaries, but will never be stored in more than two adjacent bytes. + +3.5.2.2 The integer type chosen to represent the values of an enumeration +type. + + If all enumerators can fit in an unsigned char, that is the type + chosen. Otherwise, the type is signed int. + +3.5.3 What constitutes an access to an object that has volatile-qualified +type. + + Any reference to a volatile object will access the object. Whether + accessing adjacent memory locations will also access an object depends on + how the memory is constructed in the hardware. For special device memory, + like video display memory, it depends on how the device is constructed. For + normal PC memory, volatile objects are only used for memory that might be + accessed by asynchronous interrupts, so accessing adjacent objects has no + effect. + +3.5.4 The maximum number of declarators that can modify an arithmetic, +structure, or union type. + + There is no specific limit on the number of declarators. The number of + declarators allowed is fairly large, but when nested deeply within a set + of blocks in a function, the number of declarators will be reduced. The + number allowed at file level is at least 50. + +3.6.4.2 The maximum number of case values in a switch statement. + + There is no specific limit on the number of cases in a switch. As long + as there is enough memory to hold the case information, the compiler + will accept them. + +3.8.1 Whether the value of a single-character character constant in a +constant expression that controls conditional inclusion matches the +value of the same character constant in the execution character set. +Whether such a character constant can have a negative value. + + All character constants, even constants in conditional directives use + the same character set (execution). Single-character character + constants will be negative if the character type is signed (default + and O|C|C|U not requested). + +3.8.2 The method for locating includable source files. + + For include file names given with angle brackets, the file is searched + for in each of the include directories. If no include directories are + specified, then only the current directory is searched. + +3.8.2 The support for quoted names for includable source files. + + For quoted file names, the file is first searched for in the current + directory. If not found, Turbo C++ searches for the file as + if it were in angle brackets. + +3.8.2 The mapping of source file name character sequences. + + Backslashes in include file names are treated as distinct characters, + not as escape characters. Case differences are ignored for letters. + + +3.8.8 The definitions for __DATE__ and __TIME__ when they are unavailable. + + The date and time are always available, and will use the DOS date and time. + +4.1.1 The decimal point character. + + The decimal point character is a period (.). + +4.1.5 The type of the sizeof operator, size_t. + + The type size_t is unsigned int. + +4.1.5 The null pointer constant to which the macro NULL expands. + + An integer or a long 0, depending upon the memory model. + +4.2 The diagnostic printed by and the termination behavior of the assert +function. + + The diagnostic message printed is "Assertion failed: expression, file + filename, line nn", where expression is the asserted expression which + failed, filename is the source file name, and nn is the line number + where the assertion took place. + + abort is called immediately after the assertion message is displayed. + +4.3 The implementation-defined aspects of character testing and case +mapping functions. + + None, other than what is mentioned in 4.3.1. + +4.3.1 The sets of characters tested for by the isalnum, isalpha, iscntrl, +islower, isprint and isupper functions. + + First 128 ASCII characters. + +4.5.1 The values returned by the mathematics functions on domain errors. + + An IEEE NAN (not a number). + +4.5.1 Whether the mathematics functions set the integer expression errno to +the value of the macro ERANGE on underflow range errors. + + No, only for the other errors--domain, singularity, overflow, and total + loss of precision. + +4.5.6.4 Whether a domain error occurs or zero is returned when the fmod +function has a second argument of zero. + +No. fmod(x,0) returns 0. + +4.7.1.1 The set of signals for the signal function. + + SIGABRT, SIGFPE, SIGILL, SIGINT, SIGSEGV, SIGTERM. + +4.7.1.1 The semantics for each signal recognized by the signal function. + + See the description of signal in the Help system. + +4.7.1.1 The default handling and the handling at program startup for each +signal recognized by the signal function. + + See the description of signal in the Help system. + +4.7.1.1 If the equivalent of signal(sig, SIG_DFL); is not executed prior to +the call of a signal handler, the blocking of the signal that is performed. + + The equivalent of signal (sig, SIG_DFL) is always executed. + +4.7.1.1 Whether the default handling is reset if the SIGILL signal is received +by a handler specified to the signal function. + + No, it is not. + +4.9.2 Whether the last line of a text stream requires a terminating newline +character. + + No, none is required. + +4.9.2 Whether space characters that are written out to a text stream +immediately before a newline character appear when read in. + + Yes, they do. + +4.9.2 The number of null characters that may be appended to data written to +a binary stream. + + None. + +4.9.3 Whether the file position indicator of an append mode stream is +initially positioned at the beginning or end of the file. + + The file position indicator of an append-mode stream is initially placed + at the beginning of the file. It is reset to the end of the file before + each write. + +4.9.3 Whether a write on a text stream causes the associated file to be +truncated beyond that point. + + A write of 0 bytes may or may not truncate the file, depending upon + how the file is buffered. It is safest to classify a zero-length write + as having indeterminate behavior. + +4.9.3 The characteristics of file buffering. + + Files can be fully buffered, line buffered, or unbuffered. If a file is + buffered, a default buffer of 512 bytes is created upon opening the file. + +4.9.3 Whether a zero-length file actually exists. + + Yes, it does. + +4.9.3 Whether the same file can be open multiple times. + + Yes, it can. + +4.9.4.1 The effect of the remove function on an open file. + + No special checking for an already open file is performed; the + responsibility is left up to the programmer. + +4.9.4.2 The effect if a file with the new name exists prior to a call to +rename. + + rename will return a -1 and errno will be set to EEXIST. + +4.9.6.1 The output for %p conversion in fprintf. + + In near data models, four hex digits (XXXX). In far data models, four + hex digits, colon, four hex digits (XXXX:XXXX). + +4.9.6.2 The input for %p conversion in fscanf. + + See 4.9.6.1. + +4.9.6.2 The interpretation of an - (hyphen) character that is neither the +first nor the last character in the scanlist for a %[ conversion in fscanf. + + See the description of scanf in the Help system. + +4.9.9.1 The value to which the macro errno is set by the fgetpos or ftell +function on failure. + + EBADF Bad file number. + +4.9.10.4 The messages generated by perror. + +-------------------------------------------------------------------------- + Error 0 Invalid data + Invalid function number No such device + No such file or directory Attempted to remove current directory + Path not found Not same device + Too many open files No more files + Permission denied Invalid argument + Bad file number Arg list too big + Memory arena trashed Exec format error + Not enough memory Cross-device link + Invalid memory block address Math argument + Invalid environment Result too large + Invalid format File already exists + Invalid access code +--------------------------------------------------------------------------- +See perror in the Help system for details. + +4.10.3 The behavior of calloc, malloc, or realloc if the size requested is +zero. + + calloc and malloc will ignore the request. realloc will free the block. + +4.10.4.1 The behavior of the abort function with regard to open and temporary +files. + + The file buffers are not flushed and the files are not closed. + +4.10.4.3 The status returned by exit if the value of the argument is ] +other than zero, EXIT_SUCCESS, or EXIT_FAILURE. + + Nothing special. The status is returned exactly as it is passed. The + status is a represented as a signed char. + +4.10.4.4 The set of environment names and the method for altering the +environment list used by getenv. + + The environment strings are those defined in DOS with the SET command. + putenv can be used to change the strings for the duration of the current + program, but the DOS SET command must be used to change an environment + string permanently. + +4.10.4.5 The contents and mode of execution of the string by the system +function. + + The string is interpreted as a DOS command. COMMAND.COM is executed and +the argument string is passed as a command to execute. Any DOS built-in +command, as well as batch files and executable programs, can be executed. + +4.11.6.2 The contents of the error message strings returned by strerror. + + See 4.9.10.4. + +4.12.1 The local time zone and Daylight Saving Time. + + Defined as local PC time and date. + +4.12.2.1 The era for clock. + + Represented as clock ticks, with the origin being the beginning of the + program execution. + +4.12.3.5 The formats for date and time. + + Turbo C++ implements ANSI formats. diff --git a/M/TC/DOC/BASM.DOC b/M/TC/DOC/BASM.DOC new file mode 100644 index 0000000..0155188 --- /dev/null +++ b/M/TC/DOC/BASM.DOC @@ -0,0 +1,926 @@ + + + + + +CONTENTS +___________________________________________________________________________ + + + + + +Chapter 1 BASM.DOC 1 Inline assembly and register + Inline assembly language . . . . 1 variables . . . . . . . . . 7 + BASM . . . . . . . . . . . . . 1 Inline assembly, offsets, and + Inline syntax . . . . . . . . 2 size overrides . . . . . . 7 + Opcodes . . . . . . . . . . . 3 Using C structure members . . 7 + String instructions . . . . 5 Using jump instructions and + Prefixes . . . . . . . . . . 5 labels . . . . . . . . . . . 8 + Jump instructions . . . . . 5 Interrupt functions . . . . . . 9 + Assembly directives . . . . 6 Using low-level practices . . . 10 + Inline assembly references to + data and functions . . . . . . 6 Index 13 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + i + + + + + + +TABLES +___________________________________________________________________________ + + + + + +1.1: Opcode mnemonics . . . . . . 4 1.3: Jump instructions . . . . . .6 +1.2: String instructions . . . . . 5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ii + + + + + + + + + + + + +Online document +___________________________________________________________________________ + + + + BASM.DOC + + + This online file tells you how to use the Turbo C++ + built-in inline assembler (BASM) to include assembly + language routines in your C and C++ programs without + any need for a separate assembler. Such assembly + language routines are called inline assembly, because + they are compiled right along with your C routines, + rather than being assembled separately, then linked + together with modules produced by the C compiler. + + Of course, Turbo C++ also supports traditional mixed- + language programming in which your C program calls + assembly language routines (or vice-versa) that are + separately assembled by TASM (Turbo Assembler), sold + separately. In order to interface C and assembly + language, you must know how to write 80x86 assembly + language routines and how to define segments, data + constants, and so on. You also need to be familiar with + calling conventions (parameter passing sequences) in C + and assembly language, including the pascal parameter + passing sequence in C. + + Inline assembly ======================================================= + language + Turbo C++ lets you write assembly language code right + inside your C and C++ programs. This is known as inline + assembly. + +------------------ If you don't invoke TASM, Turbo C++ can assemble your + BASM inline assembly instructions using the built-in +------------------ assembler (BASM). This assembler can do everything TASM + can do with the following restrictions: + + o It cannot use assembler macros + + + + + - 1 - + + + + + + + o It cannot handle 80386 or 80486 instructions + + o It does not permit Ideal mode syntax + + o It allows only a limited set of assembler directives + (see page 6) + + +------------------ Of course, you also need to be familiar with the 80x86 + Inline syntax instruction set and architecture. Even though you're +------------------ not writing complete assembly language routines, you + still need to know how the instructions you're using + work, how to use them, and how not to use them. + + Having done all that, you need only use the keyword asm + to introduce an inline assembly language instruction. + The format is + + asm opcode operands ; or newline + + where + + o opcode is a valid 80x86 instruction (Table 1.0 lists + all allowable opcodes). + + o operands contains the operand(s) acceptable to the + opcode, and can reference C constants, variables, and + labels. + + o ; or newline is a semicolon or a new line, either of + which signals the end of the asm statement. + + A new asm statement can be placed on the same line, + following a semicolon, but no asm statement can + continue to the next line. + + To include a number of asm statements, surround them + with braces: + + The initial brace asm { +must appear on the pop ax; pop ds + same line as the iret + asm keyword. } + + Semicolons are not used to start comments (as they are + in TASM). When commenting asm statements, use C-style + comments, like this: + + + + + - 2 - + + + + + + + asm mov ax,ds; /* This comment is OK */ + asm {pop ax; pop ds; iret;} /* This is legal too */ + asm push ds ;THIS COMMENT IS + INVALID!! + + The assembly language portion of the statement is + copied straight to the output, embedded in the assembly + language that Turbo C++ is generating from your C or + C++ instructions. Any C symbols are replaced with ap- + propriate assembly language equivalents. + + Because the inline assembly facility is not a complete + assembler, it may not accept some assembly language + constructs. If this happens, Turbo C++ will issue an + error message. You then have two choices. You can + simplify your inline assembly language code so that the + assembler will accept it, or you can use an external + assembler such as TASM. However, TASM might not identi- + fy the location of errors, since the original C source + line number is lost. + + Each asm statement counts as a C statement. For + example, + + myfunc() + { + int i; + int x; + + if (i > 0) + asm mov x,4 + else + i = 7; + } + + This construct is a valid C if statement. Note that no + semicolon was needed after the mov x,4 instruction. asm + statements are the only statements in C that depend on + the occurrence of a new line. This is not in keeping + with the rest of the C language, but this is the + convention adopted by several UNIX-based compilers. + + An assembly statement can be used as an executable + statement inside a function, or as an external + declaration outside of a function. Assembly statements + located outside any function are placed in the data + segment, and assembly statements located inside func- + tions are placed in the code segment. + + + + - 3 - + + + + + + +------------------ You can include any of the 80x86 instruction opcodes as + Opcodes inline assembly statements. There are four classes of +------------------ instructions allowed by the Turbo C++ compiler: + + o normal instructions--the regular 80x86 opcode set + + o string instructions--special string-handling codes + + o jump instructions--various jump opcodes + + o assembly directives--data allocation and definition + + Note that all operands are allowed by the compiler, + even if they are erroneous or disallowed by the + assembler. The exact format of the operands is not + enforced by the compiler. + + + ------------------------------------------------------- + +Opcode mnemonics aaa fclex fldenv fstenv + aad fcom fldl2e fstp + aam fcomp fldl2t fstsw + aas fcompp fldlg2 fsub + adc fdecstp** fldln2 fsubp + This table lists add fdisi fldpi fsubr + the opcode and fdiv fldz fsubrp +mnemonics that can bound fdivp fmul ftst + be used in inline call fdivr fmulp fwait + assembler. cbw fdivrp fnclex fxam + clc feni fndisi fxch + cld ffree** fneni fxtract +Inline assembly in cli fiadd fninit fyl2x + routines that use cmc ficom fnop fyl2xp1 + floating-point cmp ficomp fnsave hlt + emulation doesn't cwd fidiv fnstcw idiv + support the daa fidivr fnstenv imul + opcodes marked das fild fnstsw in + with **. dec fimul fpatan inc + div fincstp** fprem int + enter finit fptan into + f2xm1 fist frndint iret + fabs fistp frstor lahf + fadd fisub fsave lds + faddp fisubr fscale lea + fbld fld fsqrt leave + fbstp fld1 fst les + fchs fldcw fstcw lsl + + + + - 4 - + + + + + + + mul or ret stc + neg out rol std + nop pop ror sti + not popa sahf sub + popf sal test + push sar verr + pusha sbb verw + pushf shl wait + rcl shr xchg + rcr smsw xlat + xor + ------------------------------------------------------- + + + String instructions + ======================================================= + + In addition to the listed opcodes, the string + instructions given in the following table can be used + alone or with repeat prefixes. + String + instructions ------------------------------------------------------- + cmps insw movsb outsw stos + cmpsb lods movsw scas stosb + cmpsw lodsb outs scasb stosw + ins lodsw outsb scasw + insb movs + + ------------------------------------------------------- + + + Prefixes + ======================================================= + + The following prefixes can be used: + + lock rep repe repne repnz repz + + + Jump instructions + ======================================================= + + Jump instructions are treated specially. Since a label + cannot be included on the instruction itself, jumps + must go to C labels (discussed in "Using jump + instructions and labels" on page 8). The allowed jump + instructions are given in the next table. + + + + - 5 - + + + + + + + Table 1.3: Jump instructions (continued)_______________ + + Jump ------------------------------------------------------- + instructions ja jge jnc jns loop + jae jl jne jnz loope + jb jle jng jo loopne + jbe jmp jnge jp loopnz + jc jna jnl jpe loopz + jcxz jnae jnle jpo + je jnb jno js + jg jnbe jnp jz + + ----------------------------------------- + + + Assembly directives + ======================================================= + + The following assembly directives are allowed in Turbo + C++ inline assembly statements: + + db dd dw extrn + + +------------------ You can use C symbols in your asm statements; Turbo C++ + Inline assembly automatically converts them to appropriate assembly +references to data language operands and appends underscores onto + and functions identifier names. You can use any symbol, including +------------------ automatic (local) variables, register variables, and + function parameters. + + In general, you can use a C symbol in any position + where an address operand would be legal. Of course, you + can use a register variable wherever a register would + be a legal operand. + + If the assembler encounters an identifier while parsing + the operands of an inline assembly instruction, it + searches for the identifier in the C symbol table. The + names of the 80x86 registers are excluded from this + search. Either uppercase or lowercase forms of the + register names can be used. + + + + + + + + + + - 6 - + + + + + + + Inline assembly and register variables + ======================================================= + + Inline assembly code can freely use SI or DI as scratch + registers. If you use SI or DI in inline assembly code, + the compiler won't use these registers for register + variables. + + + Inline assembly, offsets, and size overrides + ======================================================= + + When programming, you don't need to be concerned with + the exact offsets of local variables. Simply using the + name will include the correct offsets. + + However, it may be necessary to include appropriate + WORD PTR, BYTE PTR, or other size overrides on assembly + instruction. A DWORD PTR override is needed on LES or + indirect far call instructions. + + +------------------ You can reference structure members in an inline + Using C structure assembly statement in the usual fashion (that is, + members variable.member). In such a case, you are dealing with +------------------ a variable, and you can store or retrieve values. + However, you can also directly reference the member + name (without the variable name) as a form of numeric + constant. In this situation, the constant equals the + offset (in bytes) from the start of the structure + containing that member. Consider the following program + fragment: + + struct myStruct { + int a_a; + int a_b; + int a_c; + } myA ; + + myfunc() + { + ... + asm {mov ax, myA.a_b + mov bx, [di].a_c + } + ... + } + + + + + - 7 - + + + + + + + We've declared a structure type named myStruct with + three members, a_a, a_b, and a_c; we've also declared a + variable myA of type myStruct. The first inline + assembly statement moves the value contained in myA.a_b + into the register AX. The second moves the value at the + address [di] + offset(a_c) into the register BX (it + takes the address stored in DI and adds to it the + offset of a_c from the start of myStruct). In this + sequence, these assembler statements produce the + following code: + + mov ax, DGROUP : myA+2 + mov bx, [di+4] + + Why would you even want to do this? If you load a + register (such as DI) with the address of a structure + of type myStruct, you can use the member names to + directly reference the members. The member name + actually can be used in any position where a numeric + constant is allowed in an assembly statement operand. + + The structure member must be preceded by a dot (.) to + signal that a member name, rather than a normal C + symbol, is being used. Member names are replaced in the + assembly output by the numeric offset of the structure + member (the numeric offset of a_c is 4), but no type + information is retained. Thus members can be used as + compile-time constants in assembly statements. + + However, there is one restriction. If two structures + that you are using in inline assembly have the same + member name, you must distinguish between them. Insert + the structure type (in parentheses) between the dot and + the member name, as if it were a cast. For example, + + asm mov bx,[di].(struct tm)tm_hour + + +------------------ You can use any of the conditional and unconditional + Using jump jump instructions, plus the loop instructions, in + instructions and inline assembly. They are only valid inside a function. + labels Since no labels can be defined in the asm statements, +------------------ jump instructions must use C goto labels as the object + of the jump. If the label is too far away, the jump + will be automatically converted to a long-distance + jump. Direct far jumps cannot be generated. + + + + + + - 8 - + + + + + + + In the following code, the jump goes to the C goto + label a. + + int x() + { + a: /* This is the goto label "a" */ + ... + asm jmp a /* Goes to label "a" */ + ... + } + + Indirect jumps are also allowed. To use an indirect + jump, you can use a register name as the operand of the + jump instruction. + + + Interrupt func- ======================================================= + tions + The 80x86 reserves the first 1024 bytes of memory for a + set of 256 far pointers--known as interrupt vectors--to + special system routines known as interrupt handlers. + These routines are called by executing the 80x86 + instruction + + int int# + + where int# goes from 0h to FFh. When this happens, the + computer saves the code segment (CS), instruction + pointer (IP), and status flags, disables the + interrupts, then does a far jump to the location + pointed to by the corresponding interrupt vector. For + example, one interrupt call you're likely to see is + + int 21h + + which calls most DOS routines. But many of the + interrupt vectors are unused, which means, of course, + that you can write your own interrupt handler and put a + far pointer to it into one of the unused interrupt + vectors. + + To write an interrupt handler in Turbo C++, you must + define the function to be of type interrupt; more + specifically, it should look like this: + + void interrupt myhandler(bp, di, si, ds, es, dx, + + + + + - 9 - + + + + + + + cx, bx, ax, ip, cs, flags, + ... ); + + As you can see, all the registers are passed as + parameters, so you can use and modify them in your code + without using the pseudovariables discussed earlier in + this online file. You can also pass additional + parameters (flags, ...) to the handler; those should be + defined appropriately. + + A function of type interrupt will automatically save + (in addition to SI, DI, and BP) the registers AX + through DX, ES, and DS. These same registers are + restored on exit from the interrupt handler. + + Interrupt handlers may use floating-point arithmetic in + all memory models. Any interrupt handler code that uses + an 80x87 must save the state of the chip on entry and + restore it on exit from the handler. + + An interrupt function can modify its parameters. + Changing the declared parameters will modify the + corresponding register when the interrupt handler + returns. This may be useful when you are using an + interrupt handler to act as a user service, much like + the DOS INT 21 services. Also, note that an interrupt + function exits with an IRET (return from interrupt) + instruction. + + So, why would you want to write your own interrupt + handler? For one thing, that's how most memory-resident + routines work. They install themselves as interrupt + handlers. That way, whenever some special or periodic + action takes place (clock tick, keyboard press, and so + on), these routines can intercept the call to the + routine handling the interrupt and see what action + needs to take place. Having done that, they can then + pass control on to the routine that was there. + + + Using low-level ======================================================= + practices + You've already seen a few examples of how to use these + different low-level practices in your code; now it's + time to look at a few more. Let's start with an + interrupt handler that does something harmless but + tangible (or, in this case, audible): It beeps whenever + it's called. + + + + - 10 - + + + + + + + First, write the function itself. Here's what it might + look like: + + #include + + void interrupt mybeep(unsigned bp, unsigned di, + unsigned si, + unsigned ds, unsigned es, + unsigned dx, + unsigned cx, unsigned bx, + unsigned ax) + { + int i, j; + char originalbits, bits; + unsigned char bcount = ax >> 8; + + /* Get the current control port setting */ + bits = originalbits = inportb(0x61); + + for (i = 0; i <= bcount; i++){ + + /* Turn off the speaker for awhile */ + outportb(0x61, bits & 0xfc); + for (j = 0; j <= 100; j++) + ; /* empty statement */ + + /* Now turn it on for some more time */ + outportb(0x61, bits | 2); + for (j = 0; j <= 100; j++) + ; /* another empty statement */ + } + + /* Restore the control port setting */ + outportb(0x61, originalbits); + } + + Next, write a function to install your interrupt + handler. Pass it the address of the function and its + interrupt number (0 to 255 or 0x00 to 0xFF). + + void install(void interrupt (*faddr)(), int inum) + { + setvect(inum, faddr); + } + + Finally, call your beep routine to test it out. Here's + a function to do just that: + + + + + - 11 - + + + + + + + void testbeep(unsigned char bcount, int inum) + { + _AH = bcount; + geninterrupt(inum); + } + + Your main function might look like this: + + main() + { + char ch; + + install(mybeep,10); + testbeep(3,10); + ch = getch(); + } + + You might also want to preserve the original interrupt + vector and restore it when your main program is + finished. Use the getvect and setvect functions to do + this. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - 12 - + + + + + + +INDEX +___________________________________________________________________________ + + + + + +A F +asm (keyword) 2 floating point + braces and 2 arithmetic +assembler interrupt functions and 10 + built in 1 functions +assembly language calling + inline 1 in inline assembly code 6 + braces and 2 + C structure members and 7 + restrictions 8 G + calling functions 6 goto statements + commenting 2 assembly language and 8 + directives 6 + goto in 8 + jump instructions 5, 8 I + option (*B) 1 INT instruction 9 + referencing data in 6 interrupt (keyword) 9 + register variables in 7 interrupts + semicolons and 3 beep + size overrides in 7 example 11 + syntax 2 functions + variable offsets in 7 example of 10 + floating-point arithmetic in 10 + handlers +B calling 11 +braces installing 11 + asm keyword and 2 programming 9 +built-in assembler 1 + + J +C jump instructions, inline assembly language +command-line compiler table 5 + options using 8 + assembly language and 1 + -B (inline assembler code) 1 + inline assembler code 1 L +comments labels + inline assembly language code 2 in inline assembly code 8 + + + + + + +Index 13 + + + + + + +M repeat prefix opcodes 5 +memory-resident routines 10 + + S +O size overrides in inline assembly +opcodes 3 code 7 + defined 2 software interrupt instruction 9 + mnemonics sounds + table 4 beep 11 + repeat prefixes 5 structures +operands (assembly language) 2 members + in inline assembly code 7 + restrictions 8 +P syntax +prefix opcodes, repeat 5 inline assembly language 2 +programs + terminate and stay resident + interrupt handlers and 10 T + terminate and stay resident + programs +R interrupt handlers and 10 +referencing data in inline assembly Turbo Assembler 1 + code 6 +registers + DI V + assembly language and 7 variables + SI offsets in inline assembly code 7 + assembly language and 7 + variables + in inline assembly code 7 + + + + + + + + + + + + + + + + + + + + + + - 14 - + diff --git a/M/TC/DOC/BRIEF.TEM b/M/TC/DOC/BRIEF.TEM new file mode 100644 index 0000000..77af80b --- /dev/null +++ b/M/TC/DOC/BRIEF.TEM @@ -0,0 +1,332 @@ +/*********************************************************************** + + Brief editor emulation for Borland C++ IDE. + + This file contains a Turbo Editor Macro Language (TEML) +script which emulates the Brief programmer's editor in the Borland +C++ IDE. A complete description of the TEML language and the Turbo +Editor Macro Compiler (TEMC) can be found in the file "UTIL.DOC". + + The TEMC compiler can be invoked from the DOS command line at +follows: + + temc [-c] brief.tem + +The optional -c switch can also be specified as /c, and can appear in +any argument position on the command line. If you use this option, +any existing command table in your configuration file is thrown away +before the script file is merged with those already defined. The +configuration file extensions is assumed to be .TC. The configuration +file need not exist. If it does not exist, it is created. +tcconfig.tc is the main configuration file. + +Most of the simple Brief commands have been fully implemented. Most +of the complex commands have been either partially implemented or not +implemented at all. Below is a list of the commands that have been +fully or partially implemented. + +IDE Binding Brief Command Comments +----------- --------------- ------------------------- +F4 Close Window Closes the current window +F5 Search +F6 Replace +F10 Command Activates system menu +Shift-F5 Search Backward Repeats previous search + Option to go backward can be selected +Shift-F6 Repeat Replace Repeats previous replace + Option to go backward can be selected +Ins Paste Scrap Pastes current clipboard selection +Del Delete Deletes current character only +PgDn Page Down +PgUp Page Up +UpAr Cursor Up +DnAr Cursor Down +Star Undo +Plus Copy Block Copies block to clipboard +Minus Move Block Cuts block to clipboard +Ctrl-D Scroll Down +Ctrl-E Scroll Up +Ctrl-G Routines Activates the search menu + Find function can be selected here +Ctrl-N Next Error +Ctrl-P Error list Moves to previous error +Ctrl-K Delete To BOL Deletes to beginning of line +Ctrl-U Redo +Ctrl-W Toggle Backup Activates Options menu + Backup files can be toggled here +Ctrl-F5 Case Sensitivity Selects search dialog box + Case sensitivity can be toggled here +Ctrl-F6 Toggle Regular Exp. Selects search dialog box + Regular expressions can be toggled here +Ctrl-bksp Delete Prev Word +Alt-A Drop anchor Sets beginning of block +Alt-B Buffer List Lists ALL open windows +Alt-C Column mark Sets beginning of *non-column* block +Alt-D Delete line +Alt-E Edit File +Alt-G Goto line Activates the search menu + Goto line can be selected here +Alt-H Help Context sensitive help +Alt-I Toggle Insert +Alt-J+0 Goto BookMark(0) Only marks 0-5 are supported +Alt-J+1 Goto BookMark(1) : +Alt-J+2 Goto BookMark(2) : +Alt-J+3 Goto BookMark(3) : +Alt-J+4 Goto BookMark(4) : +Alt-J+5 Goto BookMark(5) by this macro file +Alt-K Delete To EOL +Alt-L Mark Line +Alt-M Mark Sets beginning of block +Alt-N Next Buffer Cycles to next open window +Alt-O New output file Activates file menu + Save as... can be selected here +Alt-P Print Block +Alt-Q Quote Insert literal character +Alt-R Read Block +Alt-S Search +Alt-T Replace +Alt-U Undo +Alt-V Version Activates system menu + About can be selected here +Alt-W Write File +Alt-X Quit +Alt-Z DOS Shell Activates the file menu + OS Shell can be selected here +Alt-0 Set BookMark(0) +Alt-1 Set BookMark(1) +Alt-2 Set BookMark(2) +Alt-3 Set BookMark(3) +Alt-4 Set BookMark(4) +Alt-5 Set BookMark(5) +Alt-F2 Zoom Window +Alt-F5 Incremental Search Prompts for search string + IDE does not support inc. search +Alt-F6 Translate Backwards Prompts for replace string + Option to go backward can be selected +Alt-F10 Compile File +Alt-BkSp Delete Next Word + +****************************************************************/ + +/******* Macros ********/ + +MACRO MacScrollUp + ScrollScreenUp; + FixCursorPos; +END; + +MACRO MacScrollDown + ScrollScreenDown; + FixCursorPos; +END; + +MACRO MacPageUp + FixScreenPos; + PageScreenUp; + FixCursorPos; +END; + +MACRO MacPageDown + FixScreenPos; + PageScreenDown; + FixCursorPos; +END; + +MACRO MacDeleteLine + DeleteLine; + LeftOfLine; +END; + +MACRO MacTopOfScreen + SetPrevPos; + TopOfScreen; +END; + +MACRO MacBottomOfScreen + SetPrevPos; + BottomOfScreen; +END; + +MACRO MacHomeCursor + SetPrevPos; + HomeCursor; +END; + +MACRO MacEndCursor + SetPrevPos; + EndCursor; +END; + +MACRO MacOpenLine + RightOfLine; + LiteralChar(13); +END; + + +MACRO MacSetBlockBeg + HideBlock; + SetBlockBeg; +END; + +MACRO MacSetBlockEnd + HideBlock; + SetBlockEnd; + HighlightBlock; +END; + +MACRO MacMarkLine + HideBlock; + SetTempPos; + RightOfLine; + CursorCharRight; + SetBlockEnd; + CursorCharLeft; + LeftOfLine; + SetBlockBeg; + HighlightBlock; + MoveToTempPos; +END; + +MACRO MacMarkWord + HideBlock; + SetTempPos; + CursorRight; + WordLeft; + RightOfWord; + SetBlockEnd; + WordLeft; + SetBlockBeg; + HighlightBlock; + MoveToTempPos; +END; + +MACRO MacMoveToBlockBeg + SetPrevPos; + MoveToBlockBeg; + CenterFixScreenPos; +END; + +MACRO MacMoveToBlockEnd + SetPrevPos; + MoveToBlockEnd; + CenterFixScreenPos; +END; + +MACRO MacMoveToPrevPos + SwapPrevPos; + CenterFixScreenPos; +END; + +MACRO MacCopyBlock + CopyBlock; + HideBlock; + CenterFixScreenPos; +END; + +MACRO MacMoveBlock + MoveBlock; + HighlightBlock; + CenterFixScreenPos; +END; + +MACRO MacBreakLine + LiteralChar(13); + CursorCharLeft; +END; + +MACRO MacDeleteNextWord + WordRight; + MacMarkWord; + DeleteBlock; + CenterFixScreenPos; +END; + +MACRO MacDeletePrevWord + WordLeft; + MacMarkWord; + DeleteBlock; + CenterFixScreenPos; +END; + +MACRO MacDeleteToBOL + SetPrevPos; + LeftOfLine; + SetBlockBeg; + MoveToPrevPos; + SetBlockEnd; + DeleteBlock; + CenterFixScreenPos; +END; + +/******* Brief Key Bindings ******/ + +F4 : CloseWindow; +F5 : GetFindString; +F6 : Replace; +F10 : Menu; + +Shift-F5 : RepeatSearch; +Shift-F6 : RepeatSearch; + +Ins : ClipPaste; +Del : DeleteChar; +PgDn : MacPageDown; +PgUp : MacPageUp; +UpAr : CursorUp; +DnAr : CursorDown; +Star : Undo; +Plus : MacCopyBlock; +Minus : MoveBlock; + +Ctrl-D : MacScrollDown; +Ctrl-E : MacScrollUp; +Ctrl-G : SearchMenu; +Ctrl-N : NextError; +Ctrl-P : PrevError; +Ctrl-K : MacDeleteToBOL; +Ctrl-U : Redo; +Ctrl-W : OptionsMenu; +Ctrl-F5 : GetFindString; +Ctrl-F6 : GetFindString; +Ctrl-bksp : MacDeletePrevWord; + +Alt-A : SetBlockBeg; +Alt-B : WindowList; +Alt-C : MacSetBlockBeg; +Alt-D : MacDeleteLine; +Alt-E : OpenFile; +Alt-G : SearchMenu; +Alt-H : Help; +Alt-I : ToggleInsert; +Alt-J+0 : MoveToMark(0); +Alt-J+1 : MoveToMark(1); +Alt-J+2 : MoveToMark(2); +Alt-J+3 : MoveToMark(3); +Alt-J+4 : MoveToMark(4); +Alt-J+5 : MoveToMark(5); +Alt-K : DeleteToEOL; +Alt-L : MacMarkLine; +Alt-M : SetBlockBeg; +Alt-N : NextWindow; +Alt-O : FileMenu; +Alt-P : PrintBlock; +Alt-Q : LiteralChar; +Alt-R : ReadBlock; +Alt-S : GetFindString; +Alt-T : Replace; +Alt-U : Undo; +Alt-V : SystemMenu; +Alt-W : SaveFile; +Alt-X : Quit; +Alt-Z : FileMenu; +Alt-0 : SetMark(0); +Alt-1 : SetMark(1); +Alt-2 : SetMark(2); +Alt-3 : SetMark(3); +Alt-4 : SetMark(4); +Alt-5 : SetMark(5); +Alt-F2 : ZoomWindow; +Alt-F5 : GetFindString; +Alt-F6 : GetFindString; +Alt-F10 : CompileFile; +Alt-BkSp : MacDeleteNextWord; diff --git a/M/TC/DOC/CLASSLIB.DOC b/M/TC/DOC/CLASSLIB.DOC new file mode 100644 index 0000000..6abdbb2 --- /dev/null +++ b/M/TC/DOC/CLASSLIB.DOC @@ -0,0 +1,6730 @@ + + +Online document +___________________________________________________________________________ + + The container class libraries + + + CONTENTS + + + + +1 The container class libraries 1 Member functions . . . . . . . 38 +What's new since version 1.0? . . 1 Friends . . . . . . . . . . . . 40 +Why two sets of libraries? . . . . 3 Array . . . . . . . . . . . . . . 41 +Container basics . . . . . . . . . 4 Example . . . . . . . . . . . . 41 + Object-based and other Member functions . . . . . . . 42 + classes . . . . . . . . . . . 6 ArrayIterator . . . . . . . . . . 43 + Class categories . . . . . . . . 6 Member functions . . . . . . . 43 + Non-container classes . . . . . 7 Association . . . . . . . . . . . 44 + Error class . . . . . . . . . 7 Member functions . . . . . . . 44 + Sortable class . . . . . . . . 7 Example . . . . . . . . . . . . 45 + Association class . . . . . . 8 Bag . . . . . . . . . . . . . . . 47 + Container classes . . . . . . . 8 Member functions . . . . . . . 47 + Containers and ownership . . . . 9 BaseDate . . . . . . . . . . . . 49 + Container iterators . . . . . 11 Member functions . . . . . . . 49 + Sequence classes . . . . . . . 12 BaseTime . . . . . . . . . . . . 51 + Collections . . . . . . . . . 12 Member functions . . . . . . . 51 + Unordered collections . . . 13 Btree . . . . . . . . . . . . . . 53 + Ordered collections . . . . 13 Member functions . . . . . . . 53 +The BIDS template library . . . 13 Friends . . . . . . . . . . . . 55 + Templates, classes, and BtreeIterator . . . . . . . . . . 55 + containers . . . . . . . . . . 14 Member functions . . . . . . . 56 + Container implementation . . . 14 Collection . . . . . . . . . . . 57 + The template solution . . . . 15 Member functions . . . . . . . 58 + ADTs and FDSs . . . . . . . 16 Container . . . . . . . . . . . . 59 + Class templates . . . . . . 17 Member functions . . . . . . . 60 + Container class compatibility . 20 Friends . . . . . . . . . . . . 63 + Header files . . . . . . . . . 22 ContainerIterator . . . . . . . . 64 + Tuning an application . . . . 23 Member functions . . . . . . . 64 + FDS implementation . . . . . . 24 Date . . . . . . . . . . . . . . 65 + ADT implementation . . . . . . 27 Member functions . . . . . . . 65 +The class library directory . . 31 Deque . . . . . . . . . . . . . . 66 + The INCLUDE directory . . . . 32 Example . . . . . . . . . . . . 67 + The OBJS directory . . . . . . 32 Member functions . . . . . . . 68 + The SOURCE directory . . . . . 32 Dictionary . . . . . . . . . . . 69 + Creating a library . . . . . 33 Member functions . . . . . . . 69 + The LIB directory . . . . . . 34 DoubleList . . . . . . . . . . . 70 + The EXAMPLES directory . . . . 34 Member functions . . . . . . . 71 +Preconditions and checks . . . . 35 Friends . . . . . . . . . . . . 73 +Container class reference . . . 36 DoubleListIterator . . . . . . . 73 +AbstractArray . . . . . . . . . 37 Member functions . . . . . . . 73 + Data members . . . . . . . . . 37 Error . . . . . . . . . . . . . . 74 + + + + i + + + + + + + Member functions . . . . . . . 75 Member functions . . . . . . . 92 +HashTable . . . . . . . . . . . 75 Set . . . . . . . . . . . . . . . 92 + Member functions . . . . . . . 76 Member functions . . . . . . . 92 + Friends . . . . . . . . . . . 78 Sortable . . . . . . . . . . . . 93 +HashTableIterator . . . . . . . 78 Member functions . . . . . . . 95 + Member functions . . . . . . . 78 Related functions . . . . . . . 96 +List . . . . . . . . . . . . . . 79 SortedArray . . . . . . . . . . . 97 + Member functions . . . . . . . 79 Stack . . . . . . . . . . . . . . 97 + Friends . . . . . . . . . . . 80 Example . . . . . . . . . . . . 98 +ListIterator . . . . . . . . . . 81 Member functions . . . . . . . 99 + Member functions . . . . . . . 81 String . . . . . . . . . . . . 100 +MemBlocks . . . . . . . . . . . 82 Member functions . . . . . . 100 +MemStack . . . . . . . . . . . . 83 Example . . . . . . . . . . . 101 +Object . . . . . . . . . . . . . 84 Time . . . . . . . . . . . . . 102 + Data member . . . . . . . . . 84 Member functions . . . . . . 103 + Member functions . . . . . . . 84 Timer . . . . . . . . . . . . . 104 + Friends . . . . . . . . . . . 87 Member functions . . . . . . 104 + Related functions . . . . . . 87 TShouldDelete . . . . . . . . . 105 +PriorityQueue . . . . . . . . . 88 Member functions . . . . . . 105 + Member functions . . . . . . . 89 +Queue . . . . . . . . . . . . . 90 Index 107 + Example . . . . . . . . . . . 91 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ii + + + + + + + + + + + + + +Online document +___________________________________________________________________________ + + + + The container class libraries + + + For more Turbo C++ version 3.0 includes two complete container + information about class libraries: an enhanced version of the Object- + templates, see based library supplied with version 1.0, plus a brand- + Chapter 13, "C++ new implementation based on templates. This chapter + specifics." describes both libraries. We assume that you are + familiar with the syntax and semantics of C++ and with + the basic concepts of object-oriented programming + (OOP). To understand the template-based version (called + BIDS, for Borland International Data Structures), you + should be acquainted with C++'s new template mechanism. + + The chapter is divided into seven parts: + + o A review of the difference between versions 1.0 and + 3.0 of the class libraries + o An overview of the Object- and template-based + libraries + o A survey of the Object container classes, introducing + the basic concepts and terminology + o An overview of the BIDS library + o The CLASSLIB directory and how to use it + o Debugging tools + o An alphabetic reference guide to the Object container + library, listing each class and its members + + + +=========================================================================== +What's new since version 1.0? +=========================================================================== + + The version 1.0 container library is an Object-based + implementation. Both container objects and the elements + stored in them are all ultimately derived from the + + + + - 1 - + + + + + + + class Object. Further, the data structures used to + implement each container class were fixed and (usually) + hidden from the programmer. This provides a simple, + effective model for most container applications. + Version 3.0 therefore offers an enhanced, code- + compatible version of the previous Object-based + container library. We call this the Object container + class library. In addition, a more flexible (but more + complex), template-based container library, called BIDS + (Borland International Data Structures), is supplied + with version 3.0. Through the power of templates, BIDS + lets you vary the underpinning data structure for a + container and lets you store arbitrary objects in a + container. With the appropriate template parameters, + BIDS can actually emulate the Object container library. + + Before we review the differences between the Object and + BIDS models, we'll list the changes to the Object + container library since version 1.0: + + o New Btree and PriorityQueue classes. + o New TShouldDelete class gives the programmer control + over container/element ownership. You can control the + fate of objects when they are detached from a + container and when the container is flushed (using + the new flush method) or destroyed. + o New memory management classes, MemBlocks and + MemStack, for efficient memory block and memory stack + (mark-and-release) allocations. + o New PRECONDITION and CHECK macros provide sophisti- + cated assert mechanisms to speed application develop- + ment and debugging. + o New Timer class gives you a stopwatch for timing + program execution. + + When you choose Existing Turbo C++ version 1.01 container class code + Container Class will still run with the version 3.0 libraries. The new + Library in the Object container class libraries, in directory + IDE's Options| \CLASSLIB, are distinguished by the prefix TC: + Linker|Libraries TCLASSx.LIB and TCLASDBx.LIB where x specifies the + dialog box, the memory model, and DB indicates the special debug + Object-based version. To reduce verbiage, we will often refer to + libraries will be this container implementation as the Object or TC + automatically version. + linked in. + + + + + + + - 2 - + + + + + + + To use the The corresponding libraries for the new template-based + template-based container classes are distinguished by the prefix BIDS: + libraries, you BIDSx.LIB and BIDSDBx.LIB. Let's review the reasons for + must explicitly having two sets of container libraries. The use of all + add the these libraries is covered on page 31. + appropriate + BIDS[DB]x.LIB + library to your + project or + makefile. + + + +=========================================================================== +Why two sets of libraries? +=========================================================================== + + The Object container classes have been retained and + enhanced to provide code compatibility with the version + 1.0 library. They provide a gentler learning curve than + the template-based BIDS library. The Object container + code offers faster compilation but slightly slower + execution than the template version. The project files + for the example and demo programs are set up to use the + Object version of the container libraries. + + BIDS exploits the new exciting templates feature of C++ + 2.1. It offers you considerable flexibility in choosing + the best underlying data structure for a given + container application. With the Object version, each + container is implemented with a fixed data structure, + chosen to meet the space/speed requirements of most + container applications. For example, a Bag object is + implemented with a hash table, and a Deque object with + a double list. With BIDS you can fine-tune your + application by varying the container implementation + with the minimum recoding--often a single typedef will + suffice. You can switch easily from StackAsList to + StackAsVector and test the results. In fact, you'll see + that by setting appropriate values for , a generic + class parameter, you can implement the Object model + exactly. With BIDS, you can even choose between + polymorphic and non-polymorphic implementations of the + Object container model. Such choices between execution + speed (non-polymorphic) and future flexibility + (polymorphic) can be tested without major recoding. + + + + + + - 3 - + + + + + + + Existing code Both the Object and BIDS versions provide the same + based on the functional interface. For example, the push and pop + Object container member functions work the same for all Stack objects. + classes will This makes the new template-based libraries highly + compile and run compatible with existing code written for the Object + perfectly using library. + the new BIDS + classes, just by The objects stored in Object library containers must be + linking in the derived from the class Object. To store ints, say, you + appropriate would have to derive an Integer class from Object + library. (you'll see how later). With BIDS you have complete + freedom and direct control over the types of objects + stored in a container. The stored data type is simply a + value passed as a template parameter. For instance, + BI_ListImp gives you a list of ints. + + Regardless of which container class model you elect to + use, you should be familiar with container terminology, + the Object class hierarchy, and the functionality + provided for each container type. Although the classes + in the BIDS library have different naming conventions + and special template parameters, the prototypes and + functionality of each class member are the same as + those in the Object library. + + + +=========================================================================== +Container basics +=========================================================================== + + If you are fully We start by describing the Object container class + versed in the hierarchy as enhanced for Turbo C++ version 3.0. This + Turbo C++ 1.0 hierarchy offers a high degree of modularity through + version of the inheritance and polymorphism. You can use these classes +container library, as they are, or you can extend and expand them to pro- + you should first duce an object-oriented software package specific to + check out the your needs. + Object library + enhancements At the top of the class hierarchy is the Object class + before moving to (see Figure 1), an abstract class that cannot be + the templates instantiated (no objects of its type can be declared). + section on page An abstract class serves as an umbrella for related + 14. classes. As such, it has few if any data members, and + some or all of its member functions are pure virtual + functions. Pure virtual functions serve as placeholders + for functions of the same name and signature intended + + + + + - 4 - + + + + + + + to be defined eventually in derived classes. In fact, + any class with at least one pure virtual function is, + by definition, an abstract class. + +Figure 1: Class hierarchies in CLASSLIB + +ObjectÄÂÄError + ÃÄSortableÄÄÄÄÂÄString + ³ ÃÄBaseDateÄÄÄÄÄDate + ³ ÀÄBaseTimeÄÄÄÄÄTime + ÃÄAssociation + ÀÄContainerÄÄÄÂÄCollectionÄÂÄAbstractArrayÄÂÄArray + ³ ³ ÀÄSortedArray + ³ ÃÄHashTable + ³ ÃÄBagÄÄSetÄÄDictionary + ³ ÃÄList + ³ ÃÄBtree + ³ ÀÄDoubleList + ÃÄStack + ÃÄDequeÄÄQueue + ÀÄPriorityQueue +ContainerIteratorÄÄÄÄÂÄHashTableIterator + ÃÄListIterator + ÃÄDoubleListIterator + ÃÄBtreeIterator + ÀÄArrayIterator +Memblocks +MemStack + Note that TShouldDelete provides a second base + (multiple inheritance) for both Container and + Association. + + A class derived from an abstract class can provide a + body defining the inherited pure virtual function. If + it doesn't, the derived class remains abstract, + providing a base for further derivations. When you + reach a derived class with no pure virtual functions, + the class is called a non-abstract or instance class. + As the name implies, instance classes can be + instantiated to provide usable objects. + + An abstract class can be the base for both abstract and + instance classes. For example, you'll see that + Container, an abstract class derived from the abstract + class Object, is the base for both Collection + (abstract) and Stack (instance). + + + + + + - 5 - + + + + + + + To enhance your As you read this chapter, bear in mind that a derived + understanding of class inherits and can access all non-private data + the classes, you members and member functions from all its ancestral + can review their base classes. For example, the Array class does not + declarations in need to explicitly define a function to print an array, + the source code because its immediate parent class AbstractArray does + files in the so. The Container class, an ancestor further up the + CLASSLIB class tree, defines a different print function that can + directory. also be used with an array, because an array is a + container. To determine all the member functions + available to an object, you will have to ascend the + class hierarchy tree. Because the public interface is + intended to be sufficient for applications, object- + oriented programming makes a knowledge of private data + members unnecessary; therefore, private members (with a + few exceptions) are not documented in this chapter. + + +------------------ The Object-based hierarchy contains classes derived + Object-based and from the class Object (together with some other utility + other classes classes). Object provides a minimal set of members +------------------ representing what every derived object must do; these + are described in the reference section under Object + (page 84). Both the containers-as-objects and the + objects they store are objects derived (ultimately) + from Object. Later you'll see that the template-based + containers can contain objects of any data type, not + just those derived from Object. + + Class categories ======================================================= + + The classes in or near the Object hierarchy can be + divided into three groups: + + o The non-container classes include Object itself, and + those classes derived from Object, such as String and + Date, which cannot store other objects. + o The container classes (also derived from Object), + such as Array and List, which can store objects of + other, usually non-container, class types. + o The helper and utility classes not derived from + Object, such as TShouldDelete, ListIterator and + MemStack. + + Let's look at each category in more detail, although as + with most OOP topics, they are closely related. + + + + + + - 6 - + + + + + + + Non-container ======================================================= + classes + The basic non-container classes provided are Object and + its three children: Error (instance), Sortable + (abstract), and Association (instance). Recall that the + main purpose of these classes is to provide objects + that can be stored as data elements in containers. To + this end, all Object-derived classes provide a hashing + function allowing any of their objects to be stored in + a hash table. + +------------------ Error is not a normal class; it exists solely to define + Error class a unique, special object called theErrorObject. A +------------------ pointer to theErrorObject carries the mnemonic + Error see page 74 NOOBJECT. NOOBJECT is rather like a null pointer, but + in the reference serves the vital function of occupying empty slots in a + section. container. For example, when an Array object is created + (not to be confused with a traditional C array), each + of its elements will initially contain NOOBJECT. + +------------------ Sortable is an abstract class from which sortable + Sortable class classes must be derived. Some containers, known as +------------------ ordered collections, need to maintain their elements in + a particular sequence. Collections such as SortedArray + and PriorityQueue, for example, must have consistent + methods for comparing the "magnitude" of objects. + Sortable adds the pure virtual function isLessThan to + its base, Object. Classes derived from Sortable need to + define IsLessThan and IsEqual (inherited from Object) + for their particular objects. Using these members, the + relational operators <, ==, >, >=, and so on, can be + overloaded for sortable objects. Typical sortable + classes are String, Date, and Time, the objects of + which are ordered in the natural way. Of course, string + ordering may depend on your locale, but you can always + override the comparison functions (another plus for + C++). + + For more details Distinguish between the container object and the + on Sortable see objects it contains: Sortable is the base for non- + page 93 in the container objects; it is not a base for ordered +reference section. collections. Every class derived from Object inherits + the isSortable member function so that objects can be + queried as to their "sortability." + + + + + + + + - 7 - + + + + + + +------------------ Association is a non-container, instance class + Association class providing special objects to be stored (typically) in +------------------ Dictionary collections. An Association object, known as + Association see an association, is a pair of objects known as the key + page 44 in the and the value. The key (which is unique in the +reference section. dictionary) can be used to retrieve the value. Every + class derived from Object inherits the isAssociation + member function so that objects can report whether they + are associations or not. + + Container classes ======================================================= + + In the Object-based library, all the container storage + and access methods assume that the stored elements are + derived from Object. They are actually stored as + references or pointers to Object offering the + advantages and disadvantages of polymorphism. Most of + the container access member functions are virtual, so a + container does not need to "know" how its contained + elements were derived. A container can, in theory, + contain mixed objects of different class types, so + proper care is needed to maintain type-safe linkage. + Every class has member functions called IsA and nameOf, + which allow objects to announce their class ID and + name. As you've seen, there are also isSortable and + isAssociation member functions for testing object + types. + + All the container classes are derived from the abstract + Container class, a child of Object. Container + encapsulates just a few simple properties upon which + more specialized containers can be built. The basic + container provides the following functionality: + + o Displays its elements + o Calculates its hash value + o Pure virtual slot for counting the number of items + with getItemsInContainer + o Pure virtual slot for flushing (emptying) the + container with flush + o Performs iterations over its elements + o Reports and changes the ownership of its elements + (inherited from TShouldDelete) + + So far, our containers have no store, access, or detach + methods. (We can flush the container but we cannot + detach individual elements.) Nor is there a hasMember + + + + + - 8 - + + + + + + + member function, that is, a general way of determining + whether a given object is an element of the container. + This is a deliberate design decision. As we move up the + hierarchy, you'll see that what distinguishes the + various derived container classes are the storage and + access rules that actually define each container's + underlying data structure. Thus push and pop member + functions are added for Stack, indexing operators are + added for Array, and so on. There is not enough in + common to warrant having generic add and retrieve + methods at the Container level. There is no one perfect + way of extracting common properties from groups of + containers, and therefore no perfect container class + hierarchy. The Object-based container hierarchy is just + one possible design based on reasonable compromises. + The BIDS version, as you'll see, offers a different + perspective. + + The first three Container functions listed previously + are fairly self-explanatory. We'll discuss the + important subjects of ownership and iteration in the + next two sections. + + + Containers and ======================================================= + ownership + Before you use the Container family, you must + understand the concept of ownership. As in real life, a + C++ container starts out empty and must be filled with + objects before the objects can be said to be in the + container. Unlike the real world, however, when objects + are placed in the container, they are, by default, + owned by the container. The basic idea is that when a + container owns its objects, the objects are destroyed + when the container is destroyed. + + Recall that containers are themselves objects subject + to the usual C++ scoping rules, so local containers + come and go as they move in and out of scope. Care is + needed, therefore, to prevent unwanted destruction of a + container's contents, so provision is made for changing + ownership. A container can, throughout its lifetime, + relinquish and regain ownership of its objects as often + as it likes by calling the ownsElements member function + (inherited from TShouldDelete). The fate of its objects + when the container disappears is determined by the + ownership status ruling at the time of death. Consider + the following: + + + + - 9 - + + + + + + + void test() + { + Array a1( 10 ); // construct an array + Array a2( 10 ); // and another + + a1.ownsElements( 1 ); // array a1 owns its objects + (the default) + a2.ownsElements( 0 ); // array a2 relinquishes + ownership + + // load and manipulate the arrays here + + } + + When test exits, a1 will destroy its objects, but the + objects in a2 will survive (subject, of course, to + their own scope). The a1.ownsElements( 1 ) call is not + really needed since, by default, containers own their + contents. + + Ownership also plays a role when an object is removed + from a container. The pure virtual function + Container::flush is declared as + + virtual void flush( DeleteType dt = DefDelete ) = 0; + + flush empties the container but whether the flushed + objects are destroyed or not is controlled by the dt + argument. DeleteType is an enum defined in + TShouldDelete. A value of NoDelete means preserve the + flushed objects regardless of ownership; Delete means + destroy the objects regardless of ownership; DefDelete, + the default value, means destroy the objects only if + owned by the container. Similarly Collection (derived + from Container) has a detach member function, declared + as + + virtual void detach( Object& obj, DeleteType dt = + NoDelete ) = 0; + + which looks for obj in the collection and removes it if + found. Again, the fate of the detached object is + determined by the value dt. Here, the default is not to + destroy the detached object. Collection::destroy is a + variant that calls detach with DefDelete. + + A related problem occurs if you destroy an object that + resides in a container without "notifying" the + + + + - 10 - + + + + + + + container. The safest approach is to use the + container's methods to detach and destroy its contents. + + Important! If you declare an automatic object (an object that's + local to your routine) and place that object in a + global container, your local object will be destroyed + when the routine leaves the scope in which it was + declared. To prevent this, you must only add heap + objects (objects that aren't local to the current + scope) to global containers. Similarly, when you remove + an object from a global container, you are responsible + for destroying it and freeing the space in which it + resides. + + + Container ======================================================= + iterators + You saw earlier that Container, the base for all + containers in the Object-based library, supports + iteration. Iteration means traversing or scanning a + container, accessing each stored object in turn to + perform some test or action. The separate + ContainerIterator-based hierarchy provides this + functionality. Iterator classes are derived from this + base to provide iterators for particular groups of + containers, so you'll find HashTableIterator, + ListIterator, BtreeIterator, and so on. + + Under There are two flavors of iterators: internal and + ContainerIterator external. Each container inherits the three member + on page 64 in the functions: firstThat, lastThat, and forEach, via the +reference section, Object and Container classes. As the names indicate, + you see how the these let you scan through a container either testing + pre- and post- each element for a condition or performing an action on + increment each of the container's elements. When you invoke one + operators ++ are of these three member functions, the appropriate + overloaded to iterator object is created for you internally to + simplify your support the iteration. Most iterations can be performed +iterator programs. in this way since the three iterating functions are + very flexible. They take a pointer-to-function argument + together with an arbitrary parameter list, so you can + do almost anything. For even more flexibility, there + are external iterators that you can build via the + initIterator member function. With these, you have to + set up your own loops and test for the end-of- + container. + + + + + + - 11 - + + + + + + + Returning to the container class hierarchy, we look at + three classes derived directly from Container: Stack, + Deque, and PriorityQueue. + + + Sequence classes ======================================================= + + The instance classes Stack, Deque (and its offspring + Queue), and PriorityQueue are containers collectively + known as sequence classes. A sequence class is + characterized by the following properties: + + 1. Objects can be inserted and removed. + + 2. The order of insertions and deletions is + significant. + + 3. Insertions and extractions can occur only at + specific points, as defined by the individual class. + In other words, access is nonrandom and restricted. + + Sequences (like all containers) know how many elements + they have (using getItemsInContainer) and if they are + empty or not (using isEmpty). However, they cannot + usually determine if a given object is a member or not + (there is still no general hasMember or findMember + member function). Stacks, queues, priority queues, and + deques vary in their access methods as explained in + more detail in the reference section. + + Sequence is not itself a class because sequences do not + share enough in common to warrant a separate base + class. However, you might find it helpful to consider + the classes together when reviewing the container + hierarchy. + + + Collections ======================================================= + + The next level of specialization is the abstract class + Collection, derived from Container, and poised to + provide a slew of widely used data structures. The key + difference between collections and containers is that + we now have general hasMember and findMember member + functions. + + From Collection we derive the unordered collections + Bag, HashTable, List, DoubleList, and AbstractArray, + + + + - 12 - + + + + + + + and the ordered collection Btree. In turn, + AbstractArray spawns the unordered Array and the + ordered SortedArray. Bag serves as the base for Set + which in turn is the base for Dictionary. These + collections all refine the storage and retrieval + methods in their own fashions. + + +------------------ With unordered collections, any objects derived from + Unordered Object can be stored, retrieved, and detached. The + collections objects do not have to be sortable because the access +------------------ methods do not depend on the relative "magnitude" of + the elements. Classes that fall into this category are + + o HashTable + o Bag, Set, and Dictionary + o List and DoubleList + o Array + + +------------------ An ordered collection depends on relative "magnitude" + Ordered when adding or retrieving its elements. Hence these + collections elements must be objects for which the isLessThan +------------------ member function is defined. In other words, the + elements in an ordered collection must be derived from + the class Sortable. The following are ordered + collections: + + o Btree + o SortedArray + + + +=========================================================================== +The BIDS template library +=========================================================================== + + The BIDS container class library can be used as a + springboard for creating useful classes for your + individual needs. Unlike the Object container library, + BIDS lets you fine-tune your applications by varying + the underlying data structures for different containers + with minimum reprogramming. This extends the power of + encapsulation: the implementor can change the internals + of a class with little recoding and the user can easily + replace a class with one that provides a more + appropriate algorithm. The BIDS class library achieves + this flexibility by using the C++ template mechanism. + + + + - 13 - + + + + + + + For a basic With BIDS, the container is considered as an ADT +description of C++ (abstract data type), and its underlying data structure + templates see is independently treated as an FDS (fundamental data + Chapter 13. structure). BIDS also allows separate selections of the + type of objects to be stored, and whether to store the + objects themselves or pointers to objects. + + Templates, ======================================================= + classes, and + containers Computer science has devoted much attention to devising + suitable data structures for different applications. + Recall Wirth's equation, Programs = Algorithms + Data + Structures, which stresses the equal importance of data + structures and their access methods. + + As used in current OOP terminology, a container is + simply an object that implements a particular data + structure, offering member functions for adding and + accessing its data elements (usually other objects) + while hiding from the user as much of the inner detail + as possible. There are no simple rules to determine the + best data structure for a given program. Often, the + choice is a compromise between competing space (RAM) + and time (accessibility) considerations, and even here + the balance can shift suddenly if the number of + elements or the frequency of access grows or falls + beyond a certain number. + + + Container ======================================================= + implementation + Often, you can implement the desired container + properties in many ways using different underlying data + structures. For example, a stack, characterized by its + Last-In-First-Out (LIFO) access, can be implemented as + a vector, a linked list, or perhaps some other + structure. The vector-based stack is appropriate when + the maximum number of elements to be stored on the + stack is known in advance. A vector allocates space for + all its elements when it is created. The stack as a + list is needed when there is no reasonable upper bound + to the size of the stack. The list is a slower imple- + mentation than the vector, but it doesn't use any more + memory than it needs for the current state of the + stack. + + + + + + + - 14 - + + + + + + + The way objects are stored in the container also + affects size and performance: they can be stored + directly by copying the object into the data structure, + or stored indirectly via pointers. The type of data to + be stored is a key factor. A stack of ints, for + example, would probably be stored directly, where large + structs would call for indirect storage to reduce + copying time. For "in-between" cases, however, choosing + strategies is not always so easy. Performance tuning + requires the comparison of different container + implementations, yet traditionally this entails drastic + recoding. + + + The template ======================================================= + solution + The template approach lets you develop a stack-based + application, say, using vectors as the underlying + structure. You can change this to a list implementation + without major recoding (a single typedef change, in + fact). The BIDS library also lets you experiment with + object-storage strategies late in the development + cycle. Each container-data structure combination is + implemented with both direct and indirect object + storage, and the template approach allows a switch of + strategy with minimal rewriting. The data type of the + stored elements is also easy to change using template + parameters, and you are free to use any data type you + want. + + As you'll see, BIDS offers container/data structure + combinations that match those of the Object-based + version. For example, the Object library implements + Stack using lists, so Stack can be simulated exactly + with the template class BI_TCStackAsList. Let's look at + the template approach in more detail. + + + + + + + + + + + + + + + + - 15 - + + + + + + +------------------ We discussed earlier the stack and its possible + ADTs and FDSs implementations as a linked list or as a vector. The +------------------ potential for confusion is that stacks, lists, and + vectors are all commonly referred to as data + structures. However, there is a difference. We can + define a stack abstractly in terms of its LIFO + accessibility, but it's difficult to envision a list + without thinking of specifics such as nodes and + pointers. Likewise, we picture a vector as a concrete + sequence of adjacent memory locations. So we call the + stack an ADT (abstract data type) and we call the list + and vector FDSs (fundamental data structures). The BIDS + container library offers each of the standard ADTs + implemented with a choice of appropriate FDSs. Table 1 + indicates the combinations provided: + + ADTs as +fundamental data ------------------------------------------------------- + structures ADT Sorted + FDS Stack Queue Deque Bag Set Array Array + ------------------------------------------------------- + + Vector x x x x x x x + List x + DoubleList x x + + ------------------------------------------------------- + + The abstract data types involved are Stacks, Queues, + Deques, Bags, Sets, and Arrays. Each ADT can be + implemented several different ways using the + fundamental data structures Vector, List, and + DoubleList as indicated by a bullet ( x ) in the table. + Thus, all ADTs are implemented as vectors. In addition, + Stacks are implemented as a list; Queues and Deques + implemented as doubly-linked lists. (Not shown in the + table are the sorted and counted FDSs from which + various ADTs can be developed.) + + There is nothing sacred about these combinations; you + can use the template classes to develop your own + ADT/FDS implementations. + + + + + + + + + + - 16 - + + + + + + +------------------ ADTs are implemented in both direct and indirect + Class templates versions. The direct versions store the objects +------------------ themselves, while the indirect versions store pointers + to objects. You can store whatever objects you want as + elements in these FDSs using the power of templates. + Here are the ADT and FDS templates we provide: + + +--------------------------------------------------------------------------- +Table 2: FDS class templates + +Class template Description +--------------------------------------------------------------------------- + +BI_VectorImp vector of Ts +BI_VectorIteratorImp iterator for a vector of Ts +BI_CVectorImp counted vector of Ts +BI_SVectorImp sorted vector of Ts +BI_IVectorImp vector of pointers to T +BI_IVectorIteratorImp iterator for a vector of pointers to T +BI_ICVectorImp counted vector of pointers to T +BI_ISVectorImp sorted vector of pointers to T +BI_ListImp list of Ts +BI_SListImp sorted list of Ts +BI_IListImp list of pointers to T +BI_ISListImp sorted list of pointers to T +BI_DoubleListImp double-linked list of Ts +BI_SDoubleListImp sorted double-linked list of Ts +BI_IDoubleListImp double-linked list of pointers to T +BI_ISDoubleListImp sorted double-linked list of pointers to T + +--------------------------------------------------------------------------- + + Each basic FDT has a direct and indirect iterator; to + save space we have shown only the Vector iterators. + + The BI_ prefix stands for Borland International and the + suffix Imp for implementation. The indirect versions + have the prefix BI_I with the extra I for Indirect. The + extra prefixes S and C mean Sorted and Counted + respectively. The template parameter T in + represents the data type of the objects to be stored. + You instantiate the template by supplying this data + type. For example, BI_ListImp gives you a list + of doubles. See Table 3 on page 19 for a summary of + these abbreviations. For direct object storage, the + + + + + + - 17 - + + + + + + + type T must have meaningful copy semantics and a + default constructor. Indirect containers, however, hold + pointers to T, and pointers always have + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - 18 - + + + + + + + good copy semantics. This means that indirect + containers can contain objects of any type. + +Abbreviations in + CLASSLIB names ----------------------------------------------------------------- + Abbreviation Description + ----------------------------------------------------------------- + + I Indirect + C Counted + S Sorted + O Object-based, non-polymorphic + TC Object-based, polymorphic (compatible with + original Turbo C++ library) + + ----------------------------------------------------------------- + + For details see For the sorted FDSs (BI_SVectorImp, BI_ISVectorImp, and + the discussion so on), T must have valid == and < operators to define + under Sortable on the ordering of the elements. It should be clear that + page 94. the IS variants refer to the objects being sorted, not + that the pointers to the objects are sorted. + + Each implementation of an ADT with an FDS is named + using the convention (ADT)As(FDS), as follows: + + +---------------------------------------------------------------------------- +Table 4: ADT class templates + +Class name Description +---------------------------------------------------------------------------- + +BI_StackAsVector Stack of Ts as a vector +BI_QueueAsVector Queue of Ts as a vector +BI_DequeAsVector Deque of Ts as a vector +BI_BagAsVector Bag of Ts as a vector +BI_SetAsVector Set of Ts as a vector +BI_ArrayAsVector Array of Ts as a vector +BI_SArrayAsVector Sorted array of Ts as a vector + +BI_IStackAsVector Stack of pointers to T as a vector +BI_IQueueAsVector Queue of pointers to T as a vector + +... and so on + +BI_StackAsList Stack of Ts as a list +BI_IStackAsList Stack of pointers to T as a list + + + + - 19 - + + + + + + +Table 4: ADT class templates (continued)___________________________________ + +BI_QueueAsDoubleList Queue of Ts as a double list +BI_DequeAsDoubleList Deque of Ts as a double list +BI_IQueueAsDoubleList Queue of pointers to T as a double list +BI_IDequeAsDoubleList Deque of pointers to T as a double list + +---------------------------------------------------------------------------- + + There are also Again, the argument, either a class or predefined + BI_Oxxx and data type, provides the data type for the contained + BI_TCxxx variants elements. Each of the bulleted items ( x ) in Table 1 + discussed soon. can be mapped to two templates (direct and indirect + versions) with names following this convention. + + + Container class ======================================================== + compatibility + Each template must be instantiated with a particular + data type as the type of the element that it will hold. + This allows the compiler to generate the correct code + for dealing with any possible type of element without + restricting the elements to just those derived from + Object. + + Each ADT is also used to instantiate two classes that + imitate the behavior of the Object class libraries. Here + is a list of them: + + + -------------------------------------------------------- +Object-based FDS Class name Description + classes -------------------------------------------------------- + + BI_OStackAsVector Stack of pointers to Object, + as a vector + BI_OQueueAsVector Queue of pointers to Object, + as a vector + BI_ODequeAsVector Deque of pointers to Object, + as a vector + BI_OBagAsVector Bag of pointers to Object, as + a vector + BI_OSetAsVector Set of pointers to Object, as + a vector + BI_OArrayAsVector Array of pointers to Object, + as a vector + BI_OSArrayAsVector Sorted array of pointers to + Object, as a vector + + + + - 20 - + + + + + + + Table 5: Object-based FDS classes (continued)__________ + + BI_TCStackAsVector Polymorphic stack of pointers + to Object, as a vector + BI_TCQueueAsVector Polymorphic queue of pointers + to Object, as a vector + BI_TCDequeAsVector Polymorphic deque of pointers + to Object, as a vector + BI_TCBagAsVector Polymorphic bag of pointers to + Object, as a vector + BI_TCSetAsVector Polymorphic set of pointers to + Object, as a vector + BI_TCArrayAsVector Polymorphic array of pointers + to Object, as a vector + BI_TCSArrayAsVector Polymorphic sorted array of + pointers to Object, as a + vector + + BI_OStackAsList Stack of pointers to Object, + as a list + BI_TCStackAsList Polymorphic stack of pointers + to Object, as a list + + BI_OQueueAsDoubleList Queue of pointers to Object, + as a double list + BI_ODequeAsDoubleList Deque of pointers to Object, + as a double list + + BI_TCQueueAsDoubleList Polymorphic queue of pointers + to Object, as a double list + BI_TCDequeAsDoubleList Polymorphic deque of pointers + to Object, as a double list + + -------------------------------------------------------- + + Note that these versions have no explicit + parameters; they use the fixed data types shown +The TCxxx versions (pointers to Object). The BI_Oxxx (O for Object library) + offer the same versions of these classes have no virtual functions. + behavior and This makes it easier for the compiler to generate inline + interfaces as the function expansions, which in turn makes the BI_Oxxx + Object library. versions of the containers somewhat faster than the + corresponding polymorphic BI_TCxxx (TC for Turbo C++) + versions. The obverse of the coin is that the BI_Oxxx + versions do not share the polymorphic behavior of the + Object container library. + + + + + + - 21 - + + + + + + + In the Object container library, Stack implements a + stack as a polymorphic list of pointers to Object. The + BIDS class BI_TCStackAsList therefore mirrors the + Object-based class Stack. Even with BI_TCStackAsVector, + the public interface and semantics are the same as for + the Object-based Stack. The user "sees" the ADT while + the FDS is "hidden." For these reasons, we will not + repeat the alphabetic list of Object-based classes and + member functions for the BIDS library. + + Consider your many choices when writing container code + with the BIDS model. You can gain speed over future + flexibility by using the non-polymorphic classes, such + as BI_OStackAsList or BI_OStackAsVector. Or you can + retain the polymorphism of the Object-based hierarchy by + using the BI_TCxxx classes. + + + Header files ======================================================== + + Each group of FDSs is defined in its own header file, + which contains templates for both the direct and the + indirect versions. The names of the headers are as + follows: + + vectimp.h + listimp.h + dlistimp.h + + In vectimp.h, for example, you'll find declarations for + all the vector, counted vector, and sorted vector + templates, together those for a direct and indirect + vector iterator. + + Note also the stdtempl.h file that defines the useful + template functions min, max, and range. If you are new + to templates, this file offers a useful, gentle + introduction to the subject. + + Each ADT family is defined in its own header file, named + as follows: + + stacks.h + queues.h + deques.h + bags.h + sets.h + arrays.h + + + + - 22 - + + + + + + + Note the plural The file stacks.h, for example, defines the following + form that templates: + distinguishes the +BIDS include files BI_StackAsVector + from the Object- BI_IStackAsVector +based include file BI_OStackAsVector + BI_TCStackAsVector + BI_StackAsList + BI_IStackAsList + BI_OStackAsList + BI_TCStackAsList + + + Tuning an ======================================================== + application + Consider the following example: + + typedef BI_StackAsVector intStack; + + int main() + { + intStack is; + for( int i = 0; i < 10; i++ ) + is.push( i ); + for( i = 0; i < 10; i++ ) + cout << is.pop() << endl; + return(0); + } + + Here we are implementing a stack of ints using a vector + as the underlying data structure. If you later determine + that a list would be a more suitable implementation for + the stack, you can simply replace the typedef with the + following: + + typedef BI_StackAsList intStack; + + After recompilation, the stack implementation is changed + from vector to list. Similarly, you can try a stack of + pointers to int, with: + + typedef BI_IStackAsList intStack; + + + + + + + + + + - 23 - + + + + + + +FDS implementation ======================================================== + + Each FDS is implemented as two templates, one that + provides the direct version, and one that provides the + indirect version. The indirect version makes use of an + InternalIxxxImp class. The following simplified extract + from listimp.h will give you an idea how the different + list FDSs are implemented. Note that BI_ListElement + is an internal template class used to implement the node + (data of type T and pointer to next node) of a list. The + direct list of objects of type T is implemented by the + template class BI_ListImp, which also provides the + base for BI_SListImp (sorted lists). The example + shows how the add member function is implemented in the + direct, indirect, sorted and unsorted lists. + + template class BI_ListElement + { + public: + BI_ListElement( T t, BI_ListElement *p ) : data(t) + { next = p->next; p->next = this; } + // constructor + ... + BI_ListElement *next; // pointer to next node + T data; // object at node + ... + }; + + template class BI_ListImp + // linked list (unsorted) of type T objects; assumes T + has meaningful // copy semantics and a default + constructor + { + public: + ... + void add( T t ) { new BI_ListElement( t, &head ); + } + // adds objects at head of list (shown inline here to + save space) + T peekHead() const { return head.next->data; } + ... + }; + + template class BI_SListImp : public + BI_ListImp + // sorted list; assumes T has meaningful copy + + + + + + - 24 - + + + + + + + // semantics and a default constructor + { + public: + ... + void add( T t ) { new BI_ListElement( t, + findPred(t) ); } + // adds object in sorted position + ... + }; + + template class + BI_InternalIListImp : public List + { + ... + void add( T *t ) { List::add ( t ); } + }; + // The work is done in this intermediate class + // used as base for BI_IListImp; list is + // unsorted so we use List::add + + template class BI_IListImp : + public BI_InternalIListImp > + { ... }; + /* unsorted list of pointers to objects of type T; + since pointers always have meaningful copy + semantics, this class can handle any object type; + add comes straight from BI_InternalIListImp + */ + + template class BI_ISListImp : + public BI_InternalIListImp, BSListImp< void * >> { + ... }; + /* sorted list of pointers to objects of type T; since + pointers always have meaningful copy semantics, this + class can handle any object type + */ + + In addition to the template classes shown here, + listimp.h also declares BI_ListIteratorImp and + BI_IListIteratorImp, the iterators for direct and + indirect lists. + + In the next section on ADTs, you'll see how the + different stack implementations in stacks.h pull in the + vector and list FDSs declared in vectimp.h and + listimp.h. + + + + + + - 25 - + + + + + + + The double list templates, in dlistimp.h, follows the + same pattern. The sorted versions of list and double + list provide exactly the same interface as the non- + sorted ones, except that the add member function adds + new elements in sorted order. This speeds up subsequent + access and also makes it easier to implement priority + queues. + + vectimp.h also follows a similar pattern to listimp.h, + implementing BI_VectorImp (direct) and + BI_IVectorImp (indirect). These are low-level vectors + with no notion of add or detach. To support more + sophisticated ADTs, the counted vector, + BI_CVectorImp, derived from BI_VectorImp, is + provided. This maintains a pointer to the last valid + entry in the underlying Vector. It has an add member + function that inserts its argument at the top (the next + available slot), and a detach member function that + removes its argument and compresses the array. + BI_CVectorImp provides the base for the sorted vector + template BI_SVectorImp. With a sorted vector, you can + run through the indices from 0 to the last valid entry, + and the objects will emerge in sort order. Here's a + simplified extract from vectimp.h: + + // extract from vectimp.h + + template class BI_VectorImp { ... }; + // direct uncounted, unsorted vector + + template class BI_CVectorImp : public + BI_VectorImp + // direct counted, unsorted vector + { + public: + ... + void add( T t ); + // add at top of array; inc count; resize array if + necessary + void detach( T t, int del = 0 ); + void detach( unsigned loc, int del = 0 ); + // detach given object or object at loc + ... + }; + + template class BI_SVectorImp : public + BI_CVectorImp + // direct counted, sorted vector + + + + - 26 - + + + + + + + { + public: + void add( T t ); + // add at position that maintains sort + }; + + template class + BI_InternalIVectorImp : + public Vect {...}; + // interdiate base for BI_IVectorImp: no add + + template class BI_IVectorImp : + public BI_InternalIVectorImp > + {...}; + // indirect uncounted, unsorted vector: no add + + template class + BI_InternalICVectorImp : + public BI_InternalIVectorImp + // intermediate base for BI_ICVector + { + public: + void add( T *t) { Vect::add(t); } + ... + }; + + template class BI_ICVectorImp : + public BI_InternalICVectorImp + > + { ... }; + // indirect counted vector; can contain any object type + + template class BI_ISVectorImp : + public BI_InternalICVectorImp + > + { ... }; + // indirect sorted vector + + +ADT implementation ======================================================== + + Each ADT is implemented as several templates. For + example, the following provides an implementation of a + stack of objects of type T using vectors as the FDS: + + // simplified extract from stacks.h + + + + + + - 27 - + + + + + + + template class + BI_StackAsVectorImp + { + public: + ... + void push( T t ) { data[current++] = t; } + ... + + protected: + Vect data; + unsigned current; + }; + + The first parameter, class Vect, is either a direct + vector or an indirect vector, depending on whether the + stack being created is direct or indirect, so Vect will + be either BI_VectorImp or BI_IVectorImp. The + type T represents the type of objects to be stored in + the stack. For a direct Vect, T should be the same as + T0; for an indirect Vect, T must be of type pointer to + T0. A direct stack implemented as a vector looks like + this: + + template class BI_StackAsVector : + public BI_StackAsVectorImp< BI_VectorImp, T > + { + public: + friend class BI_StackAsVectorIterator; + ... + }; + + template class BI_StackAsVectorIterator : + public BI_VectorIteratorImp {...}; + + That is, a BI_StackAsVector is implemented by using a + BI_StackAsVectorImp, whose "implementation" is of type + BI_VectorImp, and whose elements are of type T. + BI_StackAsVector has its own iterator, derived from + underpinning FDS iterator with the contained-object type + T as parameter. + + An indirect stack implemented as a vector looks like + this: + + template class BI_IStackAsVector : + public BI_StackAsVectorImp< BI_IVectorImp, T* >, + public virtual TShouldDelete + {...}; + + + + - 28 - + + + + + + + That is, an BI_IStackAsVector is implemented by using a + BI_StackAsVectorImp, whose "implementation" is of type + BI_IVectorImp, and whose elements are of type pointer + to T. The TShouldDelete base provides the ownership + control discussed in the Object-based class reference + section. TShouldDelete also serves as a second base for + the following classes. + +Figure 2: TShouldDelete hierarchy + + TShouldDelete*ÄÄÄÄÄÄÂÄÄAssociation* + ÃÄÄContainer + ÃÄÄBI_IArrayAsVector+ + ÃÄÄBI_IBagAsVector+ + ÃÄÄBI_IDequeAsDoubleList+ + ÃÄÄBI_IDequeAsVector+ *Instance classes + ÃÄÄBI_ISArrayAsVector+ + ÃÄÄBI_ISObjectArray+ + ÃÄÄBI_IStackAsList+ +Template classes + ÀÄÄBI_IStackAsVector+ + + + The BI_OStackAsVector and BI_TCStackAsVector versions + (stacks of pointers to Objects, emulating the Object + container library) now follow easily: + + class BI_OStackAsVector + // non-polymorphic stack with vector of pointers to + Objects + { + public: + ... + void push( Object *t ) { ostack.push(t); } + // ostack is type BI_IStackAsVector + // so we are pushing pointers to Object + ... + + private: + BI_IStackAsVector ostack; + }; + + class BI_TCStackAsVector : public Container + // polymorphic stack with vector of pointers to + Objects + // inherits from the Object-based Container class + // Provides identical interface and functionality as + Object-based Stack // class but underlying data + structure is Vector not List + + + + - 29 - + + + + + + + { + public: + ... + void push( Object& o ) { stk.push( &o ); } + // stk is type BI_OStackAsVector + // so we are pushing Objects + ... + private: + BI_OStackAsVector stk; + }; + + + We end the section with some short examples using the + BIDS classes. + + Source #include + #include + Uses the template #include +facility to pick a #include + specific FDS for + the array ADT. int main() + { + typedef BI_SArrayAsVector lArray; + In the "sorted lArray a(2); + array" FDS, the for (int i = a.arraySize(); i; i--) + index of a { + particular array ostrstream os; +element depends on os << "string " << i << ends; + its value, not on a.add( *(new String(os.str()))); +the order in which } + it was entered. cout << "array elements;\n"; + for (i = 0; i < a.arraySize(); ++i) + { + If the ADT used cout<< a[i] << endl; + BI_ArrayAsVector } + , the return(0); + elements would } + appear in the + order they were + added to the + array. + + Output string 1 + string 2 + string 3 + + Source + + + + + - 30 - + + + + + + +Doubly-linked list #include + with indirect #include + storage as FDS. #include + #include + +Pointers to String typedef BI_IDequeAsDoubleList lDeque; + objects in the + deque container int main() + must be { + dereferenced when lDeque d; + extracting from for (int i = 1; i < 5; i++) + the deque. { + ostrstream os; + os << "string " << i << ends; + // use alternating left, right insertions + if(i&1) + d.putLeft(new String(os.str())); + else + d.putRight(new String(os.str())); + } + cout << "Deque Contents:" << endl; + while (!d.isEmpty()) + { + cout << *d.getLeft() << endl; + } + return(0); + } + + Output Deque Contents: + string 3 + string 1 + string 2 + string 4 + + + +=========================================================================== +The class library directory +=========================================================================== + + The files in the class library are set up in the + following directory structure: + + + + + + + + + + - 31 - + + + + + + + ÉÍÍÍÍÍÍÍÍÍÍÍ» + º CLASSLIB\ º + ÈÍÍÍÍÍÑÍÍÍÍͼ + ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄ¿ +ÉÍÍÍÍÏÍÍÍÍÍ» ÉÍÍÍÍÏÍÍÍÍ» ÚÄÄÄÄÄÁÄÄÄÄ¿ ÉÍÍÏÍÍÍ» ÉÍÍÍÍÏÍÍÍÍÍÍ» +º INCLUDE\ º º SOURCE\ º ³ OBJS ³ º LIB\ º º EXAMPLES\ º +ÈÍÍÍÍÍÍÍÍÍͼ ÈÍÍÍÍÍÍÍÍͼ ÀÄÄÄÄÄÄÄÄÄÄÙ ÈÍÍÍÍÍͼ ÈÍÍÍÍÍÍÍÍÍÍͼ + + The CLASSLIB directory is under the TC directory. The + contents of the directories in the class library are + discussed in more detail in the following sections. + + + The INCLUDE ======================================================= + directory + The INCLUDE directory contains the header files + necessary to compile a program that uses the class + library. You must put this directory on the include + search path when you compile your program. Modify + Options|Directories|Include Directories if you changed + the default setup. + + For each BIDS ADT (abstract data type), such as Stack, + there is a header file called stacks.h. The Object- + based class Stack is declared in stack.h. If the + identifier TEMPLATES is #defined, either in an .h file + or via the command line _D option, then when stack.h is + preprocessed, the Object-based declarations for Stack + are bypassed and the template versions are included. In + particular, if TEMPLATES is #defined, Stack is #defined + as BI_TCStackAsList, so any code written for the + Object-based Stack will be compiled with the BIDS + version. + + +The OBJS directory ======================================================= + + Subdirectories of the OBJS directory contain .PRJ file + samples. + + + The SOURCE ======================================================= + directory + The SOURCE directory contains the source files that + implement many of the member functions of the classes + in the library. These source files are provided as a + guide for implementing new classes. + + + + + - 32 - + + + + + + + You also need these source files if you want to build a + library. There are project files for small and large + models, debug and non-debug versions, and template and + non-template versions. + + +------------------ To create a new library using the small memory model, +Creating a library proceed as follows: +------------------ + 1. Open the CLASSLIBS\OBJS\S (for standard or BIDS) or + CLASSLIBS\OBJS\DBS (for debug) directory. + + 2. Create a directory for the new library. + + 3. Copy the project file that's closest to the one you + want to create to that directory (use TCLASSS.PRJ to + create a standard classlib, TCLASDBS.PRJ to create a + debug version, or BIDSS.PRJ to create a templatized + version). + + 4. Rename the project file to TCLASSS.PRJ. + + 5. Run TC and select Project|Open TCLASSS.PRJ. + + 6. Set Options|Compiler|Code Generation to the small + memory model. + + 7. Select Compile|Build all. + + 8. Copy the resultant .LIB file to the CLASSLIB\LIB + directory. + + For a large memory model, in step 2 copy a xL.PRJ file + and in step 3 rename it to TCLASSL.PRJ. + + Important! When you take a library that you have built and use it + in one of the sample projects, you must update the + project. See Chapter 7, "Managing multi-file projects" + for more information. You must also be sure to compile + your project with precisely the same switches and op- + tions you used to build the library. If you don't have + the same options, you will get warnings from the linker + when the executable file is built. + + + + + + + + + - 33 - + + + + + + + The LIB directory ======================================================= + + The LIB directory contains the compiled source modules + archived into a library. You must put this directory on + the library search path when you link your program. For + information about modifying the library search path, + see Chapter 8, "The command-line compiler" (for + command-line options). + + The Object-based container classes are in TCLASSx.LIB, + where x is the memory-model designation (S for small, C + for compact, M for medium, L for large, and H for + huge). For each of these there are debugging versions + TCLASDBx.LIB. + + + The EXAMPLES ======================================================= + directory + The CLASSLIB\EXAMPLES directory contains the example + programs and their project files. You can compile these + programs to see how the parts of the class library are + put together to form an application. Most of the + examples use one or two of the classes in the + hierarchy; other examples are more complex. Here is a + list of the example programs and the classes that they + use: + + 1. STRNGMAX: A very simple example using String. + + 2. REVERSE: An intermediate example using Stack and + String. + + 3. LOOKUP: An intermediate example using Dictionary and + Association. + + 4. QUEUETST: An intermediate example using Queue and + introducing a non-hierarchical class, Time. + + 5. DIRECTRY: An advanced example illustrating derived + user classes with SortedArray. + + + + + + + + + + + + - 34 - + + + + + + +=========================================================================== +Preconditions and checks +=========================================================================== + + Version 3.0 offers some new debugging tools. The class + libraries TCLASDBx.LIB and BIDSDBx.LIB (where x + represents the memory model, S, C, L, M, or H) provide + the debugging versions of TCLASSx.LIB and BIDSx.LIB. + + checks.h defines two macros, PRECONDITION( arg ) and + CHECK( arg ). Each macro takes an arbitrary expression + as an argument, just like assert. At runtime, if the + expression evaluates to 0, an error message is + displayed and execution terminates. If the expression + evaluates to a nonzero value, execution continues in + the normal fashion. + + Use PRECONDITION on entry to a function to check the + validity of the arguments and to do any other checking + to determine that the function has been invoked + correctly. + + Use CHECK for internal checking during the course of + execution of the function. + + Compilation of PRECONDITION and CHECK is controlled by + the value of a manifest constant named __DEBUG. If + __DEBUG has the value 0, PRECONDITION and CHECK are set + to empty macros. In other words, setting __DEBUG to 0 + removes all debugging. If __DEBUG has the value 1, + PRECONDITION macros are expanded into the tests + described above, but CHECK macros are empty. So, + setting __DEBUG to 1 enables PRECONDITIONs and disables + CHECKs. Setting __DEBUG to 2 or more, or not defining + it at all, enables both forms of testing. Table 6 + summarizes the available debugging modes: + + + ----------------------------------------------------------------- + Class debugging __DEBUG PRECONDITION CHECK + modes ----------------------------------------------------------------- + + 0 Off Off + 1 On Off + >1 On On + undefined On On + + + + + + - 35 - + + + + + + + ----------------------------------------------------------------- + + When developing a class, set __DEBUG to 2 or leave it + undefined. This gives you maximum checking when the + code is still being worked on. When the class works + properly, but the application that is going to use the + class hasn't been completed, set __DEBUG to 1, so that + incorrect calls from the application can be caught, + without the additional overhead of the internal + checking within the class. Once everything is working, + set __DEBUG to 0 to remove all checking. Two versions + of the .LIB file are provided that contain the class + library code: one with PRECONDITIONs enabled, and one + with no debugging. These are named TCLASDBX.LIB and + TCLASSX.LIB, where X is replaced with the letter for + the appropriate memory model: s, c, m, l, or h. The + .LIB with DB in its name is the one with PRECONDITIONs + enabled. + + + +=========================================================================== +Container class reference +=========================================================================== + + This section describes each class in the library as + follows. We give the include file where it is defined, + a diagram showing the parent of each class and + immediate offspring, some introductory remarks, data + members and member functions (with protoypes) listed + alphabetically, what friendly relations exist, and, + where appropriate, an example of the class's use. The + members listed in the See also section belong to the + class under discussion unless scope-qualified. Thus in + the section on class X, you could find See also foo, + Y::foo, and so on. The first foo refers to X::foo. + Class derivations and class members are public unless + otherwise noted as protected. We do not document + destructors since they all perform the usual way. Most + container classes have virtual destructors. + + + + + + + + + + + + - 36 - + + + AbstractArray + + + +=========================================================================== +AbstractArray abstarry.h +=========================================================================== + + ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÉÍÍÍÍÍÍÍÍÍÍÍÍÍ» ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ³ Collection ÃÄĶAbstractArrayÇÄÂÄ´ Array ³ + ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ ÈÍÍÍÍÍÍÍÍÍÍÍÍͼ ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ + ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ÀÄ´SortedArray ³ + ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ + The abstract class AbstractArray offers random access + to the elements of the collection via an indexing + mechanism that maps a range of integers to the array + elements. Indexes can be positive or negative integers + with arbitrary lower and upper bounds (within the range + of int). Arrays derived from AbstractArray can be + dynamically resized as elements are added to them. The + data member delta determines how many additional + elements are assigned to the array when overflow + occurs. AbstractArray exists because the derived + classes SortedArray and Array have enough in common to + warrant combining the common properties into an + abstract base class. Since the derived classes differ + only in the implementation of the member functions + detach and the subscript operator, the remaining + functions can be encapsulated in AbstractArray. + + + Data members ======================================================= + + + delta sizeType delta; protected + + delta represents the additional number of elements that + will be assigned to the array if overflow occurs. If + delta is zero, the array will not be resized following + overflow. + + lastElementIndex int lastElementIndex; protected + + The index value of the last element added to the array. + For an empty array this data member has the value + (lowerbound - 1). + + lowerbound int lowerbound; protected + + + + + + + - 37 - + + +AbstractArray + + + + The lower bound of the array index, returned by the + lowerBound member function. lowerbound is the minimum + legal value of the absolute index. + + See also: lowerBound + + upperbound int upperbound; protected + + The current upper bound of the array index, returned by + the upperBound member function. upperbound is the + maximum legal value of the absolute index. + + See also: upperBound + + + Member functions ======================================================= + + + destroy void destroy( int atIndex ); + + Removes the object at the given index. Whether the + object itself is destroyed or not depends on the + array's ownership status. If the array currently owns + the object, the object will be destroyed, otherwise the + object survives. destroy is implemented with detach( + atIndex, DefDelete ). + + + arraySize sizeType arraySize() const; + + Returns the current number of cells allocated + (upperbound - lowerbound + 1). + + constructor AbstractArray( int anUpper, int aLower = 0, sizeType + aDelta = 0 ); + + Constructs and "zeroes" an array, given the upper and + lower index bounds. The default lower bound is 0, the + traditional origin for C arrays. The default delta is + also zero, giving a fixed, nonresizable array. If delta + is nonzero, run-time array overflow invokes the + reallocate member function to provide more space (in + increments of delta). A PRECONDITION is set to test if + the lower bound is greater than or equal to the lower + bound. + + detach virtual void detach( int atIndex, DeleteType dt = + NoDelete ); + + + + - 38 - + + + AbstractArray + + + + virtual void detach( Object& toDetach, DeleteType dt = + NoDelete ); + + The first version removes the object at atIndex; the + second version removes the object toDetach. The value + of dt and the current ownership setting determine + whether the object itself will be deleted. DeleteType + is defined in the base class TShouldDelete as enum { + NoDelete, DefDelete, Delete }. The default value of dt, + NoDelete, means that the object will not be deleted + regardless of ownership. With dt set to Delete, the + object will be deleted regardless of ownership. If dt + is set to DefDelete, the object will only be deleted if + the array owns its elements. + + See also: TShouldDelete::ownsElements + + initIterator virtual ContainerIterator& initIterator() const; + + Creates an external iterator for this array. + + See also: ContainerIterator class + + isEqual int isEqual( const Object& testObject ) const; + + Returns 1 if the testObject array is equal to the + calling array. Equal means that the two arrays have the + same object ID, the arrays' dimensions are equal, and + that their components are equal in each index position. + Otherwise, isEqual returns 0. + + lowerBound int lowerBound() const; + + Returns the array's lowerbound. + + objectAt Object& objectAt( int atIndex ) const; protected + + Returns a reference to the element at the given index. + + See also: operator [] + + operator [] Object& operator []( int atIndex ) const; + + Returns a reference to the object at the given array + index. + + printContentsOn void printContentsOn( ostream& outputStream ) const; + + + + + - 39 - + + +AbstractArray + + + + Prints an array, with header and trailer, to the given + stream. + + ptrAt Object *ptrAt( int atIndex ) const; protected + + Returns a pointer to the element at the given index. + + reallocate void reallocate( sizeType newSize ); protected + + If delta is zero, reallocate gives an __EEXPANDFS + error. Otherwise, reallocate tries to create a new + array of size newSize (adjusted upwards to the nearest + multiple of delta). The existing array is copied to the + expanded array and then deleted. Unused elements in the + new array are zeroed. An __ENOMEM error is invoked if + there is insufficient memory for the reallocation. + + removeEntry void removeEntry( int loc ); protected + + Reduces the array by one element. Elements from index + (loc + 1) upwards are copied to positions loc, (loc + + 1), and so on. The original element at loc is lost. + + setData void setData( int loc, Object *data ); protected + + The given data replaces the existing element at the + index loc. + + squeezeEntry void squeezeEntry( int squeezePoint ); protected + + Reduces the array by one element. As for removeEntry + but squeezePoint is an index relative to the lower + bound + + upperBound int upperBound() const; + + Returns the array's current upperbound. + + + Friends ======================================================= + + ArrayIterator is a friend of AbstractArray + + + + + + + + + + - 40 - + + + Array + + + +=========================================================================== +Array array.h +=========================================================================== + + ÚÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÉÍÍÍÍÍÍÍÍÍÍÍÍ» + ³AbstractArrayÃÄĶ Array º + ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÈÍÍÍÍÍÍÍÍÍÍÍͼ + + The instance class Array is derived from class + AbstractArray. An Array object defines an array in + which the ordering of the elements is arbitrary. That + is, the element at index i of the array need have no + relationship to the element at index i + 1. + + Array adds the functions add and addAt. While add + stores a given object at the next free place in the + array (expanding the array if necessary), addAt stores + the object at a specified index. + + + Example ======================================================= + + Source #include + #include + #include + #include + + int main() + { + Array a(2); + + String *s1 = new String("a string"); + String *s2 = new String("another string"); + Association *a1 = new Association(*s1,*s2); + + // Put some objects in the array + a.add(*s1); + a.add(*s2); + a.add(*a1); + + // Print as a Container + cout << "As a container:\n" << a << endl << endl; + + // Print as an Array + cout << "As an array:\n"; + a.printContentsOn(cout); + + // Print as elements + + + + - 41 - + + +Array + + + + cout << "\nAs elements:\n"; + for (int i = 0; i < a.arraySize(); ++i) + cout << a[i] << endl; + return(0); + } + + Output As a container: + Array { a string, + another atring, + Association { a string, another string } + } + + As an array: + Array { a string, + another atring, + Association { a string, another string } + } + + As elements: + a string + another string + Association { a string, another string} + + + Member functions ======================================================= + + + add virtual void add( Object& toAdd ); + + Adds the given object at the next available index at + the end of an array. Adding an element beyond the upper + bound leads to an overflow condition. If overflow + occurs and delta is nonzero, the array is expanded (by + sufficient multiples of delta bytes) to accommodate the + addition. If delta is zero, overflow gives an error. + + addAt void addAt( Object& toAdd, int atIndex ); + + Writes the given object at the specified index. If that + index is occupied, the previous object is deleted. If + atIndex is beyond the upper bound, the array is + expanded if delta is nonzero. If delta is zero, + attempting to addAt beyond the upper bound gives an + error. + + constructor Array( int anUpper, int aLower = 0, sizeType Delta = 0 + ); + + + + + - 42 - + + + Array + + + + Constructs and "zeroes" an array by calling the base + AbstractArray constructor. + + See also: AbstractArray::AbstractArray + + isA virtual classType isA() const; + + Returns arrayClass, the Arrays type ID. + + nameOf virtual char *nameOf() const; + + Returns "Array", the Array type ID string. + + + +=========================================================================== +ArrayIterator abstarry.h +=========================================================================== + + ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» + ³ContainerIteratorÃÄĶ ArrayIterator º + ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ + Provides iterator functions to traverse objects of the + class AbstractArray and its derived classes. + ArrayIterator is a friend class of AbstractArray + + + Member functions ======================================================= + + + constructor ArrayIterator( const AbstractArray& toIterate ); + + Creates an iterator object for the given array. + + See also: restart + + current virtual Object& current(); + + Returns the object at the current index of the + iterator. If the current index doesn't refer to a valid + object, NOOBJECT is returned. + + operator ++ virtual Object& operator ++ (); + virtual Object& operator ++ ( int ); + + See ContainerIterator operator ++ + + operator int() virtual operator int(); + + + + - 43 - + + +ArrayIterator + + + + Conversion operator to test for end of iterator + position. + + restart virtual void restart(); + + Sets the current index of the iterator to the first + nonempty object in the array. + + + +=========================================================================== +Association assoc.h +=========================================================================== + + ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÉÍÍÍÍÍÍÍÍÍÍÍÍ» + ³ Object ÃÄĶAssociation º + ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ ÈÍÍÍÍÍÍÍÍÍÍÍͼ + + The Association class provides a simple mechanism for + associating two objects, known as the value object and + the key object, in one Association type object. These + combined objects are typically stored in a Dictionary + type object, which provides member functions to + retrieve the value when given the key, providing the + basic tools for many data-retrieval applications. + + + Member functions ======================================================= + + + constructor Association( Object& key, Object& value ); + + Constructs an association object from the given key and + value objects. + + constructor Association( const Association& a ); + + Copy constructor. + + hashValue virtual hashValueType hashValue() const; + + Returns the hash value of the association's key. See + HashTable::hashValue for more details. + + isA virtual classType isA() const; + + Returns associationClass, the Association type ID. + + + + + - 44 - + + + Association + + + + isAssociation virtual int isAssociation() const; + + Returns 1 for association objects (and 0 for other + object types). + + isEqual virtual int isEqual( const Object& toObject ) const; + + Returns 1 if toObject and the calling association have + equal keys, otherwise returns 0. + + key Object& key() const; + + Returns the key object of the association. + + nameOf virtual char *nameOf() const; + + Returns "Association", the Association type ID string. + + printOn virtual void printOn( ostream& outputStream ) const; + + operator << is a Prints the association on the given output stream. + friend of Object. printOn is really for internal use by the overloaded + See page 87. operator <<. + + value Object& value() const; + + Returns the value object of the association. + + Example ======================================================= + + Source // File TASSOC.CPP: Illustrates the Association class + + #include // For strlen() + #include + #include + #include + + void identify(Object&); + + main() + { + char s1[21], s2[81]; + + // Read a key + cout << "Enter a key: "; + cin >> s1; + cin.get(); // Eat newline + + + + + - 45 - + + +Association + + + + String str1(s1); + identify(str1); + + // Read a value + cout << "Enter a value: "; + cin.getline(s2,81); + s2[strlen(s2) - 1] = '\0'; + String str2(s2); + identify(str2); + + Association a1(str1,str2); + identify(a1); + Association a2 = a1; + identify(a2); + + cout << "Equal: " << a1.isEqual(a2) << endl; + } + + void identify(Object& o) + { + // Echo an object and its type + cout << "Value: " << o + << ", Object type: " << o.nameOf() + << endl << endl; + } + + Output Enter a key: class + Value: class, Object type: String + + Enter a value: A group of related objects + Value: A group of related objects, Object type: String + + Value: Association { class, A group of related + objects } + , Object type: Association + + Value: Association { class, A group of related + objects } + , Object type: Association + + Equal: 1 + + + + + + + + + + + - 46 - + + + Bag + + + +=========================================================================== +Bag bag.h +=========================================================================== + + ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÉÍÍÍÍÍÍÍÍÍÍÍÍ» ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ³ Collection ÃÄĶ Bag ÇÄÄ´ Set ³ + ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ ÈÍÍÍÍÍÍÍÍÍÍÍͼ ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ + A Bag is an unordered collection that may contain more + than one of the same object. Bag also provides the base + class for Set. Unlike Bags, Sets can contain only one + copy of a any given object. + + + Member functions ======================================================= + + + add virtual void add( Object& toAdd ); + + Adds the given object at the next available index at + the end of an array. Adding an element beyond the upper + bound leads to an overflow condition. If overflow + occurs and delta is nonzero, the array is expanded (by + sufficient multiples of delta bytes) to accommodate the + addition. If delta is zero, overflow gives an error. + + constructor Bag( sizeType bagSize = DEFAULT_BAG_SIZE ); + + Constructs an empty bag. bagSize represents the initial + number of slots allocated. + + detach virtual void detach( Object& toDetach, DeleteType dt = + NoDelete ); + + See Array::detach. + + findMember virtual Object& findMember( Object& toFind ) const; + + Returns the given object if found, otherwise returns + NOOBJECT. + + firstThat virtual Object& firstThat( condFuncType testFuncPtr, + void *paramList ) const; + + See also: Container::firstThat, Object::firstThat + + flush void flush( DeleteType dt = DefDelete ); + + + + + + - 47 - + + +Bag + + + + Removes all the elements from the bag without + destroying the bag. The value of dt determines whether + the elements themselves are destroyed. By default, the + ownership status of the bag determines their fate, as + explained in the detach member function. You can also + set dt to Delete and NoDelete. + + See also: detach + + forEach void forEach( void ( *actionFuncPtr)(Object& o, void + *), void *args ); + + See also: Container::forEach + +getItemsInContainer countType getItemsInContainer() const; + + Returns the number of items in the bag. + + hasMember virtual int hasMember( const Object& obj ) const; + + Returns 1 if the given object is found in the bag, + otherwise returns 0. + + initIterator ContainerIterator& initIterator() const; + + Creates and returns an iterator for this bag. + + See also: ContainerIterator class + + isA virtual classType isA() const; + + Returns bagClass the Bag type ID. + + isEmpty int isEmpty() const; + + Returns 1 if a container has no elements; otherwise + returns 0. + + lastThat virtual Object& lastThat( condFuncType testFuncPtr, + void *paramList ) const; + + Returns a reference to the last object in the container + that satisfies a given condition. You supply a + testFuncPtr that returns true for a certain condition. + You can pass arbitrary arguments via the paramList + argument. NOOBJECT is returned if no object in the + container meets the condition. Note that you are not + involved directly with iterators: firstThat and + + + + - 48 - + + + Bag + + + + lastThat create their own internal iterators, so you + can simply treat them as "search" functions. + + See also: firstThat, Object::firstThat, + Container::lastThat + + nameOf virtual char *nameOf() const; + + Returns "Bag", the Bag type ID string. + + ownsElements int ownsElements(); + void ownsElements( int del ); + + See TShouldDelete::ownsElements + + + +=========================================================================== +BaseDate ldate.h +=========================================================================== + + ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÉÍÍÍÍÍÍÍÍÍÍÍÍ» ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ³ Sortable ÃÄĶ BaseDate ÇÄÄ´ Date ³ + ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ ÈÍÍÍÍÍÍÍÍÍÍÍͼ ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ + BaseDate is an abstract class derived from Sortable + that provides basic date manipulation functions. + + + Member functions ======================================================= + + + constructor BaseDate(); protected + + Creates a BaseDate object with the current system date. + + constructor BaseDate( unsigned char M, unsigned char D, unsigned Y + ); protected + + Creates a BaseDate object with the given month, day, + and year. + + constructor BaseDate( const BaseDate& BD ); protected + + Copy constructor. + + Day unsigned Day() const; + + Returns the day of the month. + + + + - 49 - + + +BaseDate + + + + hashValue virtual hashValueType hashValue() const; + + Returns the hash value of the date object. See + HashTable::hashValue for more details. + + isA virtual classType isA() const = 0; + + A pure virtual function to return a classtype ID (to be + defined in derived classes). + + isEqual virtual int isEqual( const Object& testDate ) const; + + Returns 1 if the object represents the same date as + testDate. Otherwise returns 0. + + isLessThan virtual int isLessThan( const Object& testDate ) const; + + Returns 1 if the object precedes testDate on the + calendar. + + Month unsigned Month() const; + + Returns the month. + + nameOf virtual char *nameOf() const = 0; + + Pure virtual function to be defined by derived classes + to return their object ID string. + + printOn virtual void printOn( ostream& outputStream ) const = + 0; + + operator << is a Pure virtual function to be defined in derived classes + friend of Object. to print the date object on the given stream. printOn + See page 87. is for internal use by the overloaded operator <<. + + SetDay void SetDay( unsigned char D ); + + Sets the day to D. + + SetMonth void SetMonth( unsigned char M ); + + Sets the month to M. + + SetYear void SetYear( unsigned Y ); + + Sets the year to Y. + + + + + - 50 - + + + BaseDate + + + + Year unsigned Year() const; + + Returns the year. + + + +=========================================================================== +BaseTime ltime.h +=========================================================================== + + ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÉÍÍÍÍÍÍÍÍÍÍÍÍ» ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ³ Sortable ÃÄĶ BaseTime ÇÄÄ´ Time ³ + ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ ÈÍÍÍÍÍÍÍÍÍÍÍͼ ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ + + BaseTime is an abstract class derived from Sortable + that provides basic time manipulation functions. + + + Member functions ======================================================= + + + constructor BaseTime(); protected + + Creates a BaseTime object with the current system time. + + constructor BaseTime( const BaseTime& BT ); protected + + Copy constructor. + + constructor BaseTime( unsigned char H, unsigned char M = 0, + unsigned char S = 0, unsigned char HD = 0 + ); protected + + Creates a BaseTime object with the given hour, minutes, + seconds, and hundredths of seconds. + + hashValue virtual hashValueType hashValue() const; + + Returns the hash value of the BaseTime object. See + HashTable::hashValue for more details. + + hour unsigned hour() const; + + Returns the hour. + + hundredths unsigned hundredths() const; + + + + + + - 51 - + + +BaseTime + + + + Returns the hundredths of a second. + + isA virtual classType isA() const = 0; + + Pure virtual function for a derived class to return its + class ID. + + isEqual virtual int isEqual( const Object& testTime ) const; + + Returns 1 if this object equals testTime; otherwise + returns 0. + + isLessThan virtual int isLessThan( const Object& testTime ) const; + + Returns 1 if this object is less than testTime; + otherwise returns 0 . + + minute unsigned minute() const; + + Returns the minute. + + nameOf virtual char *nameOf() const = 0; + + Pure virtual function to be defined by derived classes + to return their object ID string. + + printOn virtual void printOn( ostream& outStream ) const = 0; + + operator << is a Pure virtual function to be defined in derived classes + friend of Object. to print the time object on the given stream. printOn + See page 87. is for internal use by the overloaded operator <<. + + second unsigned second() const; + + Returns the seconds. + + setHour void setHour( unsigned char H ); + + Sets the hour to H. + + setHundredths void setHundredths( unsigned char HD ); + + Sets the hundredths of a second to HD. + + setMinute void setMinute( unsigned char M ); + + Sets the minutes. + + + + + - 52 - + + + BaseTime + + + + setSecond void setSecond( unsigned char S ); + + Sets the seconds. + + + +=========================================================================== +Btree btree.h +=========================================================================== + + ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÉÍÍÍÍÍÍÍÍÍÍÍÍ» + ³ Collection ÃÄĶ Btree º + ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ ÈÍÍÍÍÍÍÍÍÍÍÍͼ + + The class Btree, derived from Collection, implements + the B-tree, a popular data structure offering efficient + storage and retrieval with large, dynamic volumes of + data. (A detailed account of Turbo C++ development of + B-tree theory is beyond the scope of this manual: see + BTREE.CPP and D. E Knuth's The Art of Computer + Programming, Volume 3, 6.2.3.). Btree makes use of + several auxiliary, noncontainer friend classes: Node, + Item, InnerNode, and LeafNode (the last two being + derived from Node). You can study these in btree.h. + Here, we will just outline the members of the Btree + class, which should suffice for most applications. + + + Member functions ======================================================= + + + add void add( Object& ); + + Add the given object to the B-tree. + + constructor Btree( int ordern = 3 ); + + Creates a B-tree of order ordern (default order is 3). + + decrNofKeys void decrNofKeys(); protected + + Decrements the itemsInContainer data member + + detach void detach( Object& toDetach, DeleteType dt = NoDelete + ); + + + + + + + - 53 - + + +Btree + + + + Removes the given object from the B-tree. The fate of + the removed object depends on the argument dt. See + TShouldDelete for details. + + findMember virtual Object& findMember( const Object& toFind ) + const; + + Returns the given object if found, otherwise returns + NOOBJECT. + + flush void flush( DeleteType dt = DefDelete ); + + Flushes (empties) the B-tree. The fate of the removed + objects depends on the argument dt. See TShouldDelete + for details. + + hasMember virtual int hasMember( const Object& obj ) const; + + Returns 1 if the given object is found in the B-tree, + otherwise returns 0. + + hashValue virtual hashValueType hashValue() const; + + Returns the hash value of this B-tree. See + HashTable::hashValue for more details. + + i_add long i_add( const Object& obj ); protected + + Adds the given object to the tree and returns the index + in the tree at which the object was inserted. + + incrNofKeys void incrNofKeys(); protected + + Increments the itemsInContainer data member + + initIterator virtual ContainerIterator& initIterator() const; + + Creates an iterator for this B-tree. + + See also: Container::initIterator + + isA virtual classType isA() const; + + Returns btreeClass, the Btree class ID + + isEqual virtual int isEqual( const Object& testObject ) const; + + Returns 1 if testObject is the same as this object. + + + + - 54 - + + + Btree + + + + nameOf virtual char *nameOf() const; + + Returns "Btree", the Btree class ID string + + operator [] Object& operator[]( long i ) const; + + Returns the root at index i + + order int order(); + + Returns the order of the B-tree. + + printOn virtual void printOn( ostream& outputStream ) const; + + operator << is a Sends the formatted B-tree data to the given output + friend of Object. stream. printOn is for internal use by the overloaded + See page 87. operator <<. + + rank long rank( const Object& obj ) const; + + Returns the rank of the given object in the B-tree. + + + Friends ======================================================= + + Node, InnerNode, and LeafNode are friends of Btree. + + + +=========================================================================== +BtreeIterator btree.h +=========================================================================== + + ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» + ³ContainerIteratorÃÄĶ BtreeIterator º + ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ + + The class BtreeIterator is derived from + ContainerIterator. Its members follow the same scheme + as those for the other container iterators. + + + + + + + + + + + + - 55 - + + +BtreeIterator + + + + Member functions ======================================================= + + + constructor BtreeIterator( const Btree& toIterate ); + + See ContainerIterator constructor + + current virtual Object& current(); + + See ContainerIterator::current + + operator ++ virtual Object& operator ++(); + virtual Object& operator ++( int ); + + See ContainerIterator::operator ++ + + operator int virtual operator int(); + + Conversion operator to test for end of iterator + position. + + restart virtual void restart(); + + See ContainerIterator::restart + + + + + + + + + + + + + + + + + + + + + + + + + + + + - 56 - + + + Collection + + + +=========================================================================== +Collection collect.h +=========================================================================== + + ÚÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ÚÄ´AbstractArray³ + ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ÃÄ´ HashTable ³ + ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÉÍÍÍÍÍÍÍÍÍÍÍÍ» ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ³ Container ÃÄĶ Collection ÇÄÅÄ´ List ³ + ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ ÈÍÍÍÍÍÍÍÍÍÍÍͼ ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ÃÄ´ DoubleList ³ + ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ÃÄ´ Bag ³ + ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ÀÄ´ Btree ³ + ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + + Collection is an abstract class derived from the + abstract class Container. This means that although + Collection is more specialized than Container, it still + cannot be used directly for creating useful objects but + exists only as a further stepping stone towards usable, + derived instance classes. + + Collection inherits five pure virtual functions (flush, + initIterator, isA, nameOf and getItemsInContainer), + that simply await definitions down the road by derived + instance classes. + + Collection extends the functionality of Container in + several areas by adding both virtual and pure virtual + member functions. The extra pure virtual functions are + add and detach. Instance classes ultimately derived + from Collection, therefore, will need to provide + appropriate member functions for adding and removing + elements. + + The other (non-pure) virtual member functions added by + Collection are destroy, hasMember, and findMember. The + last two provide the key difference between Collection + and Container. A Collection-derived object can + determine if any given object is a member (with + + + + - 57 - + + +Collection + + + + hasMember) and, by using an iterator, can locate a + member object within the collection (with findMember). + + The offspring of Collection refine these access methods + in various ways, and add other functions. In most + applications, you will be dealing directly with a + particular derived class of Collection, chosen to match + your needs: sorted and unsorted arrays, hash tables, + bags, sets, dictionaries, and single and double lists. + However, it is useful to have a feel for how these + instance classes build up from abstract classes, and + why it is useful to have intermediate abstract classes. + + + Member functions ======================================================= + + + add virtual void add( Object& o ) = 0; + + Pure virtual function to be defined in derived classes + to add an object to a collection. + + constructor Uses the Container base constructor. + + destroy void destroy( const Object& o ); + + Removes an object from a Collection. Whether the object + itself is destroyed or not depends on the ownership + status of the collection. If the collection currently + owns the object, the object will be destroyed, + otherwise the object survives. destroy is implemented + with detach( o, DefDelete ); + + See also: TShouldDelete::ownsElements + + detach virtual void detach( Object& o, DeleteType dt = + NoDelete) = 0; + + Pure virtual function to be defined in derived classes + to remove an object from a collection. The destruction + of the object depends both on the ownership status and + the value (Delete, NoDelete, or DefDelete) passed via + the dt argument. + + See also: destroy, TShouldDelete::ownsElements + + findMember virtual Object& findMember( const Object& testObject ) + const; + + + + - 58 - + + + Collection + + + + Returns the test object if it is in the collection, + otherwise returns NOOBJECT. + + hasMember virtual int hasMember( const Object& o ) const; + + Returns 1 if the collection contains the given object. + + + +=========================================================================== +Container contain.h +=========================================================================== + + ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ÚÄ´ Collection ³ + ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ +ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÉÍÍÍÍÍÍÍÍÍÍÍÍ» ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ +³ Object ÃÄĶ Container ÇÄÅÄ´ Stack ³ +ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ ÈÍÍÍÍÍÍÍÍÍÍÍͼ ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ + ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ÃÄ´ PriorityQueue ³ + ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + ³ + ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ÀÄ´ Deque ÃÄ´ Queue ³ + ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ + + + The abstract class Container, derived directly from + Object, is the base for all the container classes. + Container has a second pure virtual base class (not + shown) called TShouldDelete. Container provides the + following functionality: + + 1. A container can store objects of other classes, + known as elements or items. (The objects in a + container are sometimes called "members" of the + container, but this usage can lead to ambiguities in + C++.) A container can flush itself by removing all + its elements. + + 2. A container can determine the number of objects it + holds. Empty containers are allowed. + + 3. Container is also derived from TShouldDelete + (multiple inheritance), which lets you control the + ownership of a container's elements. By default, a + container owns its elements, meaning that it will + + + + - 59 - + + +Container + + + + destroy them when its destructor is called or when + it is flushed. + + 4. A container can create external iterators, objects + of type ContainerIterator, which can be used to + traverse the container, element by element. With + external iterators, you need to handle the scanning + of the elements yourself. Other iterators, known as + internal iterators, are generated automatically by + certain member functions. These do their own loop + tests and can perform arbitrary actions on each + element (forEach). Member functions are also + available for scanning the container until a certain + condition is satisfied (firstThat, lastThat). + + 5. A container can test if it is equal to another + container. + + 6. A container can display its elements on streams in a + formatted way. A printOn function is provided from + which the usual overloaded << output operator can be + obtained. + + Strictly speaking, some of the above member functions + are pure virtual functions that need to be defined in + derived classes. See Collection class for a more + detailed discussion. + + Specialized containers are derived to two ways: + directly derived are the classes Stack, PriorityQueue, + and Deque (from which Queue is derived). Derived + indirectly via another abstract class, Collection, are + AbstractArray, HashTable, Bag, Btree, List, and + DoubleList. + + itemsInContainer countType itemsInContainer; protected + + Holds the current number of elements in the container. + + See also: getItemsInContainer + + + Member functions ======================================================= + + + constructor Container(); + + Creates an empty container. + + + + - 60 - + + + Container + + + + firstThat virtual Object& firstThat( condFuncType testFuncPtr, + void *paramList ) const; + + Returns a reference to the first object in the + container that satisfies a given condition. You supply + a testFuncPtr that returns true for a certain + condition. You can pass arbitrary arguments via the + paramList argument. NOOBJECT is returned if no object + in the container meets the condition. Note that you are + not involved directly with iterators: firstThat and + lastThat create their own internal iterators, so you + can simply treat them as "search" functions. + + See also: lastThat, Object::firstThat + + flush virtual void flush( DeleteType dt = DefDelete ) = 0; + + A pure virtual function to be defined in derived + classes. Flushing means removing all the elements from + the container without destroying it. The value of dt + determines whether the elements themselves are + destroyed. By default, the ownership status of the + container determines their fate. You can also set dt to + Delete and NoDelete. + + See also: TShouldDelete::ownsElements + + forEach virtual void forEach( iterFuncType actionFuncPtr, void + *args ); + + forEach creates an internal iterator to execute the + given action function for each element in the + container. The args argument lets you pass arbitrary + data to the action function. + +getItemsInContainer virtual countType getItemsInContainer() const = 0; + + Pure virtual function to be defined by derived classes + to return the number of elements in a container. + + hashValue virtual hashValueType hashValue() const = 0; + + A pure virtual function to be defined by derived + classes to return the hash value of an object. See + HashTable::hashValue for more details. + + initIterator virtual ContainerIterator& initIterator() const = 0; + + + + + - 61 - + + +Container + + + + Pure virtual function to be defined in derived classes + to initialize an external container iterator. + + isA virtual classType isA() const = 0; + + Pure virtual function to be defined in derived classes + to return their class ID. + + isEmpty virtual int isEmpty() const = 0; + + Pure virtual function to be defined in derived classes. + Returns 1 if a container has no elements; otherwise + returns 0. + + isEqual virtual int isEqual( const Object& testObject ) const; + + Returns 1 if the testObject is a container of the same + type and size as this container, and with the same + objects in the same order. Otherwise returns 0. + + lastThat virtual Object& lastThat( condFuncType testFuncPtr, + void *paramList ) const; + + Returns a reference to the last object in the container + that satisfies a given condition. You supply a + testFuncPtr that returns true for a certain condition. + You can pass arbitrary arguments via the paramList + argument. NOOBJECT is returned if no object in the + container meets the condition. Note that you are not + involved directly with iterators: firstThat and + lastThat create their own internal iterators, so you + can simply treat them as "search" functions. + + See also: firstThat, Object::firstThat + + nameOf virtual char *nameOf() const = 0; + + Pure virtual function to be defined by derived classes + to return their object type ID string (usually the + unique class name). + + printHeader virtual void printHeader( ostream& outputStream ) + const; + + Sends a standard header for containers to the output + stream (called by printOn). + + See also: printOn, printSeparator, printTrailer + + + + - 62 - + + + Container + + + + printOn virtual void printOn( ostream& outputStream ) const; + + operator << is a Sends a formatted representation of the container to + friend of Object. the given output stream. printOn is for internal use by + See page 87. the overloaded operator <<. + + See also: printHeader, printSeparator, printTrailer + + printSeparator virtual void printSeparator( ostream& outputStream ) + const; + + Sends to the output stream a separator (comma) between + elements in a container (called by printOn). + + See also: printOn, printHeader, printTrailer + + printTrailer virtual void printTrailer( ostream& outputStream ) + const; + + Sends to the output stream a standard trailer (a + closing brace) for a container (called by printOn). + + See also: printOn, printHeader, printSeparator + + + Friends ======================================================= + + ContainerIterator is a friend of Container. + + + + + + + + + + + + + + + + + + + + + + + + - 63 - + + +ContainerIterator + + + +=========================================================================== +ContainerIterator contain.h +=========================================================================== + + ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ÚÄ´HashTableIterator ³ + ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ºContainerIteratorÇÄÅÄ´ ListIterator ³ + ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ÃÄ´DoubleListIterator³ + ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ÃÄ´ BtreeIterator ³ + ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ÀÄ´ ArrayIterator ³ + ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + + ContainerIterator is an abstract class declared as a + friend of Container. Container classes have + initIterator member functions that create + ContainerIterator-derived objects. These provide the + basic mechanisms for traversing the elements in a + container: incrementing through the container; + returning positional information; testing for + conditions, and so on. The member functions for + ContainerIterator are all pure virtual and are defined + in derived classes. See page 11 for more on the + ContainerIterator hierarchy. + + + Member functions ======================================================= + + + current virtual Object& current() = 0; + + Pure virtual function to be defined in derived classes + to return the current element. If the current element + is empty or invalid, NOOBJECT is returned. + + operator int virtual operator int() = 0; + + Pure virtual function to be defined by derived classes + to provide a conversion operator to test for end of + iteration condition. + + + + + - 64 - + + + ContainerIterator + + + + operator ++ virtual Object& operator ++() = 0; + virtual Object& operator ++( int ) = 0; + + Advances the iterator one position in the container. + The first version returns the object referred to before + incrementing; the second version returns the object + referred to after incrementing. The int argument is a + dummy used to distinguish the two operators (see the + section on Operator Overloading in the Programmer's + Guide). + + restart virtual void restart() = 0; + + Pure virtual function to be refined in derived classes + to set the current index of the iterator to the first + nonempty element in the container. + + + +=========================================================================== +Date ldate.h +=========================================================================== + + ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÉÍÍÍÍÍÍÍÍÍÍÍÍ» + ³ BaseDate ÃÄĶ Date º + ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ ÈÍÍÍÍÍÍÍÍÍÍÍͼ + The Date instance class is a direct descendant of the + abstract class BaseDate, defining a printOn function. + You can vary Date for different national conventions + without disturbing BaseDate. + + + Member functions ======================================================= + + + constructor Date(); + + Calls the BaseDate constructor to create a date object + with today's date. + + constructor Date( unsigned char M, unsigned char D, unsigned Y ); + + Calls the BaseDate constructor to create a date object + with the given date. + + constructor Date( const Date& aDate ); + + + + + + - 65 - + + +Date + + + + Copy constructor. + + isA virtual classType isA() const; + + Returns dateClass, the Date class ID. + + nameOf virtual char *nameOf() const; + + Returns "Date", the Date class ID string. + + printOn virtual void printOn( ostream& outputStream ) const; + + operator << is a Sends a formatted date to the given output stream. The + friend of Object. format is full month name, day, year, for example + See page 87. January 1, 1990. printOn is really for internal use by + the overloaded operator <<. + + + +=========================================================================== +Deque deque.h +=========================================================================== + + ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÉÍÍÍÍÍÍÍÍÍÍÍÍ» ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ³ Container ÃÄĶ Deque ÇÄ´ Queue ³ + ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ ÈÍÍÍÍÍÍÍÍÍÍÍͼ ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ + + The instance class Deque (pronounced "deck"), derived + from Container, implements a double-ended queue so it + is one of the sequence classes. Objects can be + examined, inserted, and removed at both the left and + the right ends but nowhere else. You can use the member + functions peekLeft and peekRight to examine the objects + currently at the left and the right ends. putLeft and + putRight insert objects at the ends. The getLeft and + getRight members also access the end objects but detach + them from the deque. The fate of the objects removed + from the deque is determined by the same ownership and + DeleteType considerations discussed in the + TShouldDelete class (recall that TShouldDelete is a + virtual base class for Container). Deque also acts as + the base class for Queue. + + + + + + + + + + - 66 - + + + Deque + + + + Example ======================================================= + + Source #include + #include + + main() + { + Deque d; + String *s1 = new String("one"); + String *s2 = new String("two"); + String *s3 = new String("three"); + String *s4 = new String("four"); + + // Populate the deque + d.putLeft(*s1); + d.putRight(*s2); + d.putLeft(*s3); + d.putRight(*s4); + + // Print to cout + cout << "As a container:\n" << d << endl; + + // Empty to cout + cout << "As a Deque:\n"; + while (!d.isEmpty()) + { + cout << d.getLeft() << endl; + } + + // Should be empty + cout << "\nShould be empty:\n" << d; + } + + Output As a container: + Deque { three, + one, + two, + four } + + As a Deque: + three + one + two + four + + Should be empty: + + + + + + - 67 - + + +Deque + + + + Deque { } + + + Member functions ======================================================= + + + flush virtual void flush( DeleteType dt = DefDefault ); + + Flushes (empties) the deque without destroying it. The + fate of any objects thus removed depends on the current + ownership status and the value of the dt argument. + + See also: TShouldDelete::ownsElements + +getItemsInContainer virtual countType getItemsInContainer() const; + + Returns the number of items in the deque. + + getLeft Object& getLeft(); + + Returns the object at the left end and removes it from + the deque. Returns NOOBJECT if the deque is empty. + + See also: TShouldDelete class + + getRight Object& getRight(); + + As for getLeft, except that the right end of the deque + is returned. + + See also: getLeft + + initIterator virtual ContainerIterator& initIterator() const; + + Initializes an iterator for the deque. + + See also: Container::initIterator + + isA virtual classType isA() const; + + Returns dequeClass, the Deque class ID. + + isEmpty virtual int isEmpty() const; + + Returns 1 if a container has no elements; otherwise + returns 0. + + nameOf virtual char *nameOf() const; + + + + - 68 - + + + Deque + + + + Returns "Deque", the Deque class ID string. + + peekLeft Object& peekLeft() const; + + Returns the object at the left end (head) of the deque. + The object stays in the deque. + + peekRight Object& peekRight() + + Returns the object at the right end (tail) of the + deque. The object stays in the deque. + + putLeft void putLeft( Object& obj ); + + Adds (pushes) the given object at the left end (head) + of the deque. + + putRight void putRight(Object& obj) + + Adds (pushes) the given object at the right end (tail) + of the deque. + + + +=========================================================================== +Dictionary dict.h +=========================================================================== + + ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÉÍÍÍÍÍÍÍÍÍÍÍÍ» + ³ Set ÃÄĶ Dictionary º + ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ ÈÍÍÍÍÍÍÍÍÍÍÍͼ + A dictionary is a special collection of Association + type objects. The instance class Dictionary is derived + from Collection via Bag and Set, implying that no + duplicate association objects are allowed in a + dictionary. Dictionary overrides the add function and + adds a lookup function to the members inherited from + Set. lookup allows you to retrieve the value object of + an association stored in the dictionary if you supply + the key. + + + Member functions ======================================================= + + + add virtual void add( Object& assoc ); + + + + + + - 69 - + + +Dictionary + + + + Adds the given association (assoc) to the dictionary. + If the given argument is not of type Association, a + runtime error occurs. + + constructor Dictionary( unsigned sz = DEFAULT_HASH_TABLE_SIZE ); + + Invokes the base Set constructor to create an empty + dictionary of size sz. + + isA virtual classType isA() const; + + Returns dictionaryClass, the Dictionary class ID. + + lookup Association& lookup( const Object& toLookUp ) const; + + Returns the association matching the toLookUp key. If + no match is found, NOOBJECT is returned. + + nameOf virtual char *nameOf() const; + + Returns "Dictionary", the Dictionary class ID string. + + + +=========================================================================== +DoubleList dbllist.h +=========================================================================== + + ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÉÍÍÍÍÍÍÍÍÍÍÍÍ» + ³ Collection ÃÄĶ DoubleList º + ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ ÈÍÍÍÍÍÍÍÍÍÍÍͼ + + The instance class DoubleList, derived from Collection, + implements the classical doubly-linked list data + structure (see D. E Knuth's The Art of Computer + Programming, Volume 1, 2.2.5). Briefly, each node + object of a doubly-linked list has two links, one + pointing to the next node and one pointing to the + previous node. The extreme nodes are called the head + and the tail. As with the Deque class, you can examine, + add, and remove objects at either end of the list. + + + + + + + + + + + - 70 - + + + DoubleList + + + + Member functions ======================================================= + + + add virtual void add( Object& toAdd ); + + Add the given object at the beginning of the list. + + addAtHead void addAtHead( Object& toAdd ); + + Adds the given object at the beginning (head) of the + list. + + addAtTail void addAtTail( Object& toAdd ); + + Adds the given object at the end (tail) the list. + + constructor DoubleList(); + + Creates a new, empty doubly-linked list. + + destroyFromHead void destroyFromHead( const Object& toDestroy ); + + Detaches the first occurrence of the given object + encountered by searching from the beginning of the + list. The object is destroyed only if it is owned by + the list. + + destroyFromTail void destroyFromTail( const Object& toDestroy ); + + Detaches the first occurrence of the given object + encountered by searching from the tail of the list + towards the head. The object is destroyed only if it is + owned by the list. + + detach virtual void detach( Object& toDetach, DeleteType dt = + NoDelete ); + + Calls detachFromHead( toDetach, dt); + + detachFromHead void detachFromHead( const Object& toDetach, DeleteType + dt = NoDelete ); + + Removes the first occurrence of the given object + encountered by searching from the beginning of the + list. The dt argument determines if the detached object + is itself destroyed. See TShouldDelete for details. + + + + + + - 71 - + + +DoubleList + + + + detachFromTail void detachFromTail( const Object& toDetach, DeleteType + dt = NoDelete ); + + Removes the first occurrence of the object starting at + the tail of the list and scanning towards the head. The + dt argument determines if the detached object is itself + destroyed. See TShouldDelete for details. + + flush virtual void flush( DeleteType dt = DefDelete); + + Flushes (empties) the list without destroying it. The + fate of the objects thus removed is determined by the + dt argument as explained at TShouldDelete. The default + value of dt means that the removed objects will be + destroyed only if the list owns these objects. + + See also: TShouldDelete::ownsElements + + initIterator virtual ContainerIterator& initIterator() const; + + Creates and returns a forward (from head to tail) + iterator for the list. + + isA virtual classType isA() const; + + Returns doubleListClass, the DoubleList class ID. + + nameOf virtual char *nameOf() const; + + Returns "DoubleList", the DoubleList class ID string. + + peekAtHead Object& peekAtHead() const; + + Returns the object at the head of the list (without + removing it). + + peekAtTail Object& peekAtTail() const; + + Returns the object at the tail of the list (without + removing it). + + + + + + + + + + + + - 72 - + + + DoubleList + + + + Friends ======================================================= + + DoubleListIterator is a friend of DoubleList + + + +=========================================================================== +DoubleListIterator dbllist.h +=========================================================================== + + ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» + ³ContainerIteratorÃÄĶDoubleListIteratorº + ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ + DoubleListIterator, derived from ContainerIterator, + implements the special iterators for traversing + doubly-linked lists in either direction. This class + adds overloading of the pre- and postdecrement operator + - - to allow reverse iteration. For more details on + iterators, see ContainerIterator, and + DoubleList::initIterator. + + + Member functions ======================================================= + + + constructor DoubleListIterator(const DoubleList& toIterate, int + atHead = 1); + + Creates an iterator for the given list. The iterator + will begin at the head of the list if atHead is 1 , + otherwise it starts at the tail. + + current virtual Object& current(); + + Returns the object at the current index of the + iterator. If the current index exceeds the upper bound, + NOOBJECT is returned. + + operator ++ virtual Object& operator ++ ( int ); + virtual Object& operator ++ (); + + See ContainerIterator operator ++ + + operator - - Object& operator - - ( int ); + Object& operator - - (); + + + + + + + - 73 - + + +DoubleListIterator + + + + Moves the iterator back one position in the list. The + object returned is either the current object + (postdecrement) or the object at the new position + (predecrement), or NOOBJECT if no valid object at the + relevant position. The first version gives + postdecrement, the second gives predecrement. The int + argument is a dummy serving only to distinguish the two + operators. + + operator int virtual operator int(); + + Conversion operator to test for the end of an iteration + condition. + + restart virtual void restart(); + + Moves the iterator back to its starting position at the + head of the list. + + See also: DoubleListIterator constructor + + + +=========================================================================== +Error object.h +=========================================================================== + + ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÉÍÍÍÍÍÍÍÍÍÍÍÍ» + ³ Object ÃÄĶ Error º + ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ ÈÍÍÍÍÍÍÍÍÍÍÍͼ + + The class Error is a special instance class derived + from Object. There is just one instance of class Error, + namely theErrorObject. Pointing to this global object + is the static object pointer Object::ZERO. NOOBJECT is + defined as *(Object::ZERO) in object.h. The operator + Object::operator new returns a pointer to + theErrorObject if an attempt to allocate an object + fails. You may test the return value of the new + operator against Object::ZERO to see whether the + allocation failed. + NOOBJECT is rather like a null pointer, but serves the + vital function of occupying empty slots in a container. + For example, when an Array object is created (not to be + confused with a traditional C array), each of its + elements will initially contain NOOBJECT. + + + + + + - 74 - + + + Error + + + + Member functions ======================================================= + + + delete void operator delete(void *); + + Invokes a runtime error if an attempt to delete the + Error object is detected. + + isA virtual classtype isA() const; + + Returns errorClass, the Error class ID. + + isEqual virtual int isEqual( const Object& testObject const ); + + Returns 1 if the test object is the Error object. + + nameOf virtual char *nameOf() const; + + Returns the Error class ID string. + + printOn virtual void printOn(ostream& outputStream ) const; + + operator << is a Prints the string "Error\n" on the given stream. + friend of Object. printOn is for internal use by the overloaded operator + See page 87. <<. + + + +=========================================================================== +HashTable hashtbl.h +=========================================================================== + + ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÉÍÍÍÍÍÍÍÍÍÍÍÍ» + ³ Collection ÃÄĶ HashTable º + ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ ÈÍÍÍÍÍÍÍÍÍÍÍͼ + + The instance class HashTable provides an implementation + of an unordered collection in which objects are added + and retrieved via a hashing function. A hash table + provides a fixed array with size slots (usually a prime + number), one for each possible hash value modulo size. + A hashing function computes the hash value for each + object (or a key part of that object) to be added, and + this determines the slot to which the new object is + assigned. + + + + + + + - 75 - + + +HashTable + + + + For each containable object of class X, the member + function X::HashValue returns a value (of type + hashValueType) between 0 and 65535, which is as + "unique" as possible. This "raw" hash value is reduced + modulo size. We'll use the term hash value to refer to + this reduced value in the range 0 to size - 1. This + hash value serves as an index into the hash table. The + internal organization of the table is hidden, but it + may help you to consider the slots as pointers to + lists. + + It should be clear that if you want to store more than + size objects, the hash value cannot be unique for each + object. So two cases arise when an object is added: if + the slot is empty, a new list is assigned to the slot + and the object is stored in the list; if the slot is + already occupied by an object with the same hash value + (known as a collision), the new object is stored in the + existing list attached to the slot. When it comes to + locating an object, the hashing function computes its + hash value to access the appropriate slot. If the slot + is empty, NOOBJECT is returned, otherwise a + List::findMember call locates the object. + + Choosing the best HashValue function and table size is + a delicate compromise between avoiding too many + collisions and taking up too much memory. (Other + hashing techniques are available, but the modulo prime + method is the most common. For more on hash table + theory, see D. E. Knuth's The Art of Computer + Programming, Volume 3, 6.4.). Hashing is widely used by + compilers to maintain symbol tables. + + + Member functions ======================================================= + + + add virtual void add( Object& objectToAdd ); + + Adds the given object to the hash table. + + constructor HashTable( sizeType aPrime = DEFAULT_HASH_TABLE_SIZE ); + + Creates an empty table. The aPrime argument is a prime + number used in the hashing function (the default is + defined in resource.h). + + detach + + + + - 76 - + + + HashTable + + + + virtual void detach( Object& objectToDetach, DeleteType + dt = NoDelete ); + + Removes the given object from the hash table. Whether + the object itself is destroyed or not depends on the dt + argument, as explained in TShouldDelete::ownsElements. + + findMember virtual Object& findMember( const Object& testObject ) + const; + + Returns the target object if found, otherwise returns + NOOBJECT. + + flush virtual void flush( DeleteType dt = DefDelete ); + + Removes all the elements from the table without + destroying it. The value of dt determines whether the + elements themselves are destroyed. By default (dt = + DefDelete), the ownership status of the table + determines the fate of all its elements, as explained + in TShouldDelete::ownsElements. You can set dt to + Delete to force destruction of the flushed elements + regardless of ownership. If dt is set to NoDelete, the + flushed elements will survive regardless of ownership. + + See also: TShouldDelete::ownsElements + + hashValue virtual hashValueType hashValue() const; + + Returns the raw hash value of this table. This must not + be confused with the hash values calculated by the hash + table for each of the objects it stores. When an object + x of class X is added or retrieved from a hash table h, + the raw hash value used is x.hashValue(). The true hash + value (usually modulo size) is obtained from the hash + table object via h.getHashValue( x ). Only classes with + a proper hashValue member function can provide objects + for storage in a hash table. All standard Object- + derived classes in the library have meaningful hashing + functions provided. For example, BaseDate::hashValue + (unless overridden) returns the value YY + MM + DD from + which the (private) member function + HashTable::getHashValue computes a hash value (using + mod size). It is this value that governs the hash + table's add, findMember, and detach operations. + + initIterator virtual ContainerIterator& initIterator() const; + + + + + - 77 - + + +HashTable + + + + Creates and returns an iterator for the hash table. See + Container::initIterator for more details. + + isA virtual classType isA() const; + + Returns hashTableClass, the HashTable class ID. + + nameOf virtual char *nameOf() const; + + Returns "HashTable", the HashTable class ID string. + + + Friends ======================================================= + + HashTableIterator is a friend of HashTable + + + +=========================================================================== +HashTableIterator hashtbl.h +=========================================================================== + + ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» + ³ContainerIteratorÃÄĶHashTableIterator º + ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ + + HashTableIterator is an instance class providing + iterator functions for HashTable objects. Since hash + values are stored in an array, hash table iterators use + the array iterator mechanism. See ContainerIterator for + a detailed discussion of iterators. + + + Member functions ======================================================= + + + constructor HashTableIterator( const Array& toIterate ); + + See ContainerIterator constructor + + current virtual operator Object& current(); + + See ContainerIterator::current + + operator int virtual operator int(); + + Conversion operator to test for end of iterator + position. + + + + - 78 - + + + HashTableIterator + + + + operator ++ virtual Object& operator ++ ( int ); + virtual Object& operator ++ (); + + See ContainerIterator::operator ++ + + restart virtual void restart() + + See ContainerIterator::restart + + + +=========================================================================== +List list.h +=========================================================================== + + ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÉÍÍÍÍÍÍÍÍÍÍÍÍ» + ³ Collection ÃÄĶ List º + ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ ÈÍÍÍÍÍÍÍÍÍÍÍͼ + + The instance class List, derived from Collection, + implements a linear, linked list. Lists are unordered + collections in which objects are linked in one + direction only to form a chain. You can usually add + objects only at the start of a list but any object can + be removed from a list. You can traverse a list (from + head to tail) with an iterator to access the objects + sequentially. List has an internal private class + ListElement providing memory management and other + functions for the pairs of pointers (to object and to + next element) that constitute the elements of a List + object. (For more on list theory, see Sedgwick's + Algorithms and Knuth's The Art of Computer Programming, + Volume 1, 2.2). + + Member functions ======================================================= + + + add void add( Object& toAdd ); + + Adds the given object at the head of the list. The + added object becomes the new head. + + constructor List(); + + Creates an empty list. + + detach + + + + + - 79 - + + +List + + + + virtual void detach( Object& toDetach, DeleteType dt = + NoDelete ); + + Removes the given object from the list. Whether the + object itself is destroyed or not depends on the dt + argument, as explained in TShouldDelete::ownsElements. + + flush virtual void flush( DeleteType dt = DefDelete ); + + Removes all the objects from the list without + destroying it. The value of dt determines whether the + objects themselves are destroyed. By default (dt = + DefDelete), the ownership status of the list determines + the fate of its elements, as explained in + TShouldDelete::ownsElements. You can set dt to Delete + to force destruction of the flushed objects regardless + of ownership. If dt is set to NoDelete, the flushed + objects will survive regardless of ownership. + + See also: TShouldDelete::ownsElements + + hashValue virtual hashValueType hashValue() const; + + Returns the hash value of this list. See + HashTable::hashValue for more details. + + initIterator virtual ContainerIterator& initIterator() const; + + See Container::initIterator + + isA virtual classType isA() const; + + Returns listClass the List class ID. + + nameOf virtual char *nameOf() const; + + Returns "List", the List class ID string. + + peekHead Object& peekHead() const; + + Returns the object at the head of the list. + + + Friends ======================================================= + + ListIterator is a friend of List and ListElement. + + + + + + - 80 - + + + ListIterator + + + +=========================================================================== +ListIterator list.h +=========================================================================== + + ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» + ³ContainerIteratorÃÄĶ ListIterator º + ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ + + ListIterator is an instance class derived from + ContainerIterator providing iterator functions for List + objects. See ContainerIterator for a discussion of + iterators. + + + Member functions ======================================================= + + + constructor ListIterator( const List& toIterate ); + + Creates an iterator for the given list. The starting + and current elements are set to the first element of + the list. See ContainerIterator constructor for + details. + + current virtual Object& current(); + + See ContainerIterator::current + + operator ++ virtual Object& operator ++ ( int ); + virtual Object& operator ++ (); + + See ContainerIterator::operator ++ + + operator int virtual operator int(); + + Conversion operator to test for end of iterator + position. + + + restart virtual void restart() + + See ContainerIterator::restart + + + + + + + + + + - 81 - + + +MemBlocks + + + +=========================================================================== +MemBlocks memmgr.h +=========================================================================== + + ÉÍÍÍÍÍÍÍÍÍÍÍÍ» + º MemBlocks Ç + ÈÍÍÍÍÍÍÍÍÍÍÍͼ + + The classes MemBlocks and MemStack in memmgr.h offer + specialized memory management not only for the + container classes but for other applications. Detailed + knowledge of their operations is not needed for normal + container applications. If you are planning your own + advanced memory management schemes, you should first + study memmgr.h and MEMMGR.CPP. + + MemBlocks is a noncontainer, instance class, providing + fixed-block memory allocations. Large, dynamic lists + and trees need to allocate and free their node blocks + as quickly as possible. MemBlocks offers more efficient + memory management than the standard heap manager for + this kind of operation. The MemBlock constructor takes + two arguments: block size and number of blocks. These + determine the size of the internal blocks that are + allocated as needed using the normal run-time library + allocation functions. A free list of blocks is + maintained and the internal blocks are not released + until the MemBlock object is destroyed. The following + example illustrates the use of MemBlocks with a + simplified Node class: + + class Node + { + Node *next; + Object *obj; + static MemBlocks memBlocks; + void *operator new( size_t sz ) { return + memBlocks.allocate ( sz); } + void operator delete( void * blk ) { memBlocks.free + ( blk ); } + ... + }; + + CAUTION: If you derive a class from a class that does + its own memory management as in the Node example + above, then either the derived class must be the same + size as the base class or you must override the new and + delete operators. + + + + - 82 - + + + MemBlocks + + + + See also: MemStack class. + + allocate void allocate( size_t sz, unsigned blks = 100 ); + + Allocates blks blocks each of size sz + + free void free( void * ptr ); + + Frees the memory blocks at ptr. + + + +=========================================================================== +MemStack memmgr.h +=========================================================================== + + ÉÍÍÍÍÍÍÍÍÍÍÍÍ» + º MemStack º + ÈÍÍÍÍÍÍÍÍÍÍÍͼ + + MemStack is a noncontainer, instance class, providing + fast mark-and-release style memory management. Although + used internally by various container classes, MemStack + is also available for general use. Memory allocations + and deallocations are extremely fast since they + "popped" and "pushed" on a stack of available blocks. + Marking and releasing blocks is handled by objects of a + helper marker class. When a marker is created it + records the current location in the memory stack; when + a marker is destroyed, the stack is returned to its + original state, freeing any allocations made since the + marker was created. For example: + + MemStack symbols; + + void handleLocals() + { + Marker locals( symbols ); // marks current + state of symbols + Sym *symbol1 = new(symbols)Sym; // add a Sym to the + table + Sym *symbol2 = new(symbols)Sym; // and another + } + + When the function exits, the Marker destructor releases + the memory allocated by the new(symbols) calls made in + handleLocal and restores the memory stack. + + + + + - 83 - + + +Object + + + + See also: MemBlocks + + + +=========================================================================== +Object object.h +=========================================================================== + + ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ÚÄ´ Error ³ + ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ + ÉÍÍÍÍÍÍÍÍÍÍÍÍ» ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ + º Object ÇÄÅÄ´ Sortable ³ + ÈÍÍÍÍÍÍÍÍÍÍÍͼ ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ + ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ÃÄ´Association ³ + ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ + ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ÀÄ´ Container ³ + ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ + + Object is an abstract class providing the primordial + base for the whole Object-based container hierarchy + (with the exception of the iterator classes). The + member functions provide the basic essentials for all + derived classes and the objects they contain. Object + has four immediate children: Error, Sortable, + Association, and Container. + + + Data member ======================================================= + + + ZERO static Object *ZERO; + + A static pointer to the unique instance of class Error. + ZERO is used to define NOOBJECT. + + See also: Error class + + + Member functions ======================================================= + + + constructors Object(); + Object( Object& obj ); + + Creates or copies an object. + + + + - 84 - + + + Object + + + + firstThat virtual Object& firstThat( condFuncType testFuncPtr, + void *paramList ) const; + + Returns *this if the object satisfies the condition + specified by the BOOLEAN testFunc function, otherwise + NOOBJECT is returned. You can pass arbitrary arguments + via the paramList argument. Note that firstThat, + lastThat, and forEach work for all Object-derived + objects, both container and non-container objects, + whether they are in containers or not. With container + objects, you can get iteration through the contained + objects. When used with objects outside containers, the + three functions act only on the calling object, so + firstThat and lastThat are equivalent. condFuncType is + defined in clstypes.h as + + #typdef int ( *condFuncType )( const class Object&, + void *); + + firstThat calls ( *testFuncPtr )( *this, paramList ). + If 1 is returned, firstThat returns (Object &) *this, + otherwise NOOBJECT is returned. + + See also: Container::firstThat + + forEach virtual void forEach( iterFuncType actionFuncPtr, void + *args ); + + forEach executes the given action function on *this. + The args argument lets you pass arbitrary data to the + action function. + + See also: firstThat + + hashValue virtual hashValueType hashValue() const = 0; + + A pure virtual function to be defined by derived + classes to return the hash value of an object. See + HashTable::hashValue for more details. + + isA virtual classType isA() const = 0; + + Pure virtual function for derived classes to return a + class ID. + + isAssociation virtual int isAssociation() const; + + + + + + - 85 - + + +Object + + + + Returns 1 if the calling object is part of an + Association object, otherwise returns 0. Must be + overridden in classes providing associations. + + See also: Association class. + + isEqual virtual int isEqual( const Object& testObject ) const = + 0; + + Pure virtual function to be defined in derived classes + to test for equality between testObject and the calling + object (assumed to be of the same type). isEqual is + really for internal use by the operator == which first + applies isA to see if the compared objects are of the + same type. If they are, == then uses isEqual. + + See also: operator == + + isSorttable virtual int isSortable() const; + + Returns 1 if the calling object can be sorted; that + is, if the class Sortable is an ancestor. Otherwise + returns 0. Object::isSortable returns 0. Sortable + classes must override isSortable to return true. + + See also: Sortable class + + lastThat virtual Object& lastThat( condFuncType testFuncPtr, + void *paramList ) const; + + Returns *this if the object satisfies the condition + specified by the BOOLEAN testFuncPtr function, + otherwise NOOBJECT is returned. You can pass arbitrary + arguments via the paramList argument. Note that + firstThat, lastThat, and forEach work for all Object- + derived objects, both container and non-container + objects, whether they are in containers or not. With + container objects, you get iteration through the + contained objects. When used with objects outside + containers, the three functions act only on the calling + object, so firstThat and lastThat are equivalent. + + See also: firstThat, Container::lastThat + + nameOf virtual char *nameOf() const = 0; + + Pure virtual function to be defined by derived classes + to return their object ID string. + + + + - 86 - + + + Object + + + + new void *operator new( size_t size ); + + Overrides the C++ operator new. Allocates size bytes + for an object. Returns ZERO if the allocation fails, + otherwise returns a pointer to the new object. + + printOn virtual void printOn( ostream& outputStream ) const = + 0; + + Pure virtual function to be defined in derived classes + to provide formatted output of objects on the given + output stream. printOn is really for internal use by + the overloaded operator <<. + + See also: operator << + + ptrToRef static Object ptrToRef( Object *p ); + + Returns *ZERO is p is 0, else returns *p + + + Friends ======================================================= + + operator << ostream& operator <<( ostream& outputStream, const + Object& anObject ); + + Uses printOn to send a formatted representation of + anObject to the given output stream. The stream is + returned, allowing the usual chaining of the << + operator. + + operator << is a friend of Object. + + + Related functions ======================================================= + + The following overloaded operators are related to + Object but are not member functions: + + operator == int operator ==( const Object& test1, const Object& + test2 ); + + Returns 1 if the two objects are equal, otherwise + returns 0. Equal means that isA and isEqual each return + the same values for the two objects. + + + + + + + - 87 - + + +Object + + + + Note that for sortable objects (derived from the class + Sortable) there are also overloaded nonmember operators + <, >, <=, and >=. + + See also: Object::isA, Object::isEqual, operator !=, + Sortable class. + + operator != int operator !=( const Object& test1, const Object& + test2 ); + + Returns 1 if the two objects are unequal, otherwise + returns 0. Unequal means that either isA or isEqual + each return the different values for the two objects. + + See also: Object::isA, Object::isEqual, operator == + + + +=========================================================================== +PriorityQueue priortyq.h +=========================================================================== + + ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» + ³ Container ÃÄĶ PriorityQueue º + ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ + + The instance class Priority Queue, derived from + Container, implements the traditional priority queue + data structure. The objects in a priority queue must be + sortable (see Sortable class for details). A priority + queue is either a GIFO (greatest-in-first-out) or SIFO + (smallest-in-first-out) container widely used in + scheduling algorithms. The difference really depends on + your ordering definition. In explaining this + implementation, we'll assume a GIFO. You can picture + sortable objects being added at the right, but each + extraction from the left gives the "greatest" object in + the queue. (For applications where you need to extract + the smallest item, you need to adjust your definition + of "less than.") A detailed discussion of priority + queues can be found in Knuth's The Art of Computer + Programming, Volume 3, 5.2.3. + + The member function put adds objects to the queue; + peekLeft lets you examine the largest element in the + queue; get removes and returns the largest element; you + can also detach this item with detachLeft without + + + + + - 88 - + + + PriorityQueue + + + + "getting" it. PriorityQueue is implemented internally + using a private Btree object called tree. + + + Member functions ======================================================= + + + detachLeft void detachLeft( Container::DeleteType dt = + Container::DefDelete ); + + Removes the smallest object from the priority queue. + Whether this object is destroyed or not depends on the + value of dt as explained in + TShouldDelete::ownsElements. + + flush void flush( Container::DeleteType dt = + Container::DefDelete ); + + Flushes (empties) the priority queue. The fate of the + removes objects depends on the value of dt as explained + in TShouldDelete::ownsElements. + + get Object& get(); + + Detaches the smallest object from the priority queue + and returns it. The detached object is not itself + destroyed. + +getItemsInContainer countType getItemsInContainer() const ; + + Returns the number of items in the priority queue. + + hashValue virtual hashValueType hashValue() const; + + Returns the hash value of the priority queue. See + HashTable::hashValue for more details. + + hasMember int hasMember( const Object& obj ) const; + + Returns 1 if obj belongs to the priority queue, + otherwise returns 0. + + initIterator virtual void ContainerIterator& initIterator() const; + + Creates and returns an iterator for this queue. + + See also: ContainerIterator + + + + + - 89 - + + +PriorityQueue + + + + isA virtual classType isA() const; + + Returns priorityQueueClass, the PriorityQueue type ID. + + isEmpty int isEmpty(); + + Returns 1 if the priority queue is empty, otherwise + returns 0. + + nameOf virtual char *nameOf() const; + + Returns "PriorityQueue", the PriorityQueue type ID + string. + + peekLeft Object& peekLeft(); + + Returns the smallest object in the priority queue + without removing it. + + put void put( Object& o ); + + Add the given object to the priority queue. + + + +=========================================================================== +Queue queue.h +=========================================================================== + + ÚÄÄÄÄÄÄÄÄ¿ ÉÍÍÍÍÍÍÍÍÍÍÍÍ» + ³ Deque ÃÄĶ Queue º + ÀÄÄÄÄÄÄÄÄÙ ÈÍÍÍÍÍÍÍÍÍÍÍͼ + + The instance class Queue, derived from Deque, + implements the traditional queue data structure. A + queue is a FIFO (first-in-first-out) container where + objects are inserted at the left (head) and removed + from the right (tail). For a detailed discussion of + queues, see Knuth's The Art of Computer Programming, + Volume 1, 2.2.1. + + The member functions put and get insert and remove + objects. + Queue is implemented as a restricted-access version of + Deque. + + + + + + + - 90 - + + + Queue + + + + Example ======================================================= + + Source #include + #include + #include + + main() + { + Queue q; + String *s1 = new String("a string"); + String *s2 = new String("another string"); + Association *a1 = new Association(*s1,*s2); + + // Populate the queue + q.put(*s1); + q.put(*s2); + q.put(*a1); + + // Print to cout as a Container + cout << "As a container:\n" << q << endl; + + // Empty the queue to cout + cout << "As a queue:\n"; + while (!q.isEmpty()) + { + cout << q << endl; + } + cout << endl; + + // Queue should be empty + cout << "Should be empty:\n" << q; + } + + Output As a container: + Queue { Association { a string, another a string } + , + another string, + a string } + + As a queue: + a string + another string + Association { a string, another string } + + Should be empty: + Queue { } + + + + + + - 91 - + + +Queue + + + + Member functions ======================================================= + + + get Object& get(); + + Removes the object from the end (tail) of the queue. By + default the removed object will not be destroyed. If + the queue is empty, NOOBJECT is returned. Otherwise the + removed object is returned. + + See also: TShouldDelete class + + isA virtual classType isA() const; + + Returns queueClass, the Queue type ID. + + put void put( Object& o ); + + Add an object to (the tail of) a queue. + + + +=========================================================================== +Set set.h +=========================================================================== + + ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÉÍÍÍÍÍÍÍÍÍÍÍÍ» ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ³ Bag ÃÄĶ Set ÇÄÄ´ Dictionary ³ + ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ ÈÍÍÍÍÍÍÍÍÍÍÍͼ ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ + + The instance class Set is a collection that allows only + one instance of any object. This restriction calls for + a specialized add member function to trap any + duplicates. Apart from this difference, the Set and Bag + classes are essentially the same. + + + Member functions ======================================================= + + + add virtual void add( Object& objectToAdd ); + + Adds the given object to the set only if it is not + already a member. If objectToAdd is found in the set, + add does nothing. + + + + + + + - 92 - + + + Set + + + + See also: Collection::hasMember + + constructor Set( sizeType setSize = DEFAULT_SET_SIZE ); + + Creates a set with the given size by calling the base + Bag constructor. + + See also: Bag::Bag + + isA virtual classType isA() const; + + Returns setClass, the Set class ID. + + nameOf virtual char *nameOf() const; + + Returns "Set", the Set class ID string. + + + +=========================================================================== +Sortable sortable.h +=========================================================================== + + ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ÚÄ´ String ³ + ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ + ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÉÍÍÍÍÍÍÍÍÍÍÍÍ» ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ³ Object ÃÄĶ Sortable ÇÄÅÄ´ BaseDate ³ + ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ ÈÍÍÍÍÍÍÍÍÍÍÍͼ ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ + ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ÀÄ´ BaseTime ³ + ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ + + Sortable is an abstract class derived from Object. You + can use it to build classes of sortable objects. + Objects are said to be sortable when they can be placed + in an order based on some useful and consistent + definition of "less than", "equal", and "greater than." + Any two of these conditions will suffice, in fact, + since the remaining condition can be constructed with + logical operators. Sortable uses the two primitives + "less than" and "equal" via the pure virtual functions + (pure virtual functions) isLessThan and isEqual. Both + of these member functions are applicable only to + objects of the same type (see operators == and < for + more details). The isEqual member function is a pure + virtual function inherited from Object (since unordered + objects also need a test for equality), whereas + + + + - 93 - + + +Sortable + + + + isLessThan is a new pure virtual function for Sortable. + Your derived classes must define these two member + functions to provide an appropriate ordering of their + objects. + + Once isLessThan and isEqual are defined, you can use + the overloaded operators ==, !=, <, <=, >, >= in the + obvious way (see Related Functions section below). The + < operator tests the objects' types first with isA and + returns 0 if the objects are of different types. Then + if the objects are of the same type, the isLessThan + member is called, returning 0 or 1. If your application + calls for the ordering of objects of different types, + you would have to define your own comparison operators. + + The elements stored in ordered containers must clearly + be sortable. For example, when adding elements to a + SortedArray object, the add member function must + compare the "size" of the incoming object against that + of the existing elements. Similarly, Btree objects make + use of magnitude for storage and access methods. Note, + however, that an unordered container can hold either + unsortable or sortable objects. + + The type of sortable objects available differs between + the Object-based containers and the template-based + containers. In the Object-based hierarchy you must use + objects ultimately derived from Sortable, whereas the + template containers let you store any object or + predefined data type for which == and < is defined. If + you want to store ints in an Object-based container, + for example, you must invent a suitable class: + + class Integer : public Sortable + { + int data; + ... + public: + + virtual char *nameOf() const { return "Integer"; } + virtual classType isA() const { return + integerClass; } + virtual int isLessThan( const Object& i ) const + { return data < ((Integer&)i).data; } + ... + } + + + + + + - 94 - + + + Sortable + + + + The Object-based container library already provides + three useful instance classes derived from Sortable: + String, Date, and Time with the natural ordering you + would expect. Remember, though, that you are free to + define your own orderings in derived classes to suit + your application. You must make sure that your + comparisons are logically consistent. For instance, > + must be transitive: A > B and B > C must imply A > C. + + + Member functions ======================================================= + + + hashValue virtual hashValueType hashValue() const = 0; + + A pure virtual function to be defined by derived + classes to return the hash value of a sortable object. + See HashTable::hashValue for more details. + + isA virtual classType isA() const = 0; + + Pure virtual function to be defined in derived classes + to return their class ID. + + isEqual virtual int isEqual( const Object& testObject ) const = + 0; + + Pure virtual function to be defined in derived classes + to test for equality. Equality means that the calling + object is the same type as testObject and that their + values (as defined by this member function) are equal. + Returns 1 for equality, otherwise 0. + + isLessThan virtual int isLessThan( const Object& testObject ) + const = 0; + + Pure virtual function to be defined in derived classes + to test for "less than." Returns 1 for "less than", + otherwise 0. + + isSortable virtual int isSortable() const; + + Returns 1 for all objects derived from Sortable + (overrides Object::isSortable). + + nameOf virtual char *nameOf() const = 0; + + + + + + - 95 - + + +Sortable + + + + Pure virtual function to be defined by derived classes + to return their object ID string. + + printOn virtual void printOn( ostream& outputStream ) const = + 0; + + operator << is a Pure virtual function to be defined in derived classes + friend of Object. to output the object on the given stream. printOn is + See page 87. for internal use by the overloaded operator <<. + + + Related functions ======================================================= + + The following overloaded operators are related to + Sortable but are not member functions: + + operator < int operator <( const Sortable& test1, const Sortable& + test2 ); + + Returns 1 if the two objects are of the same type X, + and test1 is "less than" test2 (as defined by + X::isLessThan). Otherwise returns 0. + + See also: Sortable::isLessThan, Sortable::isA + + operator <= int operator <=( const Sortable& test1, const Sortable& + test2 ); + + As for operator <, but also tests true for equality. + + operator > int operator >( const Sortable& test1, const Sortable& + test2 ); + + Returns 1 if the two objects are of the same type X, + and test1 is not "less than" and not "equal" to test2 + (as defined by X::isLessThan and X::isEqual). Otherwise + returns 0. + + operator >= int operator >=( const Sortable& test1, const Sortable& + test2 ); + + As for operator >, but also tests true for equality. + Note that >= returns !( test1<( test2) ), so it returns + 1 if test1 and test2 are of different types. + + + + + + + + - 96 - + + + SortedArray + + + +=========================================================================== +SortedArray sortarry.h +=========================================================================== + + ÚÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÉÍÍÍÍÍÍÍÍÍÍÍÍ» + ³AbstractArrayÃÄĶSortedArray º + ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÈÍÍÍÍÍÍÍÍÍÍÍͼ + + The instance class SortedArray, derived from + AbstractArray, defines an array that maintains its + elements in ascending order (according to the ordering + defined for the elements). That is, the element at + index n is less than or equal to the element at index n + + 1. Note that the operator <=, used when adding new + elements to the array, must be defined for comparing + any objects in the array. This will be the case for + objects ultimately derived from Sortable (see the + Related Functions section of the Sortable class + reference) as well as for the standard C integral + types. + + Array and SortedArray are identical in many areas (they + have the same base, AbstractArray). One difference is + that SortedArray::detach "squeezes" the array to + maintain ascending order, while Array::detach leaves + "holes" in the array. + + + +=========================================================================== +Stack stack.h +=========================================================================== + + ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÉÍÍÍÍÍÍÍÍÍÍÍÍ» + ³ Container ÃÄĶ Stack º + ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ ÈÍÍÍÍÍÍÍÍÍÍÍͼ + + + The instance class Stack, derived from Container, is + one of the sequence classes like Queue and Deque. A + stack is a LIFO (last-in-first-out) linear list for + which all insertions (pushes) and removals (pops) take + place at one end (the top or head) of the list (see D. + E Knuth's The Art of Computer Programming, Volume 1, + 2.2). In addition to the traditional pop and push + member functions, Stack provides top, a member function + for examining the object at the top of the stack + without affecting the stack's contents. top must be + + + + - 97 - + + +Stack + + + + used with care since it returns a reference to an + object that may be owned by the stack. Destroying the + object returned by top can disrupt the internal + mechanism for storing the stack. The correct way to + dispose of the top element is to use pop followed by + delete. Stack is implemented internally as a List via a + private data member theStack of type List. + + See also: Stacks templates and classes + + + Example ======================================================= + + Source #include + #include + #include + + main() + { + Stack s; + String *s1 = new String("a string"); + String *s2 = new String("another string"); + Association *a1 = new Association(*s1,*s2); + + s.push(*s1); + s.push(*s2); + s.push(*a1); + + // Print the Stack + cout << "As a Container:\n" << s << endl; + + // Empty the stack to cout + cout << "As a Stack:\n"; + while (!s.isEmpty()) + { + Object& obj = s.pop(); + cout << obj << endl; + delete &obj; + } + } + + Output As a Container: + Stack { Association { a string, another string } + , + another string, + a string } + + As a Stack: + + + + - 98 - + + + Stack + + + + Association { a string, another string } + + another string + a string + + + Member functions ======================================================= + + + flush virtual void flush( DeleteType dt = DefDelete ); + + Flushes (empties) the stack. The fate of the removed + objects depends on the argument dt. See TShouldDelete + for details. + +getItemsInContainer virtual countType getItemsInContainer() const; + + Returns the number of items in the stack. + + initIterator virtual ContainerIterator& initIterator() const; + + Creates and returns a stack iterator for the stack. + + See also: ContainerIterator class + + isA virtual classType isA() const; + + Returns stackClass, the Stack type ID. + + isEmpty virtual int isEmpty() const; + + Returns 1 if the stack is empty, otherwise returns 0. + + nameOf virtual char *nameOf() const; + + Returns "Stack", the Stack type ID string. + + pop Object& pop(); + + Removes the object from the top of the stack and + returns the object. The fate of the popped object is + determined by ownership as explained in TShouldDelete. + + push void push( Object& toPush ); + + Adds (pushes) the object toPush to the top of the + stack. + + + + + - 99 - + + +Stack + + + + top Object& top(); + + Returns but does not remove the object at the top of + the stack. + + + +=========================================================================== +String strng.h +=========================================================================== + + ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÉÍÍÍÍÍÍÍÍÍÍÍÍ» + ³ Sortable ÃÄĶ String º + ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ ÈÍÍÍÍÍÍÍÍÍÍÍͼ + + String is an instance class, derived from Sortable, to + implement null-terminated, character strings. String + objects are ordered in the usual lexicographic way + using strcmp from the standard C string.h. Note that + the String class include file is spelled strng.h. See + Sortable for a discussion on ordered classes. + + + Member functions ======================================================= + + + constructor String( const char *aPtr = "" ); + + Constructs a String object from the given C string. + + constructor String(const String& sourceString ); + + Copy constructor. + + hashValue virtual hashValueType hashValue() const; + + Returns the hash value of this string. See + HashTable::hashValue for more details. + + isA virtual classType isA() const; + + Returns stringClass, the Stack type ID. + + isEqual virtual int isEqual( const Object& testString ) const; + + Returns 1 if the calling string is equal to testString, + otherwise returns 0. You can also use the overloaded + + + + + - 100 - + + + String + + + + operators == and != as explained in the Related + functions section of the Object class. + + isLessThan virtual int isLessThan( const Object& testString ) + const; + + Returns 1 if the calling string lexically precedes + testString, otherwise returns 0. You can also use the + overloaded operators <, <=, >, and >=, as explained in + the Related functions section of the Storable class. + + + nameOf virtual char *nameOf() const; + + Returns the Stack type ID string. + + printOn virtual void printOn( ostream& outputString ) const; + + operator << is a Prints this string on the given stream. printOn is + friend of Object. really for internal use by the overloaded operator <<. + See page 87. + operator = String& operator =( const String& sourceString ); + + Overloads the assignment operator for string objects. + + operator char * operator const char *() const; + + Returns a pointer to this string. + + + Example ======================================================= + + Source // File TSTRNG.CPP: Test the String class + + #include + + void identify(String&); + + main() + { + char s1[21], s2[21]; + + cout << "Enter a string: "; // Read a + string + cin >> s1; + String str1(s1); + identify(str1); + + + + + - 101 - + + +String + + + + cout << "Enter another string: "; // Read + another + cin >> s2; + String str2(s2); + identify(str2); + + // Do some relational tests: + cout << "Equal: " << str1.isEqual(str2) << endl + << "Less than: " << str1.isLessThan(str2) << + endl; + + // String assignment: + str2 = str1; + cout << "After assignment:\n" << "Equal: " + << str1.isEqual(str2); + } + + void identify(String& str) + { + // Echo a String's value and type + cout << "Value: " << str + << ", Object type: " << str.nameOf() << endl + << endl; + } + + Output Enter a string: hello + Value: hello, Object type: String + + Enter another string: goodbye + Value: goodbye, Object type: String + + Equal: 0 + Less than: 0 + After assignment: + Equal: 1 + + + +=========================================================================== +Time ltime.h +=========================================================================== + + ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÉÍÍÍÍÍÍÍÍÍÍÍÍ» + ³ BaseTime ÃÄĶ Time º + ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ ÈÍÍÍÍÍÍÍÍÍÍÍͼ + + Time is a sortable instance class derived from + BaseTime. Time adds a printOn member. You can override + + + + - 102 - + + + Time + + + + this in derived classes to cope with international + formatting variations. + + + Member functions ======================================================= + + + constructor Time(); + + Calls the BaseTime constructor to create a Time object + with the current time. + + See also: BaseTime constructor + + constructor Time( const Time& T ); + + Copy constructor. + + constructor Time( unsigned char H, unsigned char M = 0, unsigned + char S = 0, unsigned char D = 0 ); + + Creates a Time object with the given hour, minutes, + seconds, and hundredths of seconds. + + isA virtual classType isA() const; + + Returns timeClass, the Time class ID. + + nameOf virtual char *nameOf() const; + + Returns "Time", the Time class ID string. + + printOn virtual void printOn( ostream& outputStream ) const; + + operator << is a Sends a formatted Time object to the given output + friend of Object. stream. The default format is hh:mm:ss:dd a/pm with + See page 87. nonmilitary hours. printOn is for internal use by the + overloaded operator <<. + + + + + + + + + + + + + + - 103 - + + +Timer + + + +=========================================================================== +Timer timer.h +=========================================================================== + + ÉÍÍÍÍÍÍÍÍÍÍÍÍ» + º Timer Ç + ÈÍÍÍÍÍÍÍÍÍÍÍͼ + + Timer is an instance class implementing a stop watch. + You can use Timer objects to time program execution by + calling the member functions start and stop within your + program, and then using time to return the elapsed + time. The reset member function resets the elapsed time + to zero. Successive starts and stops will accumulate + elapsed time until a reset. + + + Member functions ======================================================= + + + constructor Timer(); + + Creates a Timer object. + + reset void reset(); + + Clears the elapsed time accumulated from previous + start/stop sequences. + + resolution static double resolution(); + + Determines the timer resolution for all timer objects. + This value is hardware and OS dependent. For example: + + if( elapsedTime < timer.resolution() ) + cout << "Measured time not meaningful." << endl; + + start void start(); + + Ignored if the timer is running, otherwise starts the + timer. The elapsed times from any previous start/stop + sequences are accumulated until reset is called. + + status int status(); + + Returns 1 if the timer is running, otherwise 0. + + stop void stop(); + + + + - 104 - + + + Timer + + + + Stops the timer. The accumulated elapsed time is + preserved until a reset call. + + time double time(); + + Returns the elapsed time. The precision is given by the + value returned by the member function resolution. + + + +=========================================================================== +TShouldDelete shddel.h +=========================================================================== + +Figure 3: Class hierarchies in CLASSLIB + + + TShouldDeleteÄÄÄÄÄÄÄÂÄÄAssociation + ÀÄÄContainer + + TShouldDelete maintains the ownership state of a + container. The fate of objects that are removed from a + container can be made to depend on whether the + container owns its elements or not. Similarly, when a + container is destroyed, ownership can dictate the fate + of contained objects that are still in scope. As a + virtual base class for Container and Association, + TShouldDelete provides ownership control for all + containers and associations. The member function + ownsElements can be used either to report or to change + the ownership status of a container. delObj is used to + determine if objects in containers or associations + should be deleted or not. + + + Member functions ======================================================= + + + constructor TShouldDelete( DeleteType dt = Delete ); + + Creates a TShouldDelete object. By default, containers + and associations own their elements. DeleteType is an + enumeration declared within the class as follows: + + enum DeleteType { NoDelete, DefDelete, Delete }; + + ownsElements int ownsElements(); + void ownsElements( int del ); + + + + - 105 - + + +TShouldDelete + + + + The first form returns 1 if the container owns its + elements, otherwise it returns 0. The second form + changes the ownership status as follows: if del is 0, + ownership is turned off; otherwise ownership is turned + on. + + delObj int delObj( DeleteType dt ); + + Tests the state of ownership and returns 1 if the + contained objects should be deleted or 0 if the + contained elements should not be deleted. The factors + determining this are (i) the current ownership state + and (ii) the value of dt, as shown in the following + table. + delObj returns 1 if (dt is Delete) or (dt is DefDelete + and the container currently owns its elements). Thus a + dt of NoDelete returns 0 (don't delete) regardless of + ownership; a dt of Delete return 1 (do delete) + regardless of ownership; and a dt of DefDelete returns + 1 (do delete) if the elements are owned, but a 0 (don't + delete) if the objects are not owned. + + + ------------------------------------------------------- + delObj + ownsElements no yes + ------------------------------------------------------- + + NoDelete no no + DefDelete no yes + Delete yes yes + + ------------------------------------------------------- + + + + + + + + + + + + + + + + + + + - 106 - + + + + + + +INDEX +___________________________________________________________________________ + + + + + +A B +abbreviations Bag class 47 + CLASSLIB names and 19 BaseDate class 49 +abstract classes 4 BaseTime class 51 +abstract data types BI_ prefix + BIDS class names 19 class names 19 + class library and 13 BIDS template library 13 +AbstractArray class 37 Borland International Data +add Structures (BIDS) 13 + Array member function 42 Btree class 53 + Bag member function 47 BtreeIterator class 55 + Btree member function 53 + Collection member function 58 + Dictionary member function 69 C + DoubleList member function 71 C prefix + HashTable member function 76 class names 19 + List member function 79 CHECK macro 35 + Sets member function 92 class templates 17 +addAt classes + Array member function 42 abstract vs instance 4 +addAtHead arrays + DoubleList member function 71 sorted 97 +addAtTail collections 12 + DoubleList member function 71 date and time 65, 102 +ADT debugging modes 35 + header files 22 hierarchies 4 +ADT (abstract data types) 13 object-based 6 +Array class 41 traversing 43 +ArrayInterator lists 70 + AbstractArray friend 40 priority queues 88 +ArrayIterator class 43 queue 90 +arrays queues + classes for 37, 41 double-ended 66 + classes for sorted 97 sequence 12, 66, 90, 97 +arraySize rules for 12 + AbstractArray member function 38 sortable objects 93 +ascending sort 97 stack 97 +assertion macros 35 string 100 +Association class 7, 44 CLASSLIB naming conventions 19 + example program 34 Collection class 12, 57 + + + + +Index 107 + + + + + + +collections reference section 36 + ordered 13 container classes 6, 8, 59 + random access to 37 functions of 59 + unordered 13 container hierarchy + Bag class 47 object-based 4 + Dictionary class 69 ContainerIterator class 64 + DoubleList class 70 containers and 64 + HashTable class 75 hierarchy 11 + List class 79 containers + Set class 92 basics 4 +condFuncType definition 84 ContainerIterator class and 64 +constructors direct 19 + AbstractArray member function 38 elements of 59 + Array member function 42 equality testing 60 + ArrayIterator member function 43 flushing 10, 59 + Association member function 44 implementation 14 + Bag member function 47 indirect 19 + Basedate member function 49 current + Basetime member function 51 ArrayIterator member function 43 + Btree member function 53 BtreeIterator member function 56 + BtreeIterator member function 56 ContainerIterator member function + Collection member function 58 64 + Container member function 60 DoubleListIterator member + Date member function 65 function 73 + Dictionary member function 70 HashTableIterator member function + DoubleList member function 71 78 + DoubleListIterator member ListIterator member function 81 + function 73 + HashTable member function 76 + HashTableIterator member function D + 78 Date class 65 + List member function 79 dates + ListIterator member function 81 class 65 + Object member function 84 Day + Sets member function 93 Basedate member function 49 + String member function 100 __DEBUG macro 35 + Time member function 103 decrNofKeys + Timer member function 104 Btree member function 53 + TShouldDelete member function 105 delete +container class library Error member function 75 + directories 31 delObj + examples 34 TShouldDelete member function 106 + INCLUDE 32 delta + lib 34 AbstractArray data member 37 + source 32 Deque class 66 + example programs 34 destroy + memory models and 32 AbstractArray member function 38 + project files and 32 Collection member function 58 + + + + - 108 - + + + + + + +destroyFromHead HashTable member function 77 + DoubleList member function 71 firstThat +destroyFromTail Bag member function 47 + DoubleList member function 71 Container member function 60 +detach Object member function 84 + AbstractArray member function 38 flush + Bag member function 47 Bag member function 47 + Btree member function 53 Btree member function 54 + Collection member function 58 Container member function 61 + DoubleList member function 71 Deque member function 68 + HashTable member function 76 DoubleList member function 72 + List member function 79 HashTable member function 77 + SortedArray member function 97 List member function 80 +detachFromHead PriorityQueue member function 89 + DoubleList member function 71 Stacks member function 99 +detachFromTail forEach + DoubleList member function 71 Bag member function 48 +detachLeft Container member function 61 + PriorityQueue member function 89 Object member function 85 +Dictionary class 69 free + example program 34 MemBlocks member function 83 +direct and indirect data structures fundamental data structure + 14 class templates 17 +directories fundamental data structures + container class library 31 class library and 13 +DIRECTRY (container class library Object-based classes 20 + example program) 34 +DoubleList class 70 +DoubleListIterator class 73 G + get + PriorityQueue member function 89 +E Queue member function 92 +elements getItemsInContainer + ordering definition 19 Bag member function 48 +Error class 7, 74 Container member function 61 +examples directory Deques member function 68 + container class library 34 PriorityQueue member function 89 + Stacks member function 99 + getLeft +F Deque member function 68 +FDS getRight + header files 22 Deque member function 68 +FDS (fundamental data structures) + 13 +findmember H + Bag member function 47 hash table + Btree member function 54 iterators 78 + Collection member function 58 HashTable class 75 + + + +Index 109 + + + + + + +HashTableIterator class 78 instance classes 4 +hashValue isA + Association member function 44 Array member function 43 + Basedate member function 49 Association member function 44 + Basetime member function 51 Bag member function 48 + Btree member function 54 Basedate member function 50 + Container member function 61 Basetime member function 52 + HashTable member function 77 Btree member function 54 + List member function 80 Container member function 62 + Object member function 85 Date member function 66 + PriorityQueue member function 89 Deque member function 68 + Sortable member function 95 Dictionary member function 70 + String member function 100 DoubleList member function 72 +hasMember Error member function 75 + Bag member function 48 HashTable member function 78 + Btree member function 54 List member function 80 + Collection member function 59 Object member function 85 + PriorityQueue member function 89 PriorityQueue member function 89 +hour Queue member function 92 + Basetime member function 51 Set member function 93 +hundredths Sortable member function 95 + Basetime member function 51 Stack member function 99 + String member function 100 + Time member function 103 +I isAssociation +i_add Association member function 44 + Btree member function 54 Object member function 85 +I prefix isEmpty + class names 19 Bag member function 48 +Imp suffix Container member function 62 + class names 19 Deques member function 68 +INCLUDE directory PriorityQueue member function 90 + container class library 32 Stack member function 99 +incrNofKeys isEqual + Btree member function 54 AbstractArray member function 39 +initIterator Association member function 45 + AbstractArray member function 39 Basedate member function 50 + Bag member function 48 Basetime member function 52 + Btree member function 54 Btree member function 54 + Container member function 61 Container member function 62 + Deque member function 68 Error member function 75 + DoubleList member function 72 Object member function 86 + HashTable member function 77 Sortable member function 95 + List member function 80 String member function 100 + PriorityQueue member function 89 isLessThan + Stacks member function 99 Basedate member function 50 +InnerNode Basetime member function 52 + Btree friend class 53 Sortable member function 95 + + + + - 110 - + + + + + + + String member function 101 M +isSortable member functions + Object member function 86 virtual + Sortable member function 95 pure 4 +Item MemBlocks class 82 + Btree friend class 53 memory models +itemsInContainer container class library and 32 + Container data member 60 MemStack class 83 +iterators minute + DoubleList 73 Basetime member function 52 + internal and external 11 Month +iterFuncType definition 61 Basedate member function 50 + + +K N +key nameOf + Association class 44 Arrays member function 43 + Association member function 45 Association member function 45 + Bag member function 49 + Basedate member function 50 +L Basetime member function 52 +Last-In-First-Out (LIFO) 14 Btree member function 54 +lastElementIndex Container member function 62 + AbstractArray data member 37 Date member function 66 +lastThat Deque member function 68 + Bag member function 48 Dictionary member function 70 + Container member function 62 DoubleList member function 72 + Object member function 86 Error member function 75 +LeafNode HashTable member function 78 + Btree friend class 53 List member function 80 +lib directory Object member function 86 + container class library 34 PriorityQueue member function 90 +List class 79 Set member function 93 + iterators 81 Sortable member function 95 +ListElement class 79 Stacks member function 99 +ListIterator class 81 String member function 101 +lists Time member function 103 + classes for 70 new + linked Object member function 86 + traversing 81 Node +lookup Btree friend 55 + Dictionary member function 70 Btree friend class 53 +LOOKUP (container class library non-container classes 6 + example program) 34 +lowerBound + AbstractArray member function 39 O +lowerbound O prefix 21 + AbstractArray data member 37 class names 19 + + + +Index 111 + + + + + + +Object class 4, 84 operator char * +Object container class library String member function 101 + version 3.0 changes to 1 operator int +objectAt ArrayIterator member function 43 + AbstractArray member function 39 BtreeIterator member function 56 +objects ContainerIterator member function + automatic 11 64 + detaching 10 DoubleListIterator member + heap 11 function 74 + in containers HashTableIterator member function + counting 59 78 + displaying 60 ListIterator member function 81 + iterating 60 order + ownership 59 Btree member function 55 + ownership 9 ordered collections 7, 13 + sortable 93 ownsElements 9 +operator < Bag member function 49 + overloaded 96 TShouldDelete member function 105 +operator = + String member function 101 +operator > P + overloaded 96 peekAtHead +operator != DoubleList member function 72 + overloaded 88 peekAtTail +operator ++ DoubleList member function 72 + ArrayIterator member function 43 peekHead + BtreeIterator member function 56 List member function 80 + ContainerIterator member function peekLeft + 64 Deque member function 69 + DoubleListIterator member PriorityQueue member function 90 + function 73 peekRight + HashTableIterator member function Deque member function 69 + 79 pop + ListIterator member function 81 Stacks member function 99 +operator << PRECONDITION macro 35 + Object friends 87 printContentsOn +operator <= AbstractArray member function 39 + overloaded 96 printHeader +operator == Container member function 62 + overloaded 87 printOn +operator >= Association member function 45 + overloaded 96 Basedate member function 50 +operator [] Basetime member function 52 + AbstractArray member function 39 Btree member function 55 + Btree member function 55 Container member function 62 +operator - - Date member function 66 + DoubleListIterator member Error member function 75 + function 73 Object member function 87 + + + + - 112 - + + + + + + + Sortable member function 96 restart + String member function 101 ArrayIterator member function 44 + Time member function 103 BtreeIterator member function 56 +printSeparator ContainerIterator member function + Container member function 63 65 +printTrailer DoubleListIterator member + Container member function 63 function 74 +priority queues 88 HashTableIterator member function +PriorityQueue class 88 79 +project files ListIterator member function 81 + container class libraries and 32 REVERSE (container class library +ptrAt example program) 34 + AbstractArray member function 40 +ptrToRef + Object member function 87 S +push S prefix + Stacks member function 99 class names 19 +put second + PriorityQueue member function 90 Basetime member function 52 + Queue member function 92 Set class 92 +putLeft setData + Deque member function 69 AbstractArray member function 40 +putRight SetDay + Deque member function 69 Basedate member function 50 + setHour + Basetime member function 52 +Q setHundredths +Queue class 90 Basetime member function 52 + example program 34 setMinute +queues 90 Basetime member function 52 + double-ended 66 SetMonth +QUEUETST (container class library Basedate member function 50 + example program) 34 setSecond + Basetime member function 52 + SetYear +R Basedate member function 50 +rank Sortable class 7, 93 + Btree member function 55 ordered collections 13 +reallocate SortedArray class 97 + AbstractArray member function 40 example program 34 + MemBlocks member function 83 sorts +removeEntry ascending 97 + AbstractArray member function 40 source directory +reset container class library 32 + Timer member function 104 squeezeEntry +resolution AbstractArray member function 40 + Timer member function 104 Stack class 97 + example program 34 + + + +Index 113 + + + + + + +start top + Timer member function 104 Stacks member function 99 +status TShouldDelete class 105 + Timer member function 104 +stdtempl.h 22 +stop U + Timer member function 104 unordered collections 13 +String class 100 Bag class 47 + example program 34 Dictionary class 69 +strings DoubleList class 70 + classes for 100 HashTable class 75 +STRNGMAX (container class library List class 79 + example program) 34 Set class 92 + upperBound + AbstractArray member function 40 +T upperbound +TC prefix 21 AbstractArray data member 38 + class names 19 +template-based container library 13 +TEMPLATES V + conditional compilation 32 value +Templates Association class 44 + Arrays example 30 Association member function 45 + Deques example 30 +templates + approach to class library 3, 15 Y + container classes and 14 Year + instantiating 19 Basedate member function 50 +time + Timer member function 105 +Time class 102 Z + example program 34 ZERO +Timer class 104 Object data member 84 + + + + + + + + + + + + + + + + + + + - 114 - + diff --git a/M/TC/DOC/CMACROS.TEM b/M/TC/DOC/CMACROS.TEM new file mode 100644 index 0000000..1e31e3e --- /dev/null +++ b/M/TC/DOC/CMACROS.TEM @@ -0,0 +1,178 @@ +/****************************************************************** +This file contains a TEML script that is helpful to C and C++ +programmers. To use the macros in this file run TEMC to compile +it and add it to the appropriate tcconfig.tc file. The syntax for +this is: + +TEMC cmacros.tem tcconfig.tc + +This will add the macros and key definitions in cmacros.tem to what +already exists in tcconfig.tc. + +For more information on TEMC, please refer to the file UTIL.DOC. + +******************************************************************/ + +/****************************************************************** + +Macro: Sample macro to comment a function + +Use: Put the cursor immediately after a function name which is + at the left of the screen, then press Alt-T. Do not include + the return type or parameters before using this macro. + +******************************************************************/ + +macro MakeFuncText + InsertText("\n\n"); /* add white space */ + CursorUp; + CursorUp; + LeftOfLine; /* go before beginning of intended + function name */ + SetBlockBeg; /* mark function name */ + WordRight; + SetBlockEnd; + LeftOfLine; + CursorDown; + CopyBlock; /* copy for prototyping */ + CursorUp; + LeftOfLine; + InsertText("\nFunction: "); /* add "Function" to comment area */ + RightOfLine; + CursorUp; /* put in comment lines before and + after */ + LeftOfLine; + InsertText("/*******************************************************"); + CursorDown; + RightOfLine; + InsertText("\n\n"); + LeftOfLine; + InsertText("Description:\n"); + LeftOfLine; + InsertText("*******************************************************/\n"); + CursorDown; /* go back to end of name */ + RightOfLine; +end; /* MakeFuncText */ + +/******************************************************************* + +MACRO: MakeStub + +DESCRIPTION: Creates a stub, based on a user-entered function name. + It assumes the cursor is positioned immediately after the name, + and the name is at the left of the screen. + +*******************************************************************/ + +macro MakeStub + LeftOfLine; /* go before beginning of intended + function name */ + InsertText("void "); /* void return type */ + RightOfLine; + InsertText("( void )\n{\n"); /* void parameter */ + InsertText("printf(\"This is "); + CursorUp; + CursorUp; + LeftofLine; + WordRight; + SetBlockBeg; + WordRight; + CursorLeft; + CursorLeft; + SetBlockEnd; + CursorDown; + CursorDown; + RightofLine; + InsertText(" "); + CopyBlock; + SetBlockBeg; + SetBlockEnd; + RightofLine; + InsertText("\\n\");"); + InsertText("\n}"); +end; + +/******************************************************************* + +MACRO: MakeComment + +DESCRIPTION: Inserts comment bars + +*******************************************************************/ + +macro MakeComment + InsertText("/******************************"); + InsertText("*************************************\n\n"); + InsertText("*******************************"); + InsertText("************************************/\n"); + CursorUp; + CursorUp; +end; + +/******************************************************************* + +MACRO: MakeMain + +DESCRIPTION: Inserts outline of main program + +*******************************************************************/ + +macro MakeMain + InsertText("int main(void)\n{\n\n return 0;\n"); + LeftOfLine; + InsertText("}"); + CursorUp; + CursorUp; + CursorRight; +end; + +/******************************************************************* + +MACRO: MainCppIO + +DESCRIPTION: Inserts outline of main program for C++ which uses + iostream.h. + +*******************************************************************/ + +macro MainCppIO + InsertText("#include \n\n"); + InsertText("int main(void)\n{\n\n return 0;\n"); + LeftOfLine; + InsertText("}"); + CursorUp; + CursorUp; + CursorRight; +end; + +/******************************************************************* + +MACRO: MainCIO + +DESCRIPTION: Inserts outline of main program for C which uses + stdio.h + +*******************************************************************/ + +macro MainCIO + InsertText("#include \n\n"); + InsertText("int main(void)\n{\n\n return 0;\n"); + LeftOfLine; + InsertText("}"); + CursorUp; + CursorUp; + CursorRight; +end; + +/******************************************************************* + +KEYBOARD ASSIGNMENTS: + +*******************************************************************/ + +Alt-K : MakeComment; +Alt-M : MakeMain; +Alt-N : MainCPPIO; +Alt-I : MainCIO; +Alt-Z : MakeStub; +Alt-T : MakeFuncText; diff --git a/M/TC/DOC/DEFAULTS.TEM b/M/TC/DOC/DEFAULTS.TEM new file mode 100644 index 0000000..d73f135 --- /dev/null +++ b/M/TC/DOC/DEFAULTS.TEM @@ -0,0 +1,363 @@ +/* macro definitions for anything which isn't an editor primitive */ + +MACRO MacScrollUp + ScrollScreenUp;FixCursorPos; +END; + +MACRO MacScrollDown + ScrollScreenDown;FixCursorPos; +END; + +MACRO MacPageUp + SetPrevPos;FixScreenPos;PageScreenUp;FixCursorPos; +END; + +MACRO MacPageDown + SetPrevPos;FixScreenPos;PageScreenDown;FixCursorPos; +END; + +MACRO MacWordLeft + SetPrevPos;WordLeft; +END; + +MACRO MacWordRight + SetPrevPos;WordRight; +END; + +MACRO MacDeleteLine + DeleteLine;LeftOfLine; +END; + +MACRO MacLeftOfLine + SetPrevPos;LeftOfLine; +END; + +MACRO MacRightOfLine + SetPrevPos;RightOfLine; +END; + +MACRO MacTopOfScreen + SetPrevPos;TopOfScreen; +END; + +MACRO MacBottomOfScreen + SetPrevPos;BottomOfScreen; +END; + +MACRO MacHomeCursor + SetPrevPos;HomeCursor; +END; + +MACRO MacEndCursor + SetPrevPos;EndCursor; +END; + +MACRO MacOpenLine + SetPrevPos;RightOfLine;LiteralChar(13); +END; + +MACRO MacInsertStar + LiteralChar('*'); +END; + +MACRO MacInsertMinus + LiteralChar('-'); +END; + +MACRO MacInsertPlus + LiteralChar('+'); +END; + +MACRO MacMarkCursorSwitchedRight + ExtendBlockBeg;CursorSwitchedRight;ExtendBlockEnd;HighlightBlock; +END; + +MACRO MacMarkCursorSwitchedLeft + ExtendBlockBeg;CursorSwitchedLeft;ExtendBlockEnd;HighlightBlock; +END; + +MACRO MacMarkCursorUp + ExtendBlockBeg;CursorUp;ExtendBlockEnd;HighlightBlock; +END; + +MACRO MacMarkCursorDown + ExtendBlockBeg;CursorDown;ExtendBlockEnd;HighlightBlock; +END; + +MACRO MacMarkPageUp + ExtendBlockBeg;PageScreenUp;FixCursorPos;ExtendBlockEnd;HighlightBlock; +END; + +MACRO MacMarkPageDown + ExtendBlockBeg;PageScreenDown;FixCursorPos;ExtendBlockEnd;HighlightBlock; +END; + +MACRO MacMarkWordLeft + ExtendBlockBeg;WordLeft;ExtendBlockEnd;HighlightBlock; +END; + +MACRO MacMarkWordRight + ExtendBlockBeg;WordRight;ExtendBlockEnd;HighlightBlock; +END; + +MACRO MacMarkLeftOfLine + ExtendBlockBeg;LeftOfLine;ExtendBlockEnd;HighlightBlock; +END; + +MACRO MacMarkRightOfLine + ExtendBlockBeg;RightOfLine;ExtendBlockEnd;HighlightBlock; +END; + +MACRO MacMarkTopOfScreen + ExtendBlockBeg;TopOfScreen;ExtendBlockEnd;HighlightBlock; +END; + +MACRO MacMarkBottomOfScreen + ExtendBlockBeg;BottomOfScreen;ExtendBlockEnd;HighlightBlock; +END; + +MACRO MacMarkHomeCursor + ExtendBlockBeg;HomeCursor;ExtendBlockEnd;HighlightBlock; +END; + +MACRO MacMarkEndCursor + ExtendBlockBeg;EndCursor;ExtendBlockEnd;HighlightBlock; +END; + +MACRO MacSetBlockBeg + HideBlock;SetBlockBeg;HighlightBlock; +END; + +MACRO MacSetBlockEnd + HideBlock;SetBlockEnd;HighlightBlock; +END; + +MACRO MacMarkLine + HideBlock;SetTempPos;RightOfLine; + CursorCharRight;SetBlockEnd; + CursorCharLeft;LeftOfLine;SetBlockBeg; + HighlightBlock;MoveToTempPos; +END; + +MACRO MacMarkWord + HideBlock;SetTempPos;CursorRight;WordLeft; + RightOfWord;SetBlockEnd;WordLeft; + SetBlockBeg;HighlightBlock;MoveToTempPos; + +END; + +MACRO MacMoveToBlockBeg + SetPrevPos;MoveToBlockBeg;CenterFixScreenPos; +END; + +MACRO MacMoveToBlockEnd + SetPrevPos;MoveToBlockEnd;CenterFixScreenPos; +END; + +MACRO MacMoveToPrevPos + SwapPrevPos;CenterFixScreenPos; +END; + +MACRO MacCopyBlock + CopyBlock;HighlightBlock;CenterFixScreenPos; + +END; + +MACRO MacMoveBlock + MoveBlock;HighlightBlock;CenterFixScreenPos; + +END; + +MACRO MacDeleteBlock + DeleteBlock;CenterFixScreenPos;HideBlock; +END; + + +MACRO MacBreakLine + LiteralChar(13);CursorCharLeft; +END; + + +MACRO MacGoto0 + SetPrevPos;MoveToMark(0); CenterFixScreenPos; +END; + +MACRO MacGoto1 + SetPrevPos;MoveToMark(1); CenterFixScreenPos; +END; + +MACRO MacGoto2 + SetPrevPos;MoveToMark(2); CenterFixScreenPos; +END; + +MACRO MacGoto3 + SetPrevPos;MoveToMark(3); CenterFixScreenPos; +END; + +MACRO MacGoto4 + SetPrevPos;MoveToMark(4); CenterFixScreenPos; +END; + +MACRO MacGoto5 + SetPrevPos;MoveToMark(5); CenterFixScreenPos; +END; + +MACRO MacGoto6 + SetPrevPos;MoveToMark(6); CenterFixScreenPos; +END; + +MACRO MacGoto7 + SetPrevPos;MoveToMark(7); CenterFixScreenPos; +END; + +MACRO MacGoto8 + SetPrevPos;MoveToMark(8); CenterFixScreenPos; +END; + +MACRO MacGoto9 + SetPrevPos;MoveToMark(9); CenterFixScreenPos; +END; + +MACRO MacMatchPairForward + SetPrevPos;MatchPairForward; +END; + +MACRO MacMatchPairBackward + SetPrevPos;MatchPairBackward; +END; + +MACRO MacGetFindString + SetPrevPos;GetFindString; +END; + +MACRO MacRepeatSearch + SetPrevPos;RepeatSearch; +END; + +MACRO MacReplace + SetPrevPos;Replace; +END; + +/**** key bindings ******/ +Esc : NullCmd; +ctrl-A : MacWordLeft; +ctrl-C : MacPageDown; +ctrl-D : CursorSwitchedRight; +ctrl-E : CursorUp; +ctrl-F : MacWordRight; +ctrl-G : DeleteChar; +ctrl-H : BackspaceDelete; +ctrl-I : SmartTab; +ctrl-L : MacRepeatSearch; +ctrl-N : MacBreakLine; +ctrl-P : LiteralChar; +ctrl-R : MacPageUp; +ctrl-S : CursorSwitchedLeft; +ctrl-T : DeleteWord; +ctrl-V : ToggleInsert; +ctrl-W : MacScrollDown; +ctrl-X : CursorDown; +ctrl-Y : MacDeleteLine; +ctrl-Z : MacScrollUp; + +/* ---- Function and special keys */ + +/* the following three keys refer to the ones on the numeric keypad */ +star: MacInsertStar; +minus: MacInsertMinus; +plus: MacInsertPlus; + +bksp : BackspaceDelete; +lfar : CursorSwitchedLeft; +rgar : CursorSwitchedRight; +upar : CursorUp; +dnar : CursorDown; +pgup : MacPageUp; +pgdn : MacPageDown; +end : MacRightOfLine; +home : MacLeftOfLine; +ins : ToggleInsert; +del : DeleteChar; +ctrl-lfar : WordLeft; +ctrl-rgar : WordRight; +ctrl-end : MacBottomOfScreen; +ctrl-home : MacTopOfScreen; +ctrl-pgdn : MacEndCursor; +ctrl-pgup : MacHomeCursor; +shift-tab : BackSpaceDelete; +tab : SmartTab; + +shift-lfar : MacMarkCursorSwitchedLeft; +shift-rgar : MacMarkCursorSwitchedRight; +shift-upar : MacMarkCursorUp; +shift-dnar : MacMarkCursorDown; +shift-pgup : MacMarkPageUp; +shift-pgdn : MacMarkPageDown; +shift-end : MacMarkRightOfLine; +shift-home : MacMarkLeftOfLine; + + +/* ---- Control K sequences ------------------ */ + +ctrl-K+^B : MacSetBlockBeg; +ctrl-K+^C : MacCopyBlock; +ctrl-K+^D : Menu; +ctrl-K+^H : ToggleHideBlock; +ctrl-K+^I : IndentBlock; +ctrl-K+^K : MacSetBlockEnd; +ctrl-K+^L : MacMarkLine; +ctrl-K+^P : PrintBlock; +ctrl-K+^R : ReadBlock; +ctrl-K+^S : SaveFile; +ctrl-K+^T : MacMarkWord; +ctrl-K+^U : OutdentBlock; +ctrl-K+^V : MacMoveBlock; +ctrl-K+^W : WriteBlock; +ctrl-K+^Y : MacDeleteBlock; +ctrl-K+0 : SetMark(0); +ctrl-K+1 : SetMark(1); +ctrl-K+2 : SetMark(2); +ctrl-K+3 : SetMark(3); +ctrl-K+4 : SetMark(4); +ctrl-K+5 : SetMark(5); +ctrl-K+6 : SetMark(6); +ctrl-K+7 : SetMark(7); +ctrl-K+8 : SetMark(8); +ctrl-K+9 : SetMark(9); + +/* ---- Control Q sequences ------------------ */ + +ctrl-Q+^A : MacReplace; +ctrl-Q+^B : MacMoveToBlockBeg; +ctrl-Q+^C : MacEndCursor; +ctrl-Q+^D : RightOfLine; +ctrl-Q+^E : MacTopOfScreen; +ctrl-Q+^F : MacGetFindString; +ctrl-Q+^K : MacMoveToBlockEnd; +ctrl-Q+^P : MacMoveToPrevPos; +ctrl-Q+^R : MacHomeCursor; +ctrl-Q+^S : LeftOfLine; +ctrl-Q+^X : MacBottomOfScreen; +ctrl-Q+^Y : DeleteToEol; +ctrl-Q+0 : MacGoto0; +ctrl-Q+1 : MacGoto1; +ctrl-Q+2 : MacGoto2; +ctrl-Q+3 : MacGoto3; +ctrl-Q+4 : MacGoto4; +ctrl-Q+5 : MacGoto5; +ctrl-Q+6 : MacGoto6; +ctrl-Q+7 : MacGoto7; +ctrl-Q+8 : MacGoto8; +ctrl-Q+9 : MacGoto9; +ctrl-Q+[ : MacMatchPairForward; +ctrl-Q+] : MacMatchPairBackward; + +/* ---- Control O sequences ------------------ */ + +ctrl-O+^F : ToggleOptimalFillMode; +ctrl-O+^I : ToggleAutoIndent; +ctrl-O+^O : MacOpenLine; +ctrl-O+^R : ToggleCursorThroughTabMode; +ctrl-O+^T : ToggleTabbingMode; +ctrl-O+^U : ToggleAutoOutdent; + diff --git a/M/TC/DOC/DOSEDIT.TEM b/M/TC/DOC/DOSEDIT.TEM new file mode 100644 index 0000000..f0485b8 --- /dev/null +++ b/M/TC/DOC/DOSEDIT.TEM @@ -0,0 +1,112 @@ +/*********************************************************************** + + MS-DOS 5.0 Editor emulation for the Borland C++ IDE. + + This file contains a Turbo Editor Macro Language (TEML) +script which emulates the MS-DOS Editor in the Borland C++ IDE. +A complete description of the TEML language and the Turbo +Editor Macro Compiler (TEMC) can be found in the file "UTIL.DOC". + + The TEMC compiler can be invoked from the DOS command line at +follows: + + temc [-c] dosedit.tem + +The optional -c switch can also be specified as /c, and can appear in +any argument position on the command line. If you use this option, +any existing command table in your configuration file is thrown away +before the script file is merged with those already defined. The +configuration file extensions is assumed to be .TC. The configuration +file need not exist. If it does not exist, it is created. +tcconfig.tc is the main configuration file. + +Most of the simple editor commands have been fully implemented. Most +of the complex commands have been either partially implemented or not +implemented at all. Below is a list of the commands that have been +fully or partially implemented. + +IDE Binding MS-DOS Editor Command Comments +----------- --------------------- ------------------------- +Backspace BackspaceDelete +Ctrl-H BackspaceDelete +Del DeleteChar +Ctrl-G DeleteChar +Ctrl-T DeleteWord In DOS editor cursor must + be under first letter +Ins ToggleInsert +Ctrl-V ToggleInsert +Ctrl-LfAr WordLeft +Ctrl-RtAr WordRight +Home LeftOfLine +End RightOfLine +Ctrl-Q+E TopOfScreen +Ctrl-Q+X BottomOfScreen +Ctrl-W CursorUp +Ctrl-Z CursorDown +PgUp MacPageUp +PgDw MacPageUp +Ctrl-Home HomeCursor +Ctrl-Q+R HomeCursor +Ctrl-End EndCursor +Ctrl-Q+C EndCursor + +**************************************************************************/ + +/****** Macros *************************/ + +MACRO MoveToNextLine + CursorDown; + LeftOfLine; +END; + +MACRO MacPageUp + FixScreenPos;PageScreenUp;FixCursorPos; +END; + +MACRO MacPageDown + FixScreenPos;PageScreenDown;FixCursorPos; +END; + +MACRO ScrollLeftOneScreen + CursorLeft(9); +END; + + +/****** DOS EDIT Key Bindings **********/ + +BkSp: BackspaceDelete; +Ctrl-H: BackspaceDelete; + +Del: DeleteChar; +Ctrl-G: DeleteChar; + +Ctrl-T: DeleteWord; + +Ins: ToggleInsert; +Ctrl-V: ToggleInsert; + +Ctrl-LfAr: WordLeft; +Ctrl-RgAr: WordRight; +Home: LeftOfLine; +End: RightOfLine; + +Ctrl-Q+^E: TopOfScreen; +Ctrl-Q+^X: BottomOfScreen; + +Ctrl-W: CursorUp; +Ctrl-Z: CursorDown; + +PgUp: MacPageUp; +PgDn: MacPageDown; + +Ctrl-Home: HomeCursor; +Ctrl-Q+R: HomeCursor; + +Ctrl-End: EndCursor; +Ctrl-Q+C: EndCursor; + +/*Ctrl-UpAr: CursorUp; not implemented--invalid key */ +/*Ctrl-DnAr: CursorDown; not implemented--invalid key */ +/*Ctrl-Enter MoveToNextLine not implemented--invalid key */ + + diff --git a/M/TC/DOC/EPSILON.TEM b/M/TC/DOC/EPSILON.TEM new file mode 100644 index 0000000..ffc100e --- /dev/null +++ b/M/TC/DOC/EPSILON.TEM @@ -0,0 +1,490 @@ +Script EPSILON; + + +/*********************************************************************** + + Epsilon editor emulation for Borland C++ IDE. + + This file contains a Turbo Editor Macro Language (TEML) +script which emulates the Epsilon programmer's editor in the Borland +C++ IDE. A complete description of the TEML language and the Turbo +Editor Macro Compiler (TEMC) can be found in the file "UTIL.DOC". + + The TEMC compiler can be invoked from the DOS command line at +follows: + + temc [-c] epsilon.tem + +The optional -c switch can also be specified as /c, and can appear in +any argument position on the command line. If you use this option, +any existing command table in your configuration file is thrown away +before the script file is merged with those already defined. The +configuration file extensions is assumed to be .TC. The configuration +file need not exist. If it does not exist, it is created. +tcconfig.tc is the main configuration file. + +Most of the simple Epsilon commands have been fully implemented. Most +of the complex command have been either partially implemented or not +implemented at all. The TEML macros names correspond to the names in +the Espilon default macro set. Below is a list of the commands that +have been fully or partially implemented. + +IDE Binding Epsilon Command Comments +----------- --------------- ------------------------- +Ctrl-B backward_character +Ctrl-H backward_delete_character +Alt-B backward_word +Ctrl-A beginning_of_line +Home beginning_of_window +Ctrl-L center_window +Alt-W copy_region +Esc+@w copy_region +Ctrl-D delete_character +Ctrl-N down_line +Tab do_c_indent +Ctrl-E end_of_line +End end_of_window +Ctrl-X+Ctrl-X exchange_point_and_mark +Ctrl-X+Ctrl-C Quit; +Ctrl-X+Ctrl-Z exit_level Leaves editor - Enables Menus +Ctrl-X+Ctrl-F find_file +Ctrl-F forward_character +Alt-F forward_word +Esc+@f forward_word +Ctrl-Home goto_beginning +Esc+< goto_beginning +Ctrl-End goto_end +Esc+> goto_end +Ctrl-X+@i insert_file +Ctrl-K kill_line Uses Block-copy - Allowing yanking +Ctrl-W kill_region +Ctrl-X+0 kill_window +Alt-D kill_word Does not allow for yanking +Esc+d kill_word +Esc+D kill_word +Ctrl-X+@m make +Alt-X named_command +Ctrl-X+Ctrl-N next_error +Ctrl-V next_page +Ctrl-O open_line +Alt-V previous_page +Esc+@v previous_page +Ctrl-Q quoted_insert +Ctrl-X+@r redo +F10 redo +Ctrl-S+Ctrl-S RepeatSearch +Ctrl-X+@u undo +F9 undo +Ctrl-X+Ctrl-S save_file +Alt-Z scroll_down +Esc+@z scroll_down +Ctrl-Z scroll_up +Ctrl-X+Ctrl-M set_mark +Ctrl-S string_search +Ctrl-P up_line +Ctrl-X+@w write_region +Ctrl-Y yank +Alt-Y yank_pop Displays the Clipboard + +********************************************************************/ + +/******************************************************************* + TEML SCRIPTS TO EMULATE EPSILON FROM THE BORLAND C++ IDE + *******************************************************************/ + + +macro backward_character + CursorSwitchedLeft; +end; + + +macro backward_delete_character + BackSpaceDelete; +end; + + +macro backward_word + WordLeft; +end; + + +macro beginning_of_line + LeftOfLine; +end; + + +macro beginning_of_window + TopOfScreen; +end; + + +macro center_window + SetTempPos; + ScrollScreenUp; + CenterFixScreenPos; + ScrollScreenDown; + CenterFixScreenPos; + PageScreenUp; + CenterFixScreenPos; + PageScreenDown; + CenterFixScreenPos; + MoveToTempPos; +end; + + +macro copy_region + HideBlock; + SwapPrevPos; + SetBlockBeg; + SwapPrevPos; + SetBlockEnd; + HighlightBlock; + ClipCopy; +end; + + +macro delete_character + DeleteChar; +end; + + +macro do_c_indent + LiteralChar( 9 ); +end; + + +macro down_line + CursorDown; +end; + + +macro end_of_line + RightOfLine; +end; + + +macro end_of_window + BottomOfScreen; +end; + + +macro exchange_point_and_mark + SwapPrevPos; + CenterFixScreenPos; +end; + + +macro exit_level + Quit; +end; + + +macro find_delimiter + MatchPairForward; +end; + + +macro find_file + OpenFile; +end; + + +macro forward_character + CursorSwitchedRight; +end; + + +macro forward_level + MatchPairForward; +end; + + +macro forward_word + WordRight; +end; + + +macro goto_beginning + HomeCursor; +end; + + +macro goto_end + EndCursor; +end; + + +macro insert_file + SetPrevPos; + HideBlock; + ReadBlock; +end; + + +/* The kill_line Macro does not use the built-in DeleteToEOL TEML macro */ +/* but rather makes a highlighted block out the line, cuts the block into */ +/* the clipboard, thereby allowing 'yank'ing of deleted lines. This method*/ +/* however, requires that delete_character be used when empty lines ( lines*/ +/* containing only a LineFeed character ) are to be deleted... */ +macro kill_line + SetTempPos; + SetBlockBeg; + end_of_line; + SetBlockEnd; + MoveToTempPos; + HighlightBlock; + ClipCut; +end; + + +macro kill_region + SwapPrevPos; + SetBlockBeg; + SwapPrevPos; + SetBlockEnd; + HighlightBlock; + ClipCut; +end; + + +macro kill_window + CloseWindow; +end; + + +macro kill_word + DeleteWord; +end; + + +macro make + MakeProject; +end; + + +macro named_command + Menu; +end; + + +macro next_error + NextError; +end; + + +macro next_page + PageDown; +end; + + +macro next_window + NextWindow; +end; + + +macro open_line + LiteralChar( 13 ); + CursorSwitchedLeft; +end; + + +macro previous_page + PageUp; +end; + + +macro query_replace + Replace; +end; + + +macro quoted_insert + LiteralChar; +end; + + +macro save_file + SaveFile; +end; + + +macro scroll_down + ScrollScreenDown; + FixCursorPos; +end; + + +macro scroll_up + ScrollScreenUp; + FixCursorPos; +end; + + +macro set_mark + HideBlock; + SetPrevPos; +end; + + +macro string_search + SearchMenu; +end; + + +macro up_line + CursorUp; +end; + + +macro write_region + HideBlock; + SwapPrevPos; + SetBlockBeg; + SwapPrevPos; + SetBlockEnd; + HighlightBlock; + WriteBlock; +end; + + +macro yank + HideBlock; + ClipPaste; +end; + + +macro yank_pop + ClipShow; +end; + + + +Ctrl-B :backward_character; + +Ctrl-H :backward_delete_character; + +Alt-B :backward_word; + +Ctrl-A :beginning_of_line; + +Home :beginning_of_window; + +Ctrl-L :center_window; + +Alt-W :copy_region; +Esc+@w :copy_region; + +Ctrl-D :delete_character; + +Ctrl-N :down_line; + +Tab :do_c_indent; + +Ctrl-E :end_of_line; + +End :end_of_window; + +Ctrl-X+Ctrl-X :exchange_point_and_mark; + +Ctrl-X+Ctrl-C :Quit; + +Ctrl-X+Ctrl-Z :exit_level; + +Ctrl-X+Ctrl-F :find_file; + +Ctrl-F :forward_character; + +Alt-F :forward_word; +Esc+@f :forward_word; + +Ctrl-Home :goto_beginning; +Esc+< :goto_beginning; + + +Ctrl-End :goto_end; +Esc+> :goto_end; + + +Ctrl-X+@i :insert_file; + +Ctrl-K :kill_line; + +Ctrl-W :kill_region; + + +Ctrl-X+0 :kill_window; + +Alt-D :kill_word; +Esc+d :kill_word; +Esc+D :kill_word; + +Ctrl-X+@m :make; + + +/* The following is a non-Epsilon MACRO which can be usefully combined with */ +/* the insert_file macro to compensate for the fact that TEML's ReadBlock */ +/* internal MACRO leaves point at the beginning of the block just read. */ +/* Epsilon leaves point at the end of the block inserted. This MACRO allows*/ +/* one to quickly move to the end of the block inserted... */ +Ctrl-X+Ctrl-K :Begin + MoveToBlockEnd; + center_window; + HideBlock; + End; + +Alt-X :named_command; + +Ctrl-X+Ctrl-N :next_error; + +Ctrl-V :next_page; + +Ctrl-O :open_line; + +Alt-V :previous_page; +Esc+@v :previous_page; + +Ctrl-Q :quoted_insert; + +Ctrl-X+@r :redo; +F10 :redo; + +Ctrl-S+Ctrl-S :RepeatSearch; + +Ctrl-X+@u :undo; +F9 :undo; + +Ctrl-X+Ctrl-S :save_file; + +Alt-Z :scroll_down; +Esc+@z :scroll_down; + +Ctrl-Z :scroll_up; + +Ctrl-X+Ctrl-M :set_mark; + +Ctrl-S :string_search; + +Ctrl-P :up_line; + +Ctrl-X+@w :write_region; + +Ctrl-Y :yank; + +Alt-Y :yank_pop; + +/* These need to be redefined or TEMC needs to be changed to accept them +Alt-, :beginning_of_window +Alt-. :end_of_window; +Alt-) :find_delimiter; +Ctrl-Alt-F :forward_level; +Alt-< :goto_beginning; +Alt-> :goto_end; +Alt-End :next_window; +Esc+End :next_window; +Alt-% :query_replace; +Esc+% :query_replace; +Ctrl-@ :set_mark; +*/ + + + diff --git a/M/TC/DOC/HELPME!.DOC b/M/TC/DOC/HELPME!.DOC new file mode 100644 index 0000000..9ff71f5 --- /dev/null +++ b/M/TC/DOC/HELPME!.DOC @@ -0,0 +1,815 @@ + + Turbo C++: ANSWERS TO COMMON QUESTIONS + + + G e t t i n g S t a r t e d + ---------------------------------------------------------------------- + Q. How do I install Turbo C++? + A. Run the INSTALL program from DISK 1. To start the installation, change + your current drive to the one that has the install program on it and + type INSTALL. You will be given instructions in a box at the bottom of + the screen for each prompt. For example, if you will be installing from + drive A:, type: + + A: + INSTALL + + At this point, the INSTALL program will appear with menu selections + and descriptions to guide you through the installation process. + + Q. How do I run Turbo C++? + A. After you have installed Turbo C++, be sure to add the path to + the 'BIN' subdirectory of your TC++ installation (e.g., C:\TC\BIN) + to your DOS path. Now you can type "TC" at the DOS prompt and from any + directory and you're ready to go. + + Q. What is a configuration file? + A. A configuration file tells Turbo C++ what options to default to + and where to look for its library and header files. TC.EXE looks + for a configuration file named TCCONFIG.TC, and TCC.EXE looks for + a file named TURBOC.CFG. + + Q. How do I create a configuration file? + A. When you run the INSTALL program it creates a configuration + file named TURBOC.CFG for TCC.EXE. This file is just an + ASCII file, which you can change with any text editor. It + contains the path information for the library and header + files for TCC.EXE to use. The INSTALL program does not + create a TCCONFIG.TC file for TC.EXE because it installs the + directory information directly into TC.EXE. You can create a + configuration file for the IDE by running TC.EXE, + setting your options however you want to set them, and typing + Alt-O/S. + + C o m m o n C + + Q u e s t i o n s + ---------------------------------------------------------- + + Q. When linking C or Assembly language modules with C++ modules I get + undefined symbol errors at link time. It appears that none of the C + or Assembly public symbols can be found. + A. C++ is a strongly typed language. In order to support the language + to its fullest, Turbo C++ must attach information to the symbols + generated for function names and variables. When this is done, the + symbol will no longer match the standard C style function name. In + order to link correctly, the compiler must be notified that the symbol + is declared in an external module without type information tacked on + to the symbol. This is done by prototyping the function as type + extern "C". Here is a quick example: + extern "C" int normal_c_func( float, int, char ); // name not altered + void cplusplus_function( int ); // name altered + See related comments under Linker Errors and in the Paradox Engine + question in this section. + + Q. Classes with static data members are getting linker errors ("undefined"). + A. This code is built into Turbo C++ 1.0 but not in version 3.0. + In the 1.0 compiler, static members without definitions were given a + default value of 0. This default definition will no longer be made in the + compiler. The programmer must now give an explicit definition for each + static member. Here is a quick example: + class A + { + static int i; + }; + A linker error saying that A::i is not defined will result unless the + source also contains a line such as: + int A::i = 1; + + Q. What potential problems can arise from typecasting a base class pointer + into a derived class pointer so that the derived class's member functions + can be called? + A. Syntactically this is allowable. There is always the possibility of + a base pointer actually pointing to a base class. If this is + typecast to a derived type, the method being called may not exist + in the base class. Therefore, you would be grabbing the address of + a function that does not exist. + + Q: What's the difference between the keywords STRUCT and CLASS? + A: The members of a STRUCT are PUBLIC by default, while in CLASS, + they default to PRIVATE. They are otherwise functionally equivalent. + + Q: I have declared a derived class from a base class, but I can't access any + of the base class members with the derived class function. + A: Derived classes DO NOT get access to private members of a base class. + In order to access members of a base class, the base class members must + be declared as either public or protected. If they are public, then + any portion of the program can access them. If they are protected, they + are accessible by the class members, friends, and any derived classes. + + Q: How can I use the Paradox Engine 1.0 with C++?, + A: Because the Paradox Engine functions are all compiled as C functions, + you will have to assure that the names of the functions do not get + "mangled" by the C++ compiler. To do this you need to prototype the + Engine functions as extern "C". In the pxengine.h header file insert + the following code at the lines indicated. + + /* inserted at line # 268 */ + #ifdef __cplusplus + extern "C" { + #endif + + /* inserted at line # 732, just before the final #endif */ + #ifdef __cplusplus + } + #endif + + Paradox Engine version 2.0 is "aware" of C++ and thus does not require + any modifications to its header file. + + Q: I have a class that is derived from three base classes. Can I insure that + one base class constructor will be called before all other constructors? + A: If you declare the base class as a virtual base class, its constructor + will be called before any non-virtual base class constructors. Otherwise + the constructors are called in left-to-right order on the declaration + line for the class. + + Q: Are the standard library I/O functions still available for use with + the C++ iostreams library? + A: Yes, using + + #include + + functions such as printf() and scanf() will continue to be + available. However, using them in conjunction with stream oriented + functions can lead to unpredictable behaviour. + + Q. In C++, given two variables of the same name, one local and one global, + how do I access the global instance within the local scope? + A. Use the scope (::) operator. + + int x = 10; + for(int x=0; x < ::x; x++) + { + cout << "Loop # " << x << "\n"; // This will loop 10 times + } + + Q. Will the following two functions be overloaded by the compiler, or + will the compiler flag it as an error? Why? + void test( int x, double y); & int test( int a, double b); + A. The compiler will flag this as a redeclaration error because + neither return types nor argument names are considered when determining + unique signatures for overloading functions. Only number and type + of arguments are considered. + + Q. If I pass a character to a function which only accepts an int, + what will the compiler do? Will it flag it as an error? + A. No. The compiler will promote the char to an int and use the integer + representation in the function instead of the character itself. + + Q. I was trying to allocate an array of function pointers using the new + operator but I keep getting declaration syntax errors using the following + syntax: new int(*[10])(); What's wrong? + A. The new operator is a unary operator and binds first to the int keyword + producing the following: (new int) (*[10])(); + You need to put parentheses around the expression to produce the + expected results: new (int (*[10]()); + + Q. What are inline functions? What are their advantages? How are they + declared? + A. An inline function is a function which gets textually inserted by + the compiler, much like macros. The advantage is that execution time + is shortened because linker overhead is minimized. They are declared + by using the inline keyword when the function is declared: + + inline void func(void) { cout << "printing inline function \n"; } + + or by including the function declaration and code body within a class: + + class test + { + public: + void func(void) { cout << "inline function within a class.\n"} + }; + + Q. If I don't specify either public or private sections in a class, + what is the default? + A. In a class, all members are private by default if neither public nor + private sections are declared. + + Q. What does the _seg modifier do? + A. Using _seg causes a pointer to become a storage place for a + segment value, rather than an offset ( or a segment/offset ). + For instance, if "int _seg *x" contains the value 0x40, + then when you use "*x", the value pointed to will be at + segment 0x40, offset 0. If you add a value to the pointer, + the value is multiplied by the size of the pointer type. That + new value is used as an offset, and is combined with the segment + value contained in the pointer. For instance, + + int _seg *x; + int value; + + x = (int _seg *)0x40; + value = *(x + 20); + + value is assigned the value of the integer at 0x40:0x28 + (Remember, 20 * sizeof(int) = 40 = 0x28). + + + Q. Can I statically allocate more than 64K of data in a single module? + A. Yes. Far data items are now supported: + + ... + char far array1[60000L]; + char far array2[60000L]; + ... + + For arrays larger than 64k use: + + char huge array3[100000L]; + + Q. What is a friend member function? + A. Declaring a friend gives non-members of a class access to the + non-public members of a class. + + Q. Why do I get a "Type name expected" error on my definition of a + friend class in my new class? + A You need to let the compiler know that the label you use for your + friend class is another class. If you do not want to define your + entire class, you can simply have "class xxx", where xxx is your + label. + + Q: How can I output hex values in upper case using the iostream libraries? + A: You need to set the state of the stream using setf(). For example, + + #include + + int main(void) + { + cout << hex; + cout << "\nNot upper-case : " << 255; + cout.setf(ios::upper-case); + cout << "\nUppercase : " << 255; + return 0; + } + + Q. What is the "this" pointer? + A. "this" is a local variable in the body of a non-static member function. + It is a pointer to the object for which the function was invoked. It + cannot be used outside of a class member function body. + + Q. Why does a binary member function only accept a single argument? + A. The first argument is defined implicitly. + + Q. Looking through the class libraries there are definitions in classes + which look like: + class test { + int funct( void ) const; + }; + What is the const keyword doing here? + A. There is a pointer to the object for which a function is called + known as the 'this' pointer. By default the type of 'this' + is X *const ( a constant pointer). The const keyword changes the + type to const X *const ( a constant pointer to constant data ). + + Q: I want to use _new_handler and set_new_handler. + A: Turbo C++ supports _new_handler and set_new_handler. The type of + _new_handler is as follows. + typedef void (*vfp)(void); + vfp _new_handler; + vfp set_new_handler( vfp ); + + Q: I would like to use C++ fstreams on a file opened in binary mode, + how is this done? + A: Use ios::binary as the open mode for the file: + #include + ifstream binfile; + binfile.open("myfile.bin", ios::binary); + + Q: How can I get at the DOS file handle associated with my iostream? + A: Using a combination of member functions fd() and rdbuf() you can + get at the file handle. + #include + #define fstrno(s) (((s).rdbuf())->fd()) + ifstream test("test.txt"); + cout << "handle is " << fstrno(test) << '\n'; + + + + I n t e g r a t e d E n v i r o n m e n t + ---------------------------------------------------------------------- + Q: Why doesn't my mouse work well with Turbo C++? + A: The most likely cause is that you are using an older mouse driver. You'll + need to get a newer version. Driver versions required for full + compatibility include: + Logitech driver 5.01+, Microsoft 7.04+, Genius 9.06+. + + + Q. Why is Turbo C++ not able to find any of my #include files? + A. The compiler searches for include files in the Turbo C++ Include + Directories path. You can specify this path through the + Options|Directories menu. The INSTALL program initially sets this + path to the directory where it copied all the Turbo C++ *.h files. + + Q. Why do I get the message: + Linker Error: Unable to open input file 'C0x.OBJ' + A. The linker searches for Turbo C++ start-up and library files in the + Turbo C++ Library Directories path. You can specify this path through + the Options|Directories menu. The INSTALL program initially sets this + path to the directory where it copied the start-up and library files. + Also be sure that you installed the memory model that the linker + is looking for. The 'x' in the error message corresponds to the memory + model, e.g. 's' for small, 'l' for large, etc. + + Q. How do I get Turbo C++ to link in my own libraries or use multiple + source files? + A. Turbo C++'s Project facility is designed to allow you to work with + multiple files. + + Q. Why does the linker tell me that all the graphics library routines + are undefined? + A. The Options|Linker|Libraries|Graphics Library item must be set ON + if you are using any Turbo C++ graphics functions and have not + specified GRAPHICS.LIB in a project file. + + Q. Why does Turbo C++ report "Unable to open include file 'stdarg.h'" + when I try to #include ? + A. The most probable reason is that you have exceeded the number + of files that DOS can have open simultaneously. Add the line + + FILES=20 + + to your DOS CONFIG.SYS file. This allows DOS to open up to 20 + files at the same time. CONFIG.SYS will only be effective after + you have rebooted your computer. See the IBM DOS Reference + Manual for details on the CONFIG.SYS file. + + Q. Where is the TCINST.EXE utility I have used in previous versions + of the compiler? + A. The capabilities of TCINST have been incorporated into other areas + of the product and thus TCINST is no longer necessary. To remap + key bindings, use the Turbo Editor Macro Compiler (TEMC). Colors + can be changed from within the IDE under Options | Environment | Colors. + + Q. When I Make, Run, or Trace a program, Turbo C++ sometimes goes + through the compile and link process even when the object files + are up-to-date. + A. Turbo C++'s MAKE logic works solely on a file's date and time + stamp. If one of your source files is marked with a date + that's sometime in the future, the object files that are + created from it will always be older than the source file, + and Turbo C++ will always try to rebuild the file. You can fix + this by using TOUCH.COM to set the file to the current date + and time. You should also make sure that your system's date + and time are always properly set. TOUCH.COM is documented in + the file UTIL.DOC. + + Q. How come my old Turbo C project files don't work anymore? + A. Project files now contain much more information about a project now, + and hence are no longer stored in ASCII format. To create a project + file, select PROJECT from the main menu, and follow the menus. To + convert your old project files to the new format, use the supplied + utility file PRJCNVT.EXE (documented in UTIL.DOC). + + Q. How can I convert my Turbo C 2.0 project files to the new + format? + A. There is a conversion utility in your Turbo C++ BIN directory + called PRJCNVT.EXE. This program will perform the conversion. + + Q. How come my project file is automatically loaded when I start Turbo C++? + I want to work on a different program. + A. If there is only one project file in the current directory, Turbo C++ + will load and use that one file. If there are no project files, or + if there are multiple project files, Turbo C++ does not automatically + load one. Go ahead and create a new project. To use a specific project + file you can specify the name of that project file on the command + line used to start Turbo C++. For example, 'tc farley.prj' would + start up TC++ and load the 'farley' project. + + Q. My right mouse button appears to do nothing. Can I change this so it + will set breakpoints? + A. Yes, under the menu for Options|Environment|Mouse there is a + dialog box for the right mouse button. You can change it to set + breakpoints, or to do many other things. + + Q. How can I find out where my "null pointer assignment" is occurring? + A. Set a watch on the following expressions: + + *(char *)0,4m + (char *)4 + + Step through the program. When the values change, the just-executed line + is the one that is causing the problem. + + Q. When I compile my program, I get the following error: + + Error: C:\TC\INCLUDE\STDIO.H: Overlays only supported in + medium, large, and huge memory models + + What is happening? + A. The Overlay Support option has been selected and does not work + in the tiny, small, or compact memory models. You can turn this option + off with: + Options | Compiler | Code Generation | Overlay Support + + + Q. When I try to load a new file after editing a file, the first + file remains on the screen. How do I close the first file? + A. Use Alt-F3 to close the current file. Also, use F6 to move + from one file to the next, if there is more than one file + open at a time. + + Q. I'm doing a search and replace operation, and the editor prompts me for + each replacement. I've selected "Change All", but it still does it. + A. To disable the prompting, you must unselect the "Prompt on replace" + option on the left side of the dialog box. + + Q. When I try to use the any of the pseudo registers, like _AX, I + get the error message "Undefined symbol '_AX' in function..." + when I compile. Why? + A. You are only allowed to use the pseudo registers in the Turbo + C++ and ANSI modes of the compiler. You can change this setting + in the Options | Compiler | Source menu. + + Q. Since I don't have a mouse, can I still copy blocks of code + from one file to another? + A. Yes. You can mark the beginning and end of a block by moving + to the appropriate area and pressing Ctrl-K-B (mark beginning) and + Ctrl-K-K (mark end). You can then use the copy and paste commands + in the Edit menu. + + Q: How do I stop all of the files I have ever edited from constantly + being open when I bring up Turbo C++? + A: By default, Turbo C++ saves what is called the desktop configuration. + This configuration is saved in a file with a .DSK extension. By deleting + any files of this type, then entering Options/Environment/Preferences + and removing the check from 'auto save desktop', you will begin with a + clean desktop each time you invoke Turbo C++. + + + C o m m a n d - L i n e C o m p i l e r + ---------------------------------------------------------------------- + Q. Why is Turbo C++ not able to find any of my #include files? + A. The compiler searches for include files in the Turbo C++ Include + Directories path. You specify this path with the -I option. The INSTALL + program initially writes a configuration file (TURBOC.CFG) that + sets this path to the directory where it copied all the Turbo C++ + *.h files. + + Q. Why do I get the message: + Linker Error: Unable to open input file 'C0x.OBJ' + A. The linker searches for Turbo C++ start-up and library files in the + Turbo C++ Library Directories path. You can specify this path with + the -L option. If you allow TCC to invoke the linker, it will search + the directories in the configuration file (TURBOC.CFG) written by the + INSTALL program. If you run TLINK, the configuration file is not read. + TLINK does use the configuration file TLINK.CFG, so you can specify + library paths in this file. + + Q. Why does the linker tell me that all the graphics library routines are + undefined? + A. TCC will not search the graphics library unless you tell it to. + You should specify the graphics library on the command line. For + example, to compile BGIDEMO, type + + TCC BGIDEMO.C GRAPHICS.LIB + + Q. I run TCC.EXE and get the error message: + Fatal: .def (): syntax error + A. Check your DATA statement on line number # in .def for the + correct code (that is, DATA PRELOAD). + + + G e n e r a l I / O + ---------------------------------------------------------------------- + Q. The '\n' in cprintf() does not return the cursor to the + beginning of the line. It only moves the cursor down one line. + A. cprintf() interprets '\n' as a Line Feed. To force the cursor to + the beginning of the line, manually insert a Carriage Return: + + cprintf("\n\r"); + + Q. How do I print to the printer from a Turbo C++ program? + A. Turbo C++ uses a FILE pointer (stdprn) defined in the STDIO.H + file. You do not need to open stdprn before using it: + + #include + int main(void) + { + fprintf(stdprn, "Hello, printer!\n"); + } + + Note that if your printer is line-buffered, the output is + flushed only after a '\n' is sent. + + Q. I am reading and writing binary files. My program is translating + the Carriage Return (0x0D) and Line Feed (0x0A) characters. How do + I prevent this from happening? + A. Files opened in text mode will translate these characters for + DOS. To read a file in binary mode, open it in binary mode. + For example, + + #include + int main(void) + { + FILE *binary_fp; + char buffer[100]; + + binary_fp = fopen("MYFILE.BIN", "rb"); + + fread(buffer, sizeof(char), 100, binary_fp); + + : + } + + The default file mode is text. + + Q. Why don't printf() and puts() print text in color? + A. Use the console I/O functions cprintf() and cputs() for color output. + + #include + int main(void) + { + textcolor(BLUE); + cprintf("I'm blue."); + } + + Q. How do I print a long integer? + A. Use the "%ld" format: + + long int l = 70000L; + printf("%ld", l); + + Q. How do I print a long double? + A. Use the "%Lf" format. + + long double ldbl = 1E500; + printf("%Lf", ldbl); + + + E x a m p l e P r o g r a m s + ---------------------------------------------------------------------- + Q. How do I compile the BGIDEMO program? + A. 1. Make sure that the following Turbo C++ files are in your + current directory: + + BGIDEMO.C + *.BGI + *.CHR + + 2. Run Turbo C++. + + 3. Load BGIDEMO.C into the Editor by pressing F3, then typing + BGIDEMO + + 3. Go to the Run menu and choose the Run item. + + Q. How do I create a COM file? + A. DOS versions 3.2 and earlier include an EXE2BIN utility that + converts EXE files to COM files. Users who do not have EXE2BIN can + use TLINK, the Turbo C++ command-line linker, to create a COM file + instead of an EXE file. Use the /t option. For example: + + TCC -mt -lt tiny + + will create TINY.COM instead of TINY.EXE. The -l switch passes + the /t argument to the linker in this case. + + There are certain limitations in converting an EXE file to a COM + file. These limitations are documented in the IBM Disk Operating + System manual under EXE2BIN. + + Turbo C++'s TINY model is compatible with the COM format, but programs + that use Turbo C++'s floating-point routines cannot be used in a + TINY model application. + + + G r a p h i c s + ---------------------------------------------------------------------- + Q. Why do I get the error message: + + BGI Error: graphics not initialized (use 'initgraph') + + when I use a graphics function? My program has already + called initgraph(). + A. For some reason initgraph() failed. To find out why, check + the return value of graphresult(). For example: + + #include + int main(void) + { + int gerr; /* graphics error */ + int gdriver = DETECT, gmode; + + /* Initialize graphics using auto-detection and look + for the .BGI and .CHR files in the C:\TC\BGI directory. + */ + initgraph(&gdriver, &gmode, "C:\\TC\\BGI"); + + if ((gerr = graphresult()) != grOk) + { + printf("Error : %s\n", grapherrormsg(gerr)); + exit(1); + } + : + } + + + M a t h / F l o a t i n g P o i n t + ---------------------------------------------------------------------- + Q. Why do I get incorrect results from all the math library + functions like cos(), tan() and atof()? + A. You must #include before you call any of the standard + Turbo C++ math functions. In general, Turbo C++ assumes that a function + that is not declared returns an int. In the case of math functions, + they usually return a double. For example + + /* WRONG */ /* RIGHT */ + #include + int main(void) int main(void) + { { + printf("%f", cos(0)); printf("%f", cos(0)); + } } + + Q. How do I "trap" a floating-point error? + A. See the signal() and matherr() functions in the online help. The + signal() function may be used to trap errors in the 80x87 or the + 80x87 emulator. The matherr() function traps errors in the Math + Library functions. + + + L i n k e r E r r o r s + ---------------------------------------------------------------------- + Q. I am linking C functions with C++ functions. The linker reports that + all of my C functions are undefined. Why? + A. Linking C++ modules with C modules requires the use of a linkage + specification. Prototypes for C functions within C++ modules must + be in one of the following forms: + + extern "C" declaration + extern "C" { declarations } + + For example, if a C module contains functions + "char *SCopy(char*, char*);" and "void ClearScreen(void)", they + must be declared in a C++ module in one of the following ways: + + extern "C" char *SCopy(char*, char*); + extern "C" void ClearScreen(void); + + or + + extern "C" { + char *SCopy(char*, char*) + void ClearScreen(void); + } + + For further examples, see the standard header files. For additional + comment, see Common C++ Questions. + + Q. Why do I get the message: + Linker Error: Unable to open input file 'C0x.OBJ' + A. See the "Integrated Environment" section above. + + Q. Why do I get the message: + Linker Error: Undefined symbol '_main' in module C0 + A. Every C program must contain a function called main(). This + is the first function executed in your program. The function + name must be all in lower case. If your program does not + have one, create one. If you are using multiple source files, + the file that contains the function main() must be one of + the files listed in the Project. + + Note that an underscore character '_' is prepended to all + external Turbo C++ symbols. + + Q. Why does the linker tell me that all the graphics library + routines are undefined? + A. See the "Integrated Environment" and "Command-line Compiler" + sections above. + + Q. What is a 'Fixup overflow'? + A. See the listing of TLINK error messages in the Turbo C++ + User's Guide. + + Q. I am linking my own assembly language functions with Turbo C++. + The linker reports that all of my functions are undefined. + A. Make sure that you have put an underbar character '_' in front of all + assembly language function names to be called by Turbo C++. Your + assembly language program should be assembled with Case Sensitivity. + If compiling as C++ (rather than C), see the "Common C++ Questions" + section above which discusses the use of extern "C". + + Q: I am getting an error out of the linker "segment group exceeds 64K : + _text". + A: If you are using the BGIOBJ utility, the default segment into which + the objects will be place is _text. You should try using BGIOBJ with + the /f option to place the resultant objects into a separate segment. + You will then need to use the functions registerfarbgidriver and + registerfarbgifont to register the objects for the graphics system. + See UTIL.DOC for instructions on using these functions. + + Q: I am attempting to link Turbo C 2.0 objects into my Turbo C++ programs, + but continually get unresolved external symbols at link time. + A: The names of many of the "helper" functions have changed from what they + were in Turbo C 2.0. If you are getting undefined symbols like _LXLSH and + _FMUL, this is the problem you are running into. Your best solution is to + get the source code to the old object modules and recompile with Turbo C++. + The only other possibility would be to extract the helper function objects + from the Turbo C 2.0 libraries and link them into the Turbo C++ program. + + Q. I'm porting an application that uses communal variables to C++. + I've set up the compiler to recognize them, but I still get linker + errors: + + Error: defined in module is duplicated in module + + A. C++ doesn't support explicit COMDEFs; you must use static + variables or switch to C. + + O t h e r Q u e s t i o n s + ---------------------------------------------------------------------- + Q. I get a "floating point formats not linked" message when I run + my program. What can I do about it? + + A. Floating point formats (for scanf() and related functions) are + not always linked, for savings in executable size. To force their + inclusion, put the following somewhere in your source files: + + extern unsigned _floatconvert; + #pragma extref _floatconvert + + Q. How do I change the stack size? + A. The size of the stack of a Turbo C++ program is determined at + run time by the global variable _stklen. To change the size + to, for example, 10,000 bytes, include the following line in + your program: + + extern unsigned _stklen = 10000; + + This statement must not be inside any function definition. + The default stack size is 4,096 bytes (4K). + + Q. I'm getting a 'Stack Overflow!' message when I run my program. + How can I work around this? + A. You may increase the stack size by following the procedure above. Stack + overflows are usually caused by a large amount of local data or + recursive functions. You can decrease the amount of stack space + used by declaring your local variables static: + + int main(void) int main(void) + { { + char x[5000]; --> static char x[5000]; + : : + } } + + Of course, you should be aware that there are other effects + that the "static" keyword has, as applied here. + + Q. My program comes up with the message 'Null pointer assignment' + after it terminates. What does this mean? + A. Before a small-data model Turbo C++ program returns to DOS, it will + check to see if the beginning of its data segment has been corrupted. + This message is to warn you that you have used uninitialized pointers + or that your program has corrupted memory in some other way. + + Q. Why are .EXE files generated by TC.EXE larger than those generated by + TCC.EXE? + A. In the default configuration, TC.EXE includes debugging information in + the .EXE files that it creates, and TCC.EXE does not. If you don't want + to produce this debugging information, you can shut it off in the + Integrated Development Environment by selecting Alt-O|B|N. + + Q. Why do I get "declaration syntax error" messages on dos.h? + A. You have set the "ANSI keywords only" option ON. Keep this option OFF + when using any keywords specific to Turbo C++. + + Q. I have a working program that dynamically allocates memory + using malloc() or calloc() in small data models (tiny, small, + and medium). When I compile this program in large data models + (compact, large, and huge), my program hangs. + A. Make sure that you have #include in your program. + + Q. I am linking my own assembly language functions with Turbo C++. + But the linker reports that all of my functions are undefined. + A. See answer above in the "Linker" section. + + Q. My far pointers "wrap around" when they are incremented over 64K. + How do I reference a data object that is greater than 64K? + A. Use huge pointers. + + Q. How do I interface Turbo C++ routines to a Turbo Pascal program? + A. See the example programs CPASDEMO.PAS and CPASDEMO.C. + + Q. How do I get Clipper to link with Turbo C++? + A. If you are having trouble, contact Nantucket Technical Support. + + Q. I'm trying to build an app based on one of Borland's libraries + (Turbo Vision, the container classes in the CLASSLIB directory, + or the Runtime Library), and I get linker errors, or it won't + run right. What's going wrong? + + A. You may be using a switch that affects linkage in your files, + that was not used when the library itself was compiled, or you + need to change the library in question. Here are some examples: + + - If you use far vtables (-Vf or Options|Compiler|C++|Far + virtual tables) to compile a file you developed which + includes iostream.h, it won't build correctly until you + rebuild the iostream library with the same option. + + - If you use word alignment (-a or Options|Compiler|Code + Generation|Word alignment) in building a Turbo Vision + application, you must build the Turbo Vision library from + source with the same option. + + + diff --git a/M/TC/DOC/UTIL.DOC b/M/TC/DOC/UTIL.DOC new file mode 100644 index 0000000..05c297b --- /dev/null +++ b/M/TC/DOC/UTIL.DOC @@ -0,0 +1,5046 @@ + + + + + +CONTENTS +___________________________________________________________________________ + + + + + + Linker response files . . . . 28 +HOW TO USE THIS FILE . . . . . . . 1 Sample OBJXREF reports . . . . 28 +BGIOBJ: Converting graphics drivers Report by public names +and fonts . . . . . . . . . . . . 2 (/RP) . . . . . . . . . . . . 29 + Adding the new .OBJ files to Report by module (/RM) . . . 29 + GRAPHICS.LIB . . . . . . . . . . 3 Report by reference (/RR) . . 30 + Registering the drivers and Report by external references + fonts . . . . . . . . . . . . . 3 (/RX) . . . . . . . . . . . . 30 + An example . . . . . . . . . . 4 Report of module sizes + The /F option . . . . . . . . . 5 (/RS) . . . . . . . . . . . . 31 + Advanced features . . . . . . . 6 Report by class type (/RC) . 31 +CPP: The preprocessor . . . . . 10 Report of unreferenced symbol + CPP as a macro preprocessor . 11 names (/RU) . . . . . . . . . 32 + An example . . . . . . . . . . 11 Verbose reporting (/RV) . . . 32 +GREP: A text-search utility . . 12 Examples of how to use + Command-line syntax . . . . . 13 OBJXREF . . . . . . . . . . . . 32 + GREP options . . . . . . . . . 13 Example 1 . . . . . . . . . . 32 + Order of precedence . . . . 16 Example 2 . . . . . . . . . . 33 + The search string . . . . . . 16 Example 3 . . . . . . . . . . 33 + Operators in regular Example 4 . . . . . . . . . . 33 + expressions . . . . . . . . 17 OBJXREF error messages and + File specifications . . . . . 18 warnings . . . . . . . . . . . 34 + Some GREP examples . . . . . . 18 Error messages . . . . . . . 34 + Example 1 . . . . . . . . . 18 Warnings . . . . . . . . . . 34 + Example 2 . . . . . . . . . 19 PRJCFG: Configuration file + Example 3 . . . . . . . . . 19 utility . . . . . . . . . . . . . 35 + Example 4 . . . . . . . . . 20 PRJCNVT: Old projects for new . . 35 + Example 5 . . . . . . . . . 20 PRJ2MAK: From project file to MAKE + Example 6 . . . . . . . . . 21 file . . . . . . . . . . . . . . 36 + Example 7 . . . . . . . . . 21 THELP: The Turbo Help utility . . 37 + Example 8 . . . . . . . . . 22 Loading and invoking THELP . . 37 +OBJXREF: The object module cross- Navigating THELP . . . . . . . 38 +reference utility . . . . . . . 22 THELP options . . . . . . . . . 39 + The OBJXREF command line . . . 23 /C#xx (select color) . . . . 40 + The OBJXREF command-line /Fname (full path and name for + options . . . . . . . . . . 24 help file) . . . . . . . . . 41 + Control options . . . . . 24 /H, /?, and ? (display help + Report options . . . . . . 25 screen) . . . . . . . . . . . 42 + Response files . . . . . . . . 27 /Kxxyy (reassign hot key) . . 42 + Free-form response files . . 27 /U (remove THELP from + Project files . . . . . . . 27 memory) . . . . . . . . . . . 43 + + + + i + + + + + + + /Wx,y,w,h (set the window size TRANCOPY: A project transfer item + and location) . . . . . . . 43 utility . . . . . . . . . . . . . 52 +TLIB . . . . . . . . . . . . . . 43 TRIGRAPH: A character-conversion + Why use object module utility . . . . . . . . . . . . . 53 + libraries? . . . . . . . . . . 44 Transfer macros . . . . . . . . . 54 + The TLIB command line . . . . 44 State macros . . . . . . . 54 + The operation list . . . . . 46 File name macros . . . . . 54 + File and module names . . 46 Instruction macros . . . . 55 + TLIB operations . . . . . 46 Running DOS commands . . . . . 59 + Using response files . . . . . 48 Transfer memory settings . . . 59 + Creating an extended dictionary: Turbo Editor macros . . . . . . . 60 + The /E option . . . . . . . . 49 TEMC command line . . . . . . . . 60 + Setting the page size: The /P Syntax . . . . . . . . . . . . . 61 + option . . . . . . . . . . . . 49 Key codes . . . . . . . . . . . . 62 + Advanced operation: The /C Named keys . . . . . . . . . . 63 + option . . . . . . . . . . . . 50 Predefined editor commands . . . 64 + Examples . . . . . . . . . . . 51 +TOUCH . . . . . . . . . . . . . 51 Index 77 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ii + + + + + + +TABLES +___________________________________________________________________________ + + + + + +1.1: Summary of THELP command-line 1.3: TLIB action symbols . . . . 47 + options . . . . . . . . . . .39 1.4: TEMC editor commands . . . . 64 +1.2: TLIB options . . . . . . . .45 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + iii + + + + + + + + + + + + +Online document +___________________________________________________________________________ + + + + Other utilities + + + + +=========================================================================== +HOW TO USE THIS FILE +=========================================================================== + + This file has a table of contents and an index that + refer to "pages" in this file. If your editor has a + search facility, you can use it to search for the page + numbers listed in either the table of contents or in + the index. The text "- n -" (where n represents the + actual page number) appears at the bottom left of the + "page" it refers to. Thus, at the bottom of page 1, + you'll find "- 1 -" as the last item on that "page." + + Turbo C++ comes with a host of standalone utilities + that you can use with your Turbo C++ files or other + modules. Several are documented in the User's Guide; + others are documented here. + + + ------------------------------------------------------- + Name Description + ------------------------------------------------------- + + Documented in the User's Guide + + MAKE Standalone program manager + TLINK Turbo Linker + + Documented in this file + + BGIOBJ Conversion utility for graphics drivers and + fonts + + + + - 1 - + + + + + + + CPP Preprocessor + GREP File-search utility + OBJXREF Object module cross-referencer + PRJCFG Updates options in a project file from a + configuration file, or converts a project + file to a configuration file + PRJCNVT Converts Turbo C project files to the Turbo + C++ format + PRJ2MAK Converts Turbo C++ project files to MAKE + files + THELP Turbo Help utility + TLIB Turbo Librarian + TOUCH Updates file date and time + TRANCOPY Copies transfer items from one project to + another + TRIGRAPH Character-conversion utility + TEML/TEMC Turbo Editor Macro Language and Compiler + + ------------------------------------------------------- + + This file explains what each utility is and + illustrates, with code and command-line examples, how + to use them. + + + +=========================================================================== +BGIOBJ: Converting graphics drivers and fonts +=========================================================================== + + You can use BGIOBJ to convert graphics driver files and + character sets (stroked font files) to object (.OBJ) + files. Once they're converted, you can link them into + your program, making them part of the executable file. + This is in addition to the graphics package's dynamic + loading scheme, in which your program loads graphics + drivers and character sets (stroked fonts) from disk at + run time. + + Linking drivers and fonts directly into your program is + advantageous because the executable file contains all + (or most) of the drivers and/or fonts it might need, + and doesn't need to access the driver and font files on + disk when running. However, linking the drivers and + fonts into your executable file increases its size. + + + + + + + - 2 - + + + + + + + To convert a driver or font file to a linkable object + file, use the BGIOBJ.EXE utility. This is the + simplified syntax: + + BGIOBJ source_file + + where source_file is the driver or font file to be + converted to an object file. The object file created + has the same file name as the source file, with the + extension .OBJ; for example, EGAVGA.BGI yields + EGAVGA.OBJ, SANS.CHR gives SANS.OBJ, and so on. + + + Adding the new ======================================================= + .OBJ files to + GRAPHICS.LIB You should add the driver and font object modules to + GRAPHICS.LIB, so the linker can locate them when it + links in the graphics routines. If you don't add these + new object modules to GRAPHICS.LIB, you'll have to add + them to the list of files in the project (.PRJ) file, + on the TCC command line, or on the TLINK command line. + To add these object modules to GRAPHICS.LIB, invoke + TLIB with the following command line: + + tlib graphics + object_file_name [+ object_file_name + ...] + + where object_file_name is the name of the object file + created by BGIOBJ.EXE (such as CGA, EGAVGA, GOTH, and + so forth). The .OBJ extension is implied, so you don't + need to include it. You can add several files with one + command line to save time; see the example in the + following section. + + + Registering the ======================================================= + drivers and fonts + After adding driver and font object modules to + GRAPHICS.LIB, you have to register all the drivers and + fonts that you want linked in; you do this by calling + registerbgidriver and registerbgifont in your program + (before calling initgraph). This informs the graphics + system of the presence of those files, and ensures that + they will be linked in when the executable file is + created by the linker. + + The registering routines each take one parameter; a + symbolic name defined in graphics.h. Each registering + + + + - 3 - + + + + + + + routine returns a nonnegative value if the driver or + font is successfully registered. + + The following table shows the names to be used with + registerbgidriver and registerbgifont. It is a complete + list of drivers and fonts included with Turbo C++. + + +--------------------------------------------------------------------------- + Driver file registerbgidriver Font file registerbgifont + (*.BGI) symbolic name (*.CHR) symbolic name +--------------------------------------------------------------------------- + + CGA CGA_driver TRIP triplex_font + EGAVGA EGAVGA_driver LITT small_font + HERC Herc_driver SANS sansserif_font + ATT ATT_driver GOTH gothic_font + PC3270 PC3270_driver + IBM8514 IBM8514_driver + +--------------------------------------------------------------------------- + + +------------------ Suppose you want to convert the files for the CGA + An example graphics driver, the gothic font, and the triplex font +------------------ to object modules, then link them into your program. + Here's what you do: + + 1. Convert the binary files to object files using + BGIOBJ.EXE, as shown in the following separate com- + mand lines: + + bgiobj cga + bgiobj trip + bgiobj goth + + This creates three files: CGA.OBJ, TRIP.OBJ, and + GOTH.OBJ. + + 2. You can add these object files to GRAPHICS.LIB with + this TLIB command line: + + tlib graphics +cga +trip +goth + + 3. If you don't add the object files to GRAPHICS.LIB, + you must add the object file names CGA.OBJ, + TRIP.OBJ, and GOTH.OBJ to your project list (if you + are using Turbo C++'s integrated environment), or to + + + + - 4 - + + + + + + + the TCC command line. For example, the TCC command + line would look like this: + + TCC niftgraf graphics.lib cga.obj trip.obj + goth.obj + + 4. You register these files in your graphics program + like this: + + If you ever get a /* Header file declares CGA_driver, triplex_font & + linker error gothic_font */ + Segment exceeds #include + 64K after linking + in some drivers /* Register and check for errors (one never + and/or fonts, knows...) */ + refer to the +following section. if (registerbgidriver(CGA_driver) < 0) exit(1); + if (registerbgifont(triplex_font) < 0) exit(1); + if (registerbgifont(gothic_font) < 0) exit(1); + + /* ... */ + + initgraph(....); /* initgraph should be called + after registering */ + + /* ... */ + + + The /F option ======================================================= + + This section explains what steps to take if you get the + linker error Segment exceeds 64K (or a similar error) + after linking in several driver and/or font files + (especially with small- and compact-model programs). + + By default, the files created by BGIOBJ.EXE all use the + same segment (called _TEXT). This can cause problems if + your program links in many drivers and/or fonts, or + when you're using the small or compact memory model. + + To solve this problem, you can convert one or more of + the drivers or fonts with the BGIOBJ /F option. This + option directs BGIOBJ to use a segment name of the form + filename_TEXT, so that the default segment is not + overburdened by all the linked-in drivers and fonts + (and, in small and compact model programs, all the pro- + gram code). For example, the following two BGIOBJ com- + + + + + - 5 - + + + + + + + mand lines direct BGIOBJ to use segment names of the + form EGAVGA_TEXT and SANS_TEXT. + + bgiobj /F egavga + bgiobj /F sans + + When you select /F, BGIOBJ also appends F to the target + object file name (EGAVGAF.OBJ, SANSF.OBJ, and so + forth), and appends _far to the name that will be used + with registerfarbgidriver and registerfarbgifont. (For + example, EGAVGA_driver becomes EGAVGA_driver_far.) + + For files created with /F, you must use these far + registering routines instead of the regular + registerbgidriver and registerbgifont. For example, + + if (registerfarbgidriver(EGAVGA_driver_far) < 0) + exit(1); + if (registerfarbgifont(sansserif_font_far) < 0) + exit(1); + + + Advanced features ======================================================= + + This section explains some of BGIOBJ's advanced + features, and the routines registerfarbgidriver and + registerfarbgifont. Only experienced users should use + these features. + + This is the full syntax of the BGIOBJ.EXE command line: + + BGIOBJ [/F] source destination public-name seg-name + seg-class + + This table describes each component of the BGIOBJ com- + mand line. + + + ------------------------------------------------------- + Component Description + ------------------------------------------------------- + + + /F or -F This option instructs BGIOBJ.EXE + to use a segment name other than + _TEXT (the default), and to + change the public name and + destination file name. (See page + + + + - 6 - + + + + + + + 5 for a detailed discussion of + /F.) + + source This is the driver or font file + to be converted. If the file is + not one of the driver/font files + shipped with Turbo C++, you + should specify a full file name + (including extension). + + destination This is the name of the object + file to be produced. The default + destination file name is + source.OBJ, or sourceF.OBJ if + you use the /F option. + + public-name This is the name that will be + used in the program in a call to + registerbgidriver or + registerbgifont (or their + respective far versions) to link + in the object module. + + The public name is the external + name used by the linker, so it + should be the name used in the + program, prefixed with an + underscore. If your program uses + Pascal calling conventions, use + only uppercase letters, and do + not add an underscore. + + seg-name This is an optional segment + name; the default is _TEXT (or + filename_TEXT if /F is + specified) + + seg-class This is an optional segment + class; the default is CODE. + + ------------------------------------------------------- + + All parameters except source are optional. However, if + you need to specify an optional parameter, all the + parameters preceding it must also be specified. + + + + + + + - 7 - + + + + + + + If you choose to use your own public name(s), you have + to add declaration(s) to your program, using one of the + following forms: + + void public_name(void); /* if /F not used, */ + /* default segment name + used */ + + extern int far public_name[]; /* if /F used, or */ + /* segment name not + _TEXT */ + + In these declarations, public_name matches the public- + name you used when converting with BGIOBJ. The + graphics.h header file contains declarations of the + default driver and font public names; if you use those + default public names you don't have to declare them as + just described. + + After these declarations, you have to register all the + drivers and fonts in your program. If you don't use the + /F option and don't change the default segment name, + you should register drivers and fonts through + registerbgidriver and registerbgifont; otherwise, use + registerfarbgidriver and registerfarbgifont. + + Here is an example of a program that loads a font file + into memory: + + /* Example of loading a font file into memory */ + + #include + #include + #include + #include + #include + #include + #include + #include + + main() + { + void *gothic_fontp; /* points to font buffer + in memory */ + int handle; /* file handle used for + I/O */ + unsigned fsize; /* size of file (and + buffer) */ + + + + - 8 - + + + + + + + int errorcode; + int graphdriver; + int graphmode; + + /* open font file */ + handle = open("GOTH.CHR", O_RDONLY|O_BINARY); + if (handle == -1) + { + printf("unable to open font file 'GOTH.CHR'\n"); + exit(1); + } + /* find out size of the file */ + fsize = filelength(handle); + /* allocate buffer */ + gothic_fontp = malloc(fsize); + if (gothic_fontp == NULL) + { + printf("unable to allocate memory for font file + 'GOTH.CHR'\n"); + exit(1); + } + /* read font into memory */ + if (read(handle, gothic_fontp, fsize) != fsize) + { + printf("unable to read font file 'GOTH.CHR'\n"); + exit(1); + } + /* close font file */ + close(handle); + /* register font */ + if (registerfarbgifont(gothic_fontp) != + GOTHIC_FONT) + { + printf("unable to register font file + 'GOTH.CHR'\n"); + exit(1); + } + /* detect and initialize graphix */ + graphdriver = DETECT; + initgraph(&graphdriver, &graphmode, ".."); + errorcode = graphresult(); + if (errorcode != grOk) + { + printf("graphics error: + %s\n",grapherrormsg(errorcode)); + exit(1); + } + settextjustify(CENTER_TEXT, CENTER_TEXT); + + + + - 9 - + + + + + + + settextstyle(GOTHIC_FONT, HORIZ_DIR, 4); + outtextxy(getmaxx()/2,getmaxy()/2, + "Borland Graphics Interface (BGI)"); + /* press a key to terminate */ + getch(); + /* shut down graphics system */ + closegraph(); + return(0); + } + + + +=========================================================================== +CPP: The preprocessor +=========================================================================== + + CPP produces a Often, when the compiler reports an error inside a + list (in a file) macro or an include file, you can get more information + of a C source about what the error is if you can see the include + program in which files or the results of the macro expansions. In many + include files and multi-pass compilers, a separate pass performs this + #define macros work, and the results of the pass can be examined. + have been Since Turbo C++ uses an integrated single-pass compil- + expanded. It is er, we provided CPP to supply the first-pass + not needed for functionality found in other compilers. + normal compil- + ations of C You use CPP just as you would use TCC, the standalone + programs. compiler. CPP reads the same TURBOC.CFG file for + default options, and accepts the same command-line + options as TCC. + + The TCC options that don't pertain to CPP are simply + ignored by CPP. To see the list of arguments handled by + CPP, type cpp at the DOS prompt. To see how those + arguments work, see Chapter 5 in the Programmer's + Guide. + + With one exception, the file names listed on the CPP + command line are treated like they are in TCC, with + wildcards allowed. The exception to this is that all + files are treated as C source files. There is no + special treatment for .OBJ, .LIB, or .ASM files. + + For each file processed by CPP, the output is written + to a file in the current directory (or the output + directory named by the -n option) with the same name as + the source name but with an extension of .I. + + + + + - 10 - + + + + + + + This output file is a text file containing each line of + the source file and any include files. Any preproces- + sing directive lines have been removed, along with any + conditional text lines excluded from the compile. + Unless you use a command-line option to specify other- + wise, text lines are prefixed with the file name and + line number of the source or include file the line came + from. Within a text line, any macros are replaced with + their expansion text. + + Important! The resulting output of CPP cannot be compiled because + of the file name and line number prefix attached to + each source line. + + + CPP as a macro ======================================================= + preprocessor + The -P option to CPP tells it to prefix each line with + the source file name and line number. If you give it - + P- (turning this option off), CPP omits this line + number information. With this option turned off, CPP + can be used as a macro preprocessor; the resulting .I + file can then be compiled with TC or TCC. + + + An example ======================================================= + + The following simple program illustrates how CPP + preprocesses a file, first with -P selected, then with + -P-. + + Source file: HELLOAJ.C + #define NAME "H.R. Floyd" + #define BEGIN { + #define END } + + main() + BEGIN + printf("%s\n", NAME); + END + + Command line used to invoke CPP as a preprocessor: + CPP HELLOAJ.C + + Output: + HELLOAJ.c 1: + HELLOAJ.c 2: + HELLOAJ.c 3: + + + + - 11 - + + + + + + + HELLOAJ.c 4: + HELLOAJ.c 5: main() + HELLOAJ.c 6: { + HELLOAJ.c 7: printf("%s\n","H.R. Floyd"); + HELLOAJ.c 8: } + + Command line used to invoke CPP as a macro + preprocessor: + CPP -P- HELLOAJ.C + + Output: + main() + { + printf("%s\n","H.R. Floyd"); + } + + + +=========================================================================== +GREP: A text-search utility +=========================================================================== + + GREP (Global Regular Expression Print) is a powerful + text-search program derived from the UNIX utility of + the same name. GREP searches for a text pattern in one + or more files or in its standard input stream. + + Here's a quick example of a situation where you might + want to use GREP. Suppose you wanted to find out which + text files in your current directory contained the + string "Bob". You would issue the command + + grep Bob *.txt + + and GREP would respond with a list of the lines in each + file (if any) that contained the string "Bob". Because + the default for GREP is to ignore case, the strings + "bob" and "BoB" would also be considered matches. You + can use options to make your search case sensitive. + + GREP can do a lot more than match a single, fixed + string. In the section that follows, you'll see how to + make GREP search for any string that matches a + particular pattern. + + + + + + + + - 12 - + + + + + + + Command-line ======================================================= + syntax + The general command-line syntax for GREP is + + grep [options] searchstring [file(s) ... ] + + options consist of one or more letters, preceded by a + hyphen (-), that let you change various aspects of + GREP's behavior. + + searchstring gives the pattern to search for. + + file(s) tells GREP which files to search. (If you don't + specify a file, GREP searches its standard input; this + lets you use GREP with pipes and redirection.) If you + find that the results of your GREP are longer than one + screen, you can redirect the output to a file. For + example, you could use this command + + GREP "Bob" *.txt >gfile + + which searches all files in the current directory that + end with .TXT, then places the results in a file called + GFILE. (You can name this file anything you like.) + Then, use your word processor (or Turbo C++'s editor) + to access GFILE to read the results of the search. + + The command + + GREP ? + + prints a brief help screen showing GREP's command-line + options, special characters, and defaults. (See the + description of the -u command-line option for + information on how to change GREP's defaults.) + + + GREP options ======================================================= + + In the command line, options are one or more single + characters preceded by a hyphen (-). Each individual + character is a switch that you can turn on or off: A + plus symbol (+) after a character turns the option on; + a hyphen (-) after the character turns the option off. + The + sign is optional; for example, -r means the same + thing as -r+. You can list multiple options + + + + + + - 13 - + + + + + + + individually (like this: -i -d -l), or you can combine + them (like this: -ild or -il, -d, and so on); it's all + the same to GREP. + + Here are the GREP option characters and their meanings: + + +------------------------------------------------------------------------------ +Option Meaning +------------------------------------------------------------------------------ + + + -c Match Count only: Prints only a count of matching lines. For each file + that contains at least one matching line, GREP prints the file name and + a count of the number of matching lines. Matching lines are not + printed. This option is off by default. + + -d Search subdirectories: For each file specified on the command line, + GREP searches for all files that match the file specification, both in + the directory specified and in all subdirectories below the specified + directory. If you give a file without a path, GREP assumes the files + are in the current directory. This option is off by default. + + -i Ignore case: GREP ignores upper/lowercase differences (case folding). + When this option is on, GREP treats all letters a to z as identical to + the corresponding letters A to Z in all situations. This option is on + by default. + + -l List file names only: Prints only the name of each file containing a + match. After GREP finds a match, it prints the file name and processing + immediately moves on to the next file. This option is off by default. + + -n Line Numbers: Each matching line that GREP prints is preceded by its + line number. This option is off by default. + + -o UNIX output format: Changes the output format of matching lines to + support more easily the UNIX style of command-line piping. All lines of + output are preceded by the name of the file that contained the matching + line. This option is off by default. + + -r Regular expression search: The text defined by searchstring is treated + as a regular expression instead of as a literal string. This option is + on by default. This option is on by default. + + A regular expression is one or more occurrences of one or more + characters optionally enclosed in quotes. The following symbols are + treated specially: + ^ start of line $ end of line + + + + - 14 - + + + + + + + . any character \ quote next character + * match zero or more + match one or more + + [aeiou0-9] match a, e, i, o, u, and 0 thru 9 + [^aeiou0-9] match anything but a, e, i, o, u, and 0 thru 9 + + -u Update options: GREP will combine the options given on the command line + with its default options and write these to the GREP.COM file as the + new defaults. (In other words, GREP is self-configuring.) This option + allows you to tailor the default option settings to your own taste. If + you want to see what the defaults are in a particular copy of GREP.COM, + type + + GREP ? + + at the DOS prompt. Each option on the help screen will be followed by a + + or a - depending on its default setting. This option is off by + default. + + -v Nonmatch: Prints only nonmatching lines. Only lines that do not contain + the search string are considered to be nonmatching lines. This option + is off by default. + + -w Word search: Text found that matches the regular expression is + considered a match only if the character immediately preceding and + following cannot be part of a word. The default word character set + includes A to Z, 0 to 9, and the underscore ( _ ). This option is off + by default. + + An alternate form of this option lets you specify the set of legal word + characters. Its form is -w[set], where set is any valid regular + expression set definition. + + If you define the set with alphabetic characters, it is automatically + defined to contain both the uppercase and lowercase values for each + letter in the set (regardless of how it is typed), even if the search + is case-sensitive. If you use the -w option in combination with the -u + option, the new set of legal characters is saved as the default set. + + -z Verbose: GREP prints the file name of every file searched. Each + matching line is preceded by its line number. A count of matching lines + in each file is given, even if the count is zero. This option is off by + default. + +------------------------------------------------------------------------------ + + + + + + + - 15 - + + + + + + +------------------ Remember that each of GREP's options is a switch: Its + Order of state reflects the way you last set it. At any given time, + precedence each option can only be on or off. Each occurrence of a +------------------ given option on the command line overrides its previous + definition. Given this command line, + + grep -r -i - -d -i -r - main( my*.c + + GREP runs with the -d option on, the -i option on, and the + -r option off. + + You can install your preferred default setting for each + option in GREP.COM with the -u option. For example, if you + want GREP to always do a verbose search (-z on), you can + install it with the following command: + + grep -u -z + + + The search string ========================================================== + + To use GREP well, you'll need to become proficient at + writing search strings. The value of searchstring defines + the pattern GREP searches for. A search string can be + either a regular expression or a literal string. + + o In a regular expression, certain characters have special + meanings: They are operators that govern the search. + + o In a literal string, there are no operators: Each + character is treated literally. + + You can enclose the search string in quotation marks to + prevent spaces and tabs from being treated as delimiters. + The text matched by the search string cannot cross line + boundaries; that is, all the text necessary to match the + pattern must be on a single line. + + A regular expression is either a single character or a set + of characters enclosed in brackets. A concatenation of + regular expressions is a regular expression. + + + + + + + + + + + - 16 - + + + + + + +------------------ When you use the -r option (on by default), the search + Operators in string is treated as a regular expression (not a literal + regular expression). The following characters take on special + expressions meanings: +------------------ + +--------------------------------------------------------------------------- +Option Meaning +--------------------------------------------------------------------------- + + + ^ A circumflex at the start of the expression matches the start of a + line. + + $ A dollar sign at the end of the expression matches the end of a + line. + + . A period matches any character. + + * An expression followed by an asterisk wildcard matches zero or more + occurrences of that expression. For example, in to*, the * operates + on the expression o; it matches t, to, too, etc. (t followed by zero + or more os), but doesn't match ta. + + + An expression followed by a plus sign matches one or more + occurrences of that expression: to+ matches to, too, etc., but not + t. + + [ ] A string enclosed in brackets matches any character in that string, + but no others. If the first character in the string is a circumflex + (^), the expression matches any character except the characters in + the string. + + For example, [xyz] matches x, y, or z, while [^xyz] matches a and b, + but not x, y, or z. You can specify a range of characters with two + characters separated by a hyphen (-). These can be combined to form + expressions (like [a-bd-z?], which matches the ? character and any + lowercase letter except c). + + \ The backslash escape character tells GREP to search for the literal + character that follows it. For example, \. matches a period instead + of "any character." The backslash can be used to quote itself; that + is, you can use \\ to indicate a literal backslash character in a + GREP expression. + +--------------------------------------------------------------------------- + + + + + + - 17 - + + + + + + + Note Four of the "special" characters ($, ., *, and +) don't + have any special meaning when used within a bracketed + set. In addition, the character ^ is only treated + specially if it immediately follows the beginning of + the set definition (immediately after the [ delimiter). + + Any ordinary character not mentioned in the preceding + list matches that character. For example, the greater + than sign, >, matches the greater than sign (>), # + matches #, and so on. + + + File ======================================================= + specifications + file(s) tells GREP which files (or groups of files) to + search. file(s) can be an explicit file name, or a + "generic" file name incorporating the DOS ? and * + wildcards. In addition, you can enter a path (drive and + directory information) as part of file(s). If you give + file(s) without a path, GREP searches the current + directory. + + If you don't specify any files, input to GREP must come + from redirection (<) or a vertical bar (|). + + +Some GREP examples ======================================================= + + The following examples show how to combine GREP's + features to do different kinds of searches. They assume + GREP's default settings are unchanged. + + +------------------ The search string here tells GREP to search for the + Example 1 word main with no preceding lowercase letters ([^a-z]), +------------------ followed by zero or more occurrences of blank spaces + (\ *), then a left parenthesis. + + Since spaces and tabs are normally considered to be + command-line delimiters, you must quote them if you + want to include them as part of a regular expression. + In this case, the space after main is quoted with the + backslash escape character. You could also accomplish + this by placing the space in double quotes. + + Command line: + grep -r [^a-z]main\ *( *.c + + + + + - 18 - + + + + + + + Matches: main(i:integer) + main(i,j:integer) + if (main ()) halt; + if (MAIN ()) halt; + + Does not match: + mymain() + + Files searched: + *.C in current directory. + + +------------------ Because the backslash (\) and period (.) characters + Example 2 usually have special meaning in path and file names, +------------------ you must place the backslash escape character immedi- + ately in front of them if you want to search for them. + The -i option is used here, so the search is not case + sensitive. + + Command line: + grep -ri [a-c]:\\data\.fil *.c *.inc + + Matches: A:\data.fil + c:\Data.Fil + B:\DATA.FIL + + Does not match: + d:\data.fil + a:data.fil + + Files searched: + *.C and *.INC in current directory. + + +------------------ This format defines how to search for a given word. + Example 3 +------------------ Command line: + grep -ri [^a-z]word[^a-z] *.doc + + Matches: every new word must be on a new line. + MY WORD! + word--smallest unit of speech. + In the beginning there was the WORD, and + the WORD + + Does not match: + Each file has at least 2000 words. + He misspells toward as toword. + + + + - 19 - + + + + + + + Files searched: + *.DOC in the current directory. + + +------------------ This format defines another, even more basic single- + Example 4 word search. +------------------ + Command line: + grep -iw word *.doc + + Matches: every new word must be on a new line + However, + MY WORD! + word: smallest unit of speech which conveys + In the beginning there was the WORD, and + + Does not match: + each document contains at least 2000 words! + He seems to continually misspell "toward" + as "toword." + + Files searched: + *.DOC in the current directory. + + +------------------ This is an example of how to search for a string with + Example 5 embedded spaces. +------------------ + Command line: + grep "search string with spaces" *.doc *.c + a:\work\myfile.* + + Matches: This is a search string with spaces in it. + + Does not match: + This search string has spaces in it. + + Files searched: + *.DOC and *.C in the current directory, and + MYFILE.* in a directory called \WORK on + drive A. + + + + + + + + + + + - 20 - + + + + + + +------------------ This example searches for any one of the characters + Example 6 " . : ? ' and , at the end of a line. +------------------ + The double quote within the range is preceded by an + escape character so it is treated as a normal character + instead of as the ending quote for the string. Also, + the $ character appears outside of the quoted string. + This demonstrates how regular expressions can be + concatenated to form a longer expression. + + Command line: + grep -rd "[ ,.:?'\"]"$ \*.doc + + Matches: He said hi to me. + Where are you going? + In anticipation of a unique situation, + Examples include the following: + "Many men smoke, but fu man chu." + + Does not match: + He said "Hi" to me + Where are you going? I'm headed to the + + Files searched: + *.DOC in the root directory and all its + subdirectories on the current drive. + + +------------------ This example ignores case and just prints the names of + Example 7 any files that contain at least one match. The three +------------------ command-line examples show different ways of specifying + multiple options. + + Command line: + grep -ild " the " \*.doc + or + grep -i -l -d " the " \*.doc + or + grep -il -d " the " \*.doc + + Matches: Anyway, this is the time we have + do you think? The main reason we are + + Does not match: + He said "Hi" to me just when I + Where are you going? I'll bet you're headed + + + + + + - 21 - + + + + + + + Files searched: + *.DOC in the root directory and all its + subdirectories on the current drive. + + +------------------ This example redefines the current set of legal + Example 8 characters for a word as the assignment operator (=) +------------------ only, then does a word search. It matches C assignment + statements, which use a single equal sign (=), but not + equality tests, which use a double equal sign (==). + + Command line: + grep -w[=] = *.c + + Matches: i = 5; + j=5; + i += j; + + Does not match: + if (i == t) j++; + /* ======================= */ + + Files searched: + *.C in the current directory. + + + +=========================================================================== +OBJXREF: The object module cross-reference utility +=========================================================================== + + OBJXREF examines a list of object files and library + files and produces reports on their contents. One type + of report lists definitions of public names and + references to them. The other type lists the segment + sizes defined by object modules. + + There are two categories of public names: global + variables and function names. The TEST1.C and TEST2.C + files in the section "Sample OBJXREF reports" (page 28) + illustrate definitions of public names and external + references to them. + + Object modules are object (.OBJ) files produced by TC, + TCC or TASM. A library (.LIB) file contains multiple + object modules. An object module generated by TC is + given the same name as the .C source file it was com- + piled from. This is also true for TCC, unless a + + + + - 22 - + + + + + + + different output file name is specifically indicated + with the -o TCC command-line option. + + + The OBJXREF com- ======================================================= + mand line + The OBJXREF command line consists of the word OBJXREF + followed by a series of command-line options and a list + of object and library file names, separated by a space + or tab character. The syntax is as follows: + + OBJXREF options filename filename ... + + The command-line options determine the kind of reports + that OBJXREF will generate and the amount of detail + that OBJXREF will provide. They are discussed in more + detail in the next section. + + Each option begins with a forward slash (/) followed by + a one- or two-character option name. + + Object files and library files may be specified either + on the command line or in a response file. On the com- + mand line, file names are separated by a space or a + tab. All object modules specified as .OBJ files are + included in reports. Like TLINK, however, OBJXREF + includes only those modules from .LIB files which + contain a public name referenced by an .OBJ file or by + a previously included module from a .LIB file. + + As a general rule, you should list all the .OBJ and + .LIB files that are needed if the program is to link + correctly, including the startup .OBJ file and one or + more C libraries. + + File names may include a drive and directory path. The + DOS ? and * wildcard characters may be used to identify + more than one file. File names may refer to .OBJ object + files or to .LIB library files. (If you don't give a + file extension, the .OBJ extension is assumed.) + + Options and file names may occur in any order in the + command line. + + OBJXREF reports are written to the DOS standard output. + The default is the screen. The reports can be sent to a + printer (as with >LPT1:) or to a file (as with + >lstfile) with the DOS redirection character (>). + + + + - 23 - + + + + + + + Entering OBJXREF with no file names or options produces + a summary of available options. + + +------------------ OBJXREF command-line options fall into two categories: + The OBJXREF control options and report options. + command-line + options +------------------ Control options + ======================================================= + + Control options modify the default behavior of OBJXREF + (the default is that none of these options are + enabled). + + + ------------------------------------------------------- + Option Meaning + ------------------------------------------------------- + + + /I Ignore case differences in public names. Use + this option if you use TLINK without the /C + option (which makes case differences + significant). + + /D Look for .OBJ files in another directory. If you + want OBJXREF to look for .OBJ files in a + directory other than the current one, include + the directory name on the command line, prefixed + with /D: + + OBJXREF /Ddir1 [; dir2 [; dir3]] + + or + + OBJXREF /Ddir1 [/Ddir2] [/Ddir3] + + OBJXREF will search each of the directories in + the specified order for all object and library + files. + + Important! If you don't use a /D option, OBJXREF will + search only the current directory. If you do use + a /D option, however, the current directory will + not be searched unless it is included in the + directory list. For example, if you wanted + OBJXREF to search first the BORLAND directory + + + + - 24 - + + + + + + + and then the current directory for files, you + would enter + + OBJXREF /Dborland;. + + The period denotes the current directory. + + + /F Include full library. All object modules in + specified .LIB files are included even if they + do not contain public names that are referenced + by an object module being processed by OBJXREF. + This provides information on the entire contents + of a library file. (See example 4 in the section + "OBJXREF examples.") + + /O Allows you to specify an output file where + OBJXREF will send any reports generated. Its + syntax is as follows: + + OBJXREF filename.obj /report option + /Ooutputfilename.ext + + By default all output is sent to the screen. + + + /V Verbose output. Lists names of files read and + displays totals of public names, modules, + segments, and classes. + + /Z Include zero-length segment definitions. Object + modules may define a segment without allocating + any space in it. Listing these zero length + segment definitions normally makes the module + size reports harder to use but it can be + valuable if you are trying to remove all defini- + tions of a segment. + + ------------------------------------------------------- + + + Report options + ======================================================= + + Report options govern what sort of report is generated, + and the amount of detail that OBJXREF provides. + + + + + + - 25 - + + + + + + + ------------------------------------------------------- + Option Report generated + -------------------------------------------------- + + + /RC Report by class type: Module sizes ordered + by class type of segment. + + /RM Report by module: Public names ordered by + defining module. + + /RP Report by public names: Public names in + order with defining module name. + + This is the /RR Report by reference: Public name defini- + default. tions and references ordered by name. + + /RS Report of module sizes: Module sizes + ordered by segment name. + + /RU Report of unreferenced symbol names: + Unreferenced public names ordered by + defining module. + + /RV Verbose reporting: OBJXREF produces a + report of every type. + + /RX Report by external reference: External + references ordered by referencing module + name. + + -------------------------------------------------- + + Public names defined in .C files appear in reports with + a leading underscore in the reports unless the -U- + option was specified when the file was compiled (main + appears as _main). + + You can limit the modules, segments, classes, or public + names that OBJXREF reports on by entering the + appropriate name on the command line prefixed with the + /N option. For example, + + OBJXREF filelist /RM /NC0 + + tells OBJXREF to generate a report listing information + only for the module named C0. + + + + + - 26 - + + + + + + + Response files ======================================================= + + The command line is limited by DOS to a maximum of 128 + characters. If your list of options and file names will + exceed this limit, you must place your file names in a + response file. + + A response file is a text file that you make with a + text editor. Since you may already have prepared a list + of the files that make up your program for other Turbo + C++ programs, OBJXREF recognizes several response file + types. + + Response files are called from the command line using + one of the following options. The response file name + must follow the option without an intervening space + (so, for example, you would type /Lresp, not /L resp). + + You can specify more than one response file on the com- + mand line; additional .OBJ and .LIB file names can + precede or follow them. + + +------------------ You can create a free-form response file with a text +Free-form response editor. Just list the names of all .OBJ and .LIB files + files needed to make your .EXE file. +------------------ + Any file name To use free-form files with OBJXREF, type in each + listed in the response file name on the command line, preceded by an + response file @, and separate it from other command-line entries with + without an exten- a space or tab: +sion is assumed to + be an .OBJ file. @filename @filename ... + + +------------------ You can also use project files of the type generated by + Project files Turbo C++'s integrated environment as response files. +------------------ In the command line, precede the project file name with + /P, like this: + + /Pfilename + + If the file name does not include an explicit exten- + sion, a .PRJ extension is assumed. + + + + + + + + - 27 - + + + + + + + File names in the project file with a .C extension or + no extension are interpreted as specifying the + corresponding .OBJ file. You need not remove file + dependencies specified inside parentheses; they are + ignored by OBJXREF. + + Note By itself, the list of files in a .PRJ file does not + specify a complete program--you must also specify a + startup file (C0x.OBJ) and one or more Turbo C++ + library files (MATHX.LIB, EMU.LIB, and CX.LIB, for + example). In addition, you may need to use the /D + option to specify the directory where OBJXREF should + look for your .OBJ files. + + +------------------ Files in TLINK response-file format can also be used by + Linker response OBJXREF. A linker response file called from the command + files line is preceded by /L, like so: +------------------ + /Lfilename + + To see how to use one of these files, refer to Example + 2 in the section "Examples of how to use OBJXREF." + + + Sample OBJXREF ======================================================= + reports + Suppose you have two source files in your Turbo C++ + directory, and want to generate OBJXREF reports on the + object files compiled from them. The source files are + called TEST1.C and TEST2.C, and they look like this: + + /* test1.c */ + int i1; /* defines i1 */ + extern int i2; /* refers to i2 */ + static int i3; /* not a public name */ + extern void look(void); /* refers to look */ + + void main(void) /* defines main */ + { + int i4; /* not a public name */ + + look(); /* refers to look */ + } + + /* test2.c */ + #include + extern int i1; /* refers to i1 */ + + + + - 28 - + + + + + + + int i2; /* defines i2 */ + + void look(void) /* defines look */ + { + exit(i1); /* refers to exit... */ + } /* and to i1 */ + + The object modules compiled from these source files are + TEST1.OBJ and TEST2.OBJ. You can tell OBJXREF what kind + of report to generate about these .OBJ files by + entering the file names on the command line, followed + by a /R and a second letter denoting report type. + + Note The following examples show only useful parts of the + output. + + +------------------ A report by public names lists each of the public names + Report by public defined in the object modules being reported on, + names (/RP) followed by the name of the module in which it is +------------------ defined. + + If you enter this on the command line: + + OBJXREF /RP test1 test2 + + OBJXREF generates a report that looks like this: + + SYMBOL DEFINED IN + _i1 TEST1 + _i2 TEST2 + _look TEST2 + _main TEST1 + + +------------------ A report by module lists each object module being + Report by module reported on, followed by a list of the public names + (/RM) defined in it. +------------------ + If you enter this on the command line: + + OBJXREF /RM test1 test2 + + OBJXREF generates a report that looks like this: + + MODULE: TEST1 defines the following symbols: + public: _i1 + public: _main + + + + - 29 - + + + + + + + MODULE: TEST2 defines the following symbols: + public: _i2 + public: _look + + +------------------ A report by reference lists each public name with the + Report by defining module in parentheses on the same line. + reference (/RR) Modules that refer to this public name are listed on +------------------ following lines indented from the left margin. + + This is the If you enter this on the command line: + default if no + report option is OBJXREF /RR C0 test1 test2 CS.LIB + specified. + OBJXREF generates a report that looks like this: + + _exit (EXIT) + C0 + TEST2 + _i1 (TEST1) + TEST2 + _i2 (TEST2) + _look (TEST2) + TEST1 + _main (TEST1) + C0 + + +------------------ A report by external references lists each module +Report by external followed by a list of external references it contains. + references (/RX) +------------------ If you enter this on the command line: + + OBJXREF /RX C0 test1 test2 CS.LIB + + OBJXREF generates a report that looks like this: + + MODULE: C0 references the following symbols: + _main + MODULE: TEST1 references the following symbols: + _i2 + _look + MODULE: TEST2 references the following symbols: + _exit + _i1 + + + + + + + - 30 - + + + + + + +------------------ A report by sizes lists segment names followed by a + Report of module list of modules that define the segment. Sizes in bytes + sizes (/RS) are given in decimal and hexadecimal notation. The word +------------------ uninitialized appears where no initial values are + assigned to any of the symbols defined in the segment. + Segments defined at absolute addresses in a .ASM file + are flagged Abs to the left of the segment size. + + If you enter this on the command line: + + OBJXREF /RS test1 test2 + + OBJXREF generates a report that looks like this: + + These files were TEST1_TEXT +compiled using the 6 (00006h) TEST1 + large memory 6 (00006h) total + model. TEST2_TEXT + 10 (0000Ah) TEST2 + 10 (0000Ah) total + _BSS + 4 (00004h) TEST1, uninitialized + 2 (00002h) TEST2, uninitialized + 6 (00006h) total + + +------------------ A report by class type lists segment size definitions + Report by class by segment class. The CODE class contains instructions, + type (/RC) DATA class contains initialized data and BSS class +------------------ contains uninitialized data. Segments which do not have + a class type will be listed under the notation No class + type. + + If you enter this on the command line: + + OBJXREF /RC C0 test1 test2 CS.LIB + + OBJXREF generates a report that looks like this: + + BSS + 4 (00004h) TEST1 + 2 (00002h) TEST2 + ... + 132 (00084h) total + CODE + 6 (00006h) TEST1 + + + + + + - 31 - + + + + + + + 10 (0000Ah) TEST2 + 16 (00010h) total + DATA + 143 (0008Fh) C0 + 143 (0008Fh) total + + +------------------ A report of unreferenced symbol names lists modules + Report of that define public names not referenced in other + unreferenced modules. Such a symbol is either: +symbol names (/RU) +------------------ o referenced only from within the defining module and + does not need to be defined as a public symbol (in + that case, if the module is in C, the keyword static + should be added to the definition; if the module is + in TASM, just remove the public definition). + + o never used (therefore, it can be deleted to save code + or data space). + + If you enter this on the command line: + + OBJXREF /RU test1 test2 + + OBJXREF generates a report that looks like this: + + MODULE: TEST2 defines the unreferenced symbol _i2. + + +------------------ If you enter /RV on the command line, OBJXREF generates + Verbose reporting one report of each type. + (/RV) +------------------ +Examples of how to ======================================================= + use OBJXREF + These examples assume that the application files are in + the current directory of the default drive and that the + Turbo C++ startup files (C0x.OBJ) and the library files + are in the \TC\LIB directory. + + +------------------ C>OBJXREF \TC\lib\c0l test1 test2 \TC\lib\cl.lib + Example 1 +------------------ In this example, the TEST1.OBJ and TEST2.OBJ files and + the Turbo C++ startup file \TC\LIB\C0L.OBJ and the + library file \TC\LIB\CL.LIB are specified. Since no + report type is specified, the resulting report is the + + + + + - 32 - + + + + + + + default report by reference, listing public names and + the modules that reference them. + + +------------------ C>OBJXREF /RV /Ltest1.arf + Example 2 +------------------ The TLINK response file TEST1.ARF contains the same + list of files as the command line in Example 1. The /RV + option is specified, so a report of every type will be + generated. TEST1.ARF contains + + \TC\lib\c0l + test1 test2 + test1.exe + test1.map + \TC\lib\cl + + +------------------ C>OBJXREF /RC B:c0s /Ptest1 @libs + Example 3 +------------------ The Turbo C++ project file TEST1.PRJ specifies + TEST1.OBJ and TEST2.OBJ. The response file @libs + specifies libraries on a disk in the B drive. TEST1.PRJ + contains + + test1 + test2.c + + The file LIBS contains + + b:maths.lib b:emu.lib b:cs.lib + + The startup and library files specified depend on the + memory model and floating point options used in compil- + ation. The /RC causes a report of class type to be + output. + + +------------------ C>OBJXREF /F /RV \TC\lib\cs.lib + Example 4 +------------------ This example reports on all the modules in the Turbo + C++ library file CS.LIB; OBJXREF can produce useful + reports even when the files specified do not make a + complete program. The /F causes all modules in CS.LIB + file to be included in the report. + + + + + + + - 33 - + + + + + + + OBJXREF error ======================================================= + messages and + warnings OBJXREF generates two sorts of diagnostic messages: + error messages and warnings. + + +------------------ Out of memory + Error messages OBJXREF performs its cross referencing in RAM memory +------------------ and may run out of memory even if TLINK is able to link + the same list of files successfully. When this happens, + OBJXREF aborts. Remove memory resident programs to get + more space, or add more RAM. + + +------------------ WARNING: Unable to open input file + Warnings The input file filename could not be located or opened. +------------------ OBJXREF proceeds to the next file. + + WARNING: Unknown option -