Professional Documents
Culture Documents
Y.MAHIMAMANI
2100030612
S07
ABSTRACT:
Teddy and Tracy like to play a game based on strings. The game is as follows. Initially,
Tracy writes a long random string on a white board. Then, each player starting with Teddy makes
turn alternately. Each turn, the player must erase a contiguous substring that exists in the dictionary.
Of course, the player that can't erase any substring in his turn loses the game, and the other player is
declared the winner. Note that after a substring R is erased, the remaining substring becomes
separated, i.e. they cannot erase a word that occurs partially to the left of R and partially to the
right of R.
SAMPLE INPUT:
Teddy erase code, Tracy erase chef, teddy cannot erase any sub string so teddy loses the
game
SAMPLE OUTPUT:
TOPICS NEEDED:
1.Integer Datatype:
EX: int n;
2.String/character array:
Statements;
{
Statements; }
SYNTAX:
if (condition)
Statement 1;
else
Statement 2;
EX:
If (condition)
Printf (“Teddy”);
Else
Printf (“Tracy”);
TEAM MEMBERS:
2100030612-Y. MAHIMAMANI
2100030620-Y. ROHITHA
2100030593-AISHWARYA
2100030605-VIVEK KUMAR