<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6456446978653192228</id><updated>2011-07-07T17:31:51.447-07:00</updated><category term='Tower of honoi(Math)'/><category term='Queue'/><category term='Sorting'/><category term='Fibonacci Number'/><category term='Graph'/><category term='Josephus problem'/><category term='volium-C1'/><category term='Volium-1'/><category term='Ad Hoc'/><category term='Simulation'/><category term='Dynamic Programming'/><category term='Bit Pattern'/><category term='Math'/><category term='Longest Increasing Sequence[LIS]'/><category term='Math (Big Integer)'/><category term='Combinatorics'/><category term='prime Number'/><title type='text'>RUET: THE SOLUTION OF ACM</title><subtitle type='html'>Rajshahi University of Engineering &amp;amp; Technology</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ruetprogrammer.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ruetprogrammer.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>computer science &amp;amp; Engineering</name><uri>http://www.blogger.com/profile/01145894902967208519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>24</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6456446978653192228.post-738427461912643252</id><published>2009-11-21T14:23:00.000-08:00</published><updated>2009-11-24T13:25:04.211-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Math'/><category scheme='http://www.blogger.com/atom/ns#' term='Simulation'/><title type='text'>100. 3n+1 problem</title><content type='html'>&lt;blockquote&gt;&lt;h2&gt;&lt;span style="color: #0070e8;"&gt;&lt;a href="http://www.blogger.com/post-create.do" name="SECTION0001001000000000000000"&gt;Background&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;Problems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive).  In this problem you will be analyzing a property of an algorithm whose classification is not known for all possible inputs. &lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;h2&gt;&lt;span style="color: #0070e8;"&gt;&lt;a href="http://www.blogger.com/post-create.do" name="SECTION0001002000000000000000"&gt;The Problem&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;Consider the following algorithm: &lt;br /&gt;&lt;pre&gt;&lt;tt&gt; &lt;br /&gt;&lt;br /&gt;		1. 		 input &lt;i&gt;n&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;		2. 		 print &lt;i&gt;n&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;		3. 		 if &lt;i&gt;n&lt;/i&gt; = 1 then STOP&lt;br /&gt;&lt;br /&gt;&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;		4. 		 		 if &lt;i&gt;n&lt;/i&gt; is odd then  &lt;img align="MIDDLE" alt="tex2html_wrap_inline44" height="25" src="http://uva.onlinejudge.org/external/1/100img1.gif" width="95" /&gt; &lt;br /&gt;&lt;br /&gt;&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;		5. 		 		 else  &lt;img align="MIDDLE" alt="tex2html_wrap_inline46" height="27" src="http://uva.onlinejudge.org/external/1/100img2.gif" width="74" /&gt; &lt;br /&gt;&lt;br /&gt;&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;		6. 		 GOTO 2&lt;br /&gt;&lt;br /&gt;&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;Given the input 22, the following sequence of numbers will be printed 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1 &lt;br /&gt;It is conjectured that the algorithm above will terminate (when a 1 is printed) for any integral input value.  Despite the simplicity of the algorithm, it is unknown whether this conjecture is true.  It has been verified, however, for all integers &lt;i&gt;n&lt;/i&gt; such that 0 &amp;lt; &lt;i&gt;n&lt;/i&gt; &amp;lt; 1,000,000 (and, in fact, for many more numbers than this.) &lt;br /&gt;Given an input &lt;i&gt;n&lt;/i&gt;, it is possible to determine the number of numbers printed (including  the 1).  For a given &lt;i&gt;n&lt;/i&gt; this is called the &lt;i&gt;cycle-length&lt;/i&gt; of &lt;i&gt;n&lt;/i&gt;.  In the example above, the cycle length of 22 is 16. &lt;br /&gt;For any two numbers &lt;i&gt;i&lt;/i&gt; and &lt;i&gt;j&lt;/i&gt; you are to determine the maximum cycle length over all numbers between &lt;u&gt; &lt;i&gt;i&lt;/i&gt; and &lt;i&gt;j&lt;/i&gt;. &lt;/u&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;h2&gt;&lt;span style="color: #0070e8;"&gt;&lt;a href="http://www.blogger.com/post-create.do" name="SECTION0001003000000000000000"&gt;The Input&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;The input will consist of a series of pairs of integers &lt;i&gt;i&lt;/i&gt; and &lt;i&gt;j&lt;/i&gt;, one pair of integers per line.  All integers will be less than 1,000,000 and greater than 0. &lt;br /&gt;You should process all pairs of integers and for each pair determine the maximum cycle length over all integers between and including &lt;i&gt;i&lt;/i&gt; and &lt;i&gt;j&lt;/i&gt;. &lt;br /&gt;You can assume that no operation overflows a 32-bit integer. &lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;h2&gt;&lt;span style="color: #0070e8;"&gt;&lt;a href="http://www.blogger.com/post-create.do" name="SECTION0001004000000000000000"&gt;The Output&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;For each pair of input integers &lt;i&gt;i&lt;/i&gt; and &lt;i&gt;j&lt;/i&gt; you should output &lt;i&gt;i&lt;/i&gt;, &lt;i&gt;j&lt;/i&gt;, and the maximum cycle length for integers between and including &lt;i&gt;i&lt;/i&gt; and &lt;i&gt;j&lt;/i&gt;.  These three numbers should be separated by at least one space with all three numbers on one line and with one line of output for each line of input.  The integers &lt;i&gt;i&lt;/i&gt; and &lt;i&gt;j&lt;/i&gt; must appear in the output in the same order in which they appeared in the input and should be followed by the maximum cycle length (on the same line). &lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;h2&gt;&lt;span style="color: #0070e8;"&gt;&lt;a href="http://www.blogger.com/post-create.do" name="SECTION0001005000000000000000"&gt;Sample Input&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;&lt;br /&gt;&lt;pre&gt;1 10&lt;br /&gt;&lt;br /&gt;100 200&lt;br /&gt;&lt;br /&gt;201 210&lt;br /&gt;&lt;br /&gt;900 1000&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;h2&gt;&lt;span style="color: #0070e8;"&gt;&lt;a href="http://www.blogger.com/post-create.do" name="SECTION0001006000000000000000"&gt;Sample Output&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;&lt;br /&gt;&lt;pre&gt;1 10 20&lt;br /&gt;&lt;br /&gt;100 200 125&lt;br /&gt;&lt;br /&gt;201 210 89&lt;br /&gt;&lt;br /&gt;900 1000 174&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&amp;nbsp;&lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type"&gt;&lt;/meta&gt;&lt;meta content="Word.Document" name="ProgId"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Generator"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Originator"&gt;&lt;/meta&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;&lt;br /&gt;&lt;!--&lt;br /&gt; /* Font Definitions */&lt;br /&gt; @font-face&lt;br /&gt;	{font-family:"Cambria Math";&lt;br /&gt;	panose-1:2 4 5 3 5 4 6 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:roman;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1107304683 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:Calibri;&lt;br /&gt;	panose-1:2 15 5 2 2 2 4 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:swiss;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1073750139 0 0 159 0;}&lt;br /&gt; /* Style Definitions */&lt;br /&gt; p.MsoNormal, li.MsoNormal, div.MsoNormal&lt;br /&gt;	{mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-parent:"";&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:0in;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-language:AR-SA;}&lt;br /&gt;p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph&lt;br /&gt;	{mso-style-priority:34;&lt;br /&gt;	mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:.5in;&lt;br /&gt;	mso-add-space:auto;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-language:AR-SA;}&lt;br /&gt;p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst&lt;br /&gt;	{mso-style-priority:34;&lt;br /&gt;	mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-type:export-only;&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:0in;&lt;br /&gt;	margin-left:.5in;&lt;br /&gt;	margin-bottom:.0001pt;&lt;br /&gt;	mso-add-space:auto;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-language:AR-SA;}&lt;br /&gt;p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle&lt;br /&gt;	{mso-style-priority:34;&lt;br /&gt;	mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-type:export-only;&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:0in;&lt;br /&gt;	margin-left:.5in;&lt;br /&gt;	margin-bottom:.0001pt;&lt;br /&gt;	mso-add-space:auto;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-language:AR-SA;}&lt;br /&gt;p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast&lt;br /&gt;	{mso-style-priority:34;&lt;br /&gt;	mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-type:export-only;&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:.5in;&lt;br /&gt;	mso-add-space:auto;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-language:AR-SA;}&lt;br /&gt;.MsoChpDefault&lt;br /&gt;	{mso-style-type:export-only;&lt;br /&gt;	mso-default-props:yes;&lt;br /&gt;	font-size:10.0pt;&lt;br /&gt;	mso-ansi-font-size:10.0pt;&lt;br /&gt;	mso-bidi-font-size:10.0pt;&lt;br /&gt;	mso-ascii-font-family:Calibri;&lt;br /&gt;	mso-hansi-font-family:Calibri;}&lt;br /&gt;@page Section1&lt;br /&gt;	{size:8.5in 11.0in;&lt;br /&gt;	margin:1.0in 1.0in 1.0in 1.0in;&lt;br /&gt;	mso-header-margin:.5in;&lt;br /&gt;	mso-footer-margin:.5in;&lt;br /&gt;	mso-paper-source:0;}&lt;br /&gt;div.Section1&lt;br /&gt;	{page:Section1;}&lt;br /&gt; /* List Definitions */&lt;br /&gt; @list l0&lt;br /&gt;	{mso-list-id:1468620379;&lt;br /&gt;	mso-list-type:hybrid;&lt;br /&gt;	mso-list-template-ids:-1411451228 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}&lt;br /&gt;@list l0:level1&lt;br /&gt;	{mso-level-tab-stop:none;&lt;br /&gt;	mso-level-number-position:left;&lt;br /&gt;	text-indent:-.25in;}&lt;br /&gt;ol&lt;br /&gt;	{margin-bottom:0in;}&lt;br /&gt;ul&lt;br /&gt;	{margin-bottom:0in;}&lt;br /&gt;--&gt;&lt;br /&gt;&lt;/style&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="color: #990000; font-size: large;"&gt;&lt;b&gt;Discussion:&lt;/b&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp; Presented by rizoan toufiq&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpFirst" style="line-height: normal; margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-size: small;"&gt;1.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;J can less I; i.e j&lt;i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpLast" style="line-height: normal; margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;i&gt;&lt;span style="font-size: small;"&gt;2.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;I=j&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;/div&gt;&lt;i&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; line-height: 115%;"&gt;The order of i and j in output must be the same as the input, even when j is smaller than i.&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type"&gt;&lt;/meta&gt;&lt;meta content="Word.Document" name="ProgId"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Generator"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Originator"&gt;&lt;/meta&gt;&lt;i&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;&lt;br /&gt;&lt;!--&lt;br /&gt; /* Font Definitions */&lt;br /&gt; @font-face&lt;br /&gt;	{font-family:"Cambria Math";&lt;br /&gt;	panose-1:2 4 5 3 5 4 6 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:roman;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1107304683 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:Calibri;&lt;br /&gt;	panose-1:2 15 5 2 2 2 4 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:swiss;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1073750139 0 0 159 0;}&lt;br /&gt; /* Style Definitions */&lt;br /&gt; p.MsoNormal, li.MsoNormal, div.MsoNormal&lt;br /&gt;	{mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-parent:"";&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:0in;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-language:AR-SA;}&lt;br /&gt;h2&lt;br /&gt;	{mso-style-priority:9;&lt;br /&gt;	mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-link:"Heading 2 Char";&lt;br /&gt;	mso-margin-top-alt:auto;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	mso-margin-bottom-alt:auto;&lt;br /&gt;	margin-left:0in;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	mso-outline-level:2;&lt;br /&gt;	font-size:18.0pt;&lt;br /&gt;	font-family:"Times New Roman","serif";&lt;br /&gt;	mso-bidi-language:AR-SA;&lt;br /&gt;	font-weight:bold;}&lt;br /&gt;p&lt;br /&gt;	{mso-style-noshow:yes;&lt;br /&gt;	mso-style-priority:99;&lt;br /&gt;	mso-margin-top-alt:auto;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	mso-margin-bottom-alt:auto;&lt;br /&gt;	margin-left:0in;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:12.0pt;&lt;br /&gt;	font-family:"Times New Roman","serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-language:AR-SA;}&lt;br /&gt;span.Heading2Char&lt;br /&gt;	{mso-style-name:"Heading 2 Char";&lt;br /&gt;	mso-style-priority:9;&lt;br /&gt;	mso-style-unhide:no;&lt;br /&gt;	mso-style-locked:yes;&lt;br /&gt;	mso-style-link:"Heading 2";&lt;br /&gt;	mso-ansi-font-size:18.0pt;&lt;br /&gt;	mso-bidi-font-size:18.0pt;&lt;br /&gt;	font-family:"Times New Roman","serif";&lt;br /&gt;	mso-ascii-font-family:"Times New Roman";&lt;br /&gt;	mso-hansi-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-language:AR-SA;&lt;br /&gt;	font-weight:bold;}&lt;br /&gt;span.mw-headline&lt;br /&gt;	{mso-style-name:mw-headline;&lt;br /&gt;	mso-style-unhide:no;}&lt;br /&gt;.MsoChpDefault&lt;br /&gt;	{mso-style-type:export-only;&lt;br /&gt;	mso-default-props:yes;&lt;br /&gt;	font-size:10.0pt;&lt;br /&gt;	mso-ansi-font-size:10.0pt;&lt;br /&gt;	mso-bidi-font-size:10.0pt;&lt;br /&gt;	mso-ascii-font-family:Calibri;&lt;br /&gt;	mso-hansi-font-family:Calibri;}&lt;br /&gt;@page Section1&lt;br /&gt;	{size:8.5in 11.0in;&lt;br /&gt;	margin:1.0in 1.0in 1.0in 1.0in;&lt;br /&gt;	mso-header-margin:.5in;&lt;br /&gt;	mso-footer-margin:.5in;&lt;br /&gt;	mso-paper-source:0;}&lt;br /&gt;div.Section1&lt;br /&gt;	{page:Section1;}&lt;br /&gt;--&gt;&lt;br /&gt;&lt;/style&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;/i&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;h2 style="margin: 0in 0in 0.0001pt;"&gt;&lt;i&gt;&lt;span style="font-size: small;"&gt;/*****Optimizations **************&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/h2&gt;&lt;h2 style="margin: 0in 0in 0.0001pt;"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;i&gt;&lt;span style="font-size: small;"&gt;To get the problem in good time you must create an array with size 1000000. Then using recursion with memoization try to not compute any value more than once. This will help you solve it in about 0.200 sec. */&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/h2&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type"&gt;&lt;/meta&gt;&lt;meta content="Word.Document" name="ProgId"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Generator"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Originator"&gt;&lt;/meta&gt;&lt;i&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;&lt;br /&gt;&lt;!--&lt;br /&gt; /* Font Definitions */&lt;br /&gt; @font-face&lt;br /&gt;	{font-family:"Cambria Math";&lt;br /&gt;	panose-1:2 4 5 3 5 4 6 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:roman;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1107304683 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:Calibri;&lt;br /&gt;	panose-1:2 15 5 2 2 2 4 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:swiss;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1073750139 0 0 159 0;}&lt;br /&gt; /* Style Definitions */&lt;br /&gt; p.MsoNormal, li.MsoNormal, div.MsoNormal&lt;br /&gt;	{mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-parent:"";&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:0in;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-language:AR-SA;}&lt;br /&gt;.MsoChpDefault&lt;br /&gt;	{mso-style-type:export-only;&lt;br /&gt;	mso-default-props:yes;&lt;br /&gt;	font-size:10.0pt;&lt;br /&gt;	mso-ansi-font-size:10.0pt;&lt;br /&gt;	mso-bidi-font-size:10.0pt;&lt;br /&gt;	mso-ascii-font-family:Calibri;&lt;br /&gt;	mso-hansi-font-family:Calibri;}&lt;br /&gt;@page Section1&lt;br /&gt;	{size:8.5in 11.0in;&lt;br /&gt;	margin:1.0in 1.0in 1.0in 1.0in;&lt;br /&gt;	mso-header-margin:.5in;&lt;br /&gt;	mso-footer-margin:.5in;&lt;br /&gt;	mso-paper-source:0;}&lt;br /&gt;div.Section1&lt;br /&gt;	{page:Section1;}&lt;br /&gt;--&gt;&lt;br /&gt;&lt;/style&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;/i&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div class="MsoNormal" style="color: #cc0000; margin-bottom: 0.0001pt;"&gt;&lt;i&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;&lt;span style="line-height: 115%;"&gt;Code: Brut force : RT: 0.700&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div style="color: blue; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;DOWNLOAD Code : &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://rt06.awardspace.com/Code/100.cpp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s320/download.gif" /&gt;&lt;/a&gt;&lt;a href="http://www.blogger.com/goog_1258838863961"&gt;&lt;br /&gt;&lt;/a&gt; &lt;br /&gt;&lt;/div&gt;&lt;a href="http://rt06.awardspace.com/Code/100.cpp"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-size: x-large;"&gt;Download to click&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type"&gt;&lt;/meta&gt;&lt;meta content="Word.Document" name="ProgId"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Generator"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Originator"&gt;&lt;/meta&gt; &lt;i&gt;   &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;&lt;br /&gt;&lt;!--&lt;br /&gt; /* Font Definitions */&lt;br /&gt; @font-face&lt;br /&gt;	{font-family:"Cambria Math";&lt;br /&gt;	panose-1:2 4 5 3 5 4 6 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:roman;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1107304683 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:Calibri;&lt;br /&gt;	panose-1:2 15 5 2 2 2 4 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:swiss;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1073750139 0 0 159 0;}&lt;br /&gt; /* Style Definitions */&lt;br /&gt; p.MsoNormal, li.MsoNormal, div.MsoNormal&lt;br /&gt;	{mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-parent:"";&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:0in;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-language:AR-SA;}&lt;br /&gt;.MsoChpDefault&lt;br /&gt;	{mso-style-type:export-only;&lt;br /&gt;	mso-default-props:yes;&lt;br /&gt;	font-size:10.0pt;&lt;br /&gt;	mso-ansi-font-size:10.0pt;&lt;br /&gt;	mso-bidi-font-size:10.0pt;&lt;br /&gt;	mso-ascii-font-family:Calibri;&lt;br /&gt;	mso-hansi-font-family:Calibri;}&lt;br /&gt;@page Section1&lt;br /&gt;	{size:8.5in 11.0in;&lt;br /&gt;	margin:1.0in 1.0in 1.0in 1.0in;&lt;br /&gt;	mso-header-margin:.5in;&lt;br /&gt;	mso-footer-margin:.5in;&lt;br /&gt;	mso-paper-source:0;}&lt;br /&gt;div.Section1&lt;br /&gt;	{page:Section1;}&lt;br /&gt;--&gt;&lt;br /&gt;&lt;/style&gt;&amp;nbsp; &lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type"&gt;&lt;/meta&gt;&lt;meta content="Word.Document" name="ProgId"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Generator"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Originator"&gt;&lt;/meta&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;&lt;br /&gt;&lt;!--&lt;br /&gt; /* Font Definitions */&lt;br /&gt; @font-face&lt;br /&gt;	{font-family:"Cambria Math";&lt;br /&gt;	panose-1:2 4 5 3 5 4 6 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:roman;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1107304683 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:Calibri;&lt;br /&gt;	panose-1:2 15 5 2 2 2 4 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:swiss;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1073750139 0 0 159 0;}&lt;br /&gt; /* Style Definitions */&lt;br /&gt; p.MsoNormal, li.MsoNormal, div.MsoNormal&lt;br /&gt;	{mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-parent:"";&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:0in;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-language:AR-SA;}&lt;br /&gt;.MsoChpDefault&lt;br /&gt;	{mso-style-type:export-only;&lt;br /&gt;	mso-default-props:yes;&lt;br /&gt;	font-size:10.0pt;&lt;br /&gt;	mso-ansi-font-size:10.0pt;&lt;br /&gt;	mso-bidi-font-size:10.0pt;&lt;br /&gt;	mso-ascii-font-family:Calibri;&lt;br /&gt;	mso-hansi-font-family:Calibri;}&lt;br /&gt;@page Section1&lt;br /&gt;	{size:8.5in 11.0in;&lt;br /&gt;	margin:1.0in 1.0in 1.0in 1.0in;&lt;br /&gt;	mso-header-margin:.5in;&lt;br /&gt;	mso-footer-margin:.5in;&lt;br /&gt;	mso-paper-source:0;}&lt;br /&gt;div.Section1&lt;br /&gt;	{page:Section1;}&lt;br /&gt;--&gt;&lt;br /&gt;&lt;/style&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;/i&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; line-height: 115%;"&gt;&lt;i&gt;&lt;span style="color: #990000; font-size: large;"&gt;&lt;b&gt;Optimal solution: RT: .064sec[recursion]&lt;/b&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div style="color: blue; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;DOWNLOAD Code : &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://rt06.awardspace.com/Code/perfectcode.c" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s320/download.gif" /&gt;&lt;/a&gt;&lt;a href="http://www.blogger.com/goog_1258838863961"&gt;&lt;br /&gt;&lt;/a&gt; &lt;br /&gt;&lt;/div&gt;&lt;a href="http://rt06.awardspace.com/Code/perfectcode.c"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-size: x-large;"&gt;Download to click&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6456446978653192228-738427461912643252?l=ruetprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ruetprogrammer.blogspot.com/feeds/738427461912643252/comments/default' title='মন্তব্যগুলি পোস্ট করুন'/><link rel='replies' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/100-3n1-problem.html#comment-form' title='0টি মন্তব্য'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/738427461912643252'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/738427461912643252'/><link rel='alternate' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/100-3n1-problem.html' title='100. 3n+1 problem'/><author><name>computer science &amp;amp; Engineering</name><uri>http://www.blogger.com/profile/01145894902967208519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s72-c/download.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6456446978653192228.post-1790420251601929806</id><published>2009-11-21T14:13:00.000-08:00</published><updated>2009-11-24T13:25:04.229-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Math'/><category scheme='http://www.blogger.com/atom/ns#' term='volium-C1'/><title type='text'>10055 - Hashmat the Brave Warrior</title><content type='html'>&lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type"&gt;&lt;/meta&gt;&lt;meta content="Word.Document" name="ProgId"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Generator"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Originator"&gt;&lt;/meta&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;&lt;br /&gt;&lt;!--&lt;br /&gt; /* Font Definitions */&lt;br /&gt; @font-face&lt;br /&gt;	{font-family:Wingdings;&lt;br /&gt;	panose-1:5 0 0 0 0 0 0 0 0 0;&lt;br /&gt;	mso-font-charset:2;&lt;br /&gt;	mso-generic-font-family:auto;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:0 268435456 0 0 -2147483648 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:"Cambria Math";&lt;br /&gt;	panose-1:2 4 5 3 5 4 6 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:roman;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1107304683 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:Calibri;&lt;br /&gt;	panose-1:2 15 5 2 2 2 4 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:swiss;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1073750139 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:"Lucida Handwriting";&lt;br /&gt;	panose-1:3 1 1 1 1 1 1 1 1 1;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:script;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:3 0 0 0 1 0;}&lt;br /&gt; /* Style Definitions */&lt;br /&gt; p.MsoNormal, li.MsoNormal, div.MsoNormal&lt;br /&gt;	{mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-parent:"";&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:0in;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-language:AR-SA;}&lt;br /&gt;.MsoChpDefault&lt;br /&gt;	{mso-style-type:export-only;&lt;br /&gt;	mso-default-props:yes;&lt;br /&gt;	font-size:10.0pt;&lt;br /&gt;	mso-ansi-font-size:10.0pt;&lt;br /&gt;	mso-bidi-font-size:10.0pt;&lt;br /&gt;	mso-ascii-font-family:Calibri;&lt;br /&gt;	mso-hansi-font-family:Calibri;}&lt;br /&gt;@page Section1&lt;br /&gt;	{size:8.5in 11.0in;&lt;br /&gt;	margin:1.0in 1.0in 1.0in 1.0in;&lt;br /&gt;	mso-header-margin:.5in;&lt;br /&gt;	mso-footer-margin:.5in;&lt;br /&gt;	mso-paper-source:0;}&lt;br /&gt;div.Section1&lt;br /&gt;	{page:Section1;}&lt;br /&gt;--&gt;&lt;br /&gt;&lt;/style&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;Hashmat is a brave warrior who with his group of young soldiers moves from one place to another to fight against his opponents. Before fighting he just calculates one thing, the difference between his soldier number and the opponent's soldier number. From this difference he decides whether to fight or not. Hashmat's soldier number is never greater than his opponent. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;Input&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;The input contains two integer numbers in every line. These two numbers in each line denotes the number of soldiers in Hashmat's army and his opponent's army or vice versa. The input numbers are not greater than 2^32. Input is terminated by End of File.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;Output&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&amp;nbsp;For each line of input, print the difference of number of soldiers between Hashmat's army and his opponent's army. Each output should be in seperate line.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;Sample Input:&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;10 12&lt;br /&gt;10 14&lt;br /&gt;100 200&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;Sample Output:&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&lt;span style="font-size: small;"&gt;2&lt;br /&gt;4&lt;br /&gt;100&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 24pt; line-height: 115%;"&gt;JUST FUN!!!!!&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 24pt; line-height: 115%;"&gt;TICS &lt;/span&gt;&lt;span style="font-family: Wingdings; font-size: 24pt; line-height: 115%;"&gt;J&lt;/span&gt;&lt;span style="font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 24pt; line-height: 115%;"&gt; use Unsigned int &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 24pt; line-height: 115%;"&gt;CODE:-D:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 14pt; line-height: 115%;"&gt;#include&lt;stdio.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/stdio.h&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 14pt; line-height: 115%;"&gt;int main(){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 14pt; line-height: 115%;"&gt;&amp;nbsp; unsigned long int a,b;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 14pt; line-height: 115%;"&gt;&amp;nbsp; /*freopen("1.in","r",stdin);*/&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 14pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;while(scanf("%lu %lu",&amp;amp;a,&amp;amp;b)==2){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 14pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(a&amp;gt;b)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 14pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("%lu\n",(a-b));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 14pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 14pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; printf("%lu\n",b-a);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 14pt; line-height: 115%;"&gt;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 14pt; line-height: 115%;"&gt;&amp;nbsp; return 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 14pt; line-height: 115%;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6456446978653192228-1790420251601929806?l=ruetprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ruetprogrammer.blogspot.com/feeds/1790420251601929806/comments/default' title='মন্তব্যগুলি পোস্ট করুন'/><link rel='replies' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/10055-hashmat-brave-warrior.html#comment-form' title='0টি মন্তব্য'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/1790420251601929806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/1790420251601929806'/><link rel='alternate' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/10055-hashmat-brave-warrior.html' title='10055 - Hashmat the Brave Warrior'/><author><name>computer science &amp;amp; Engineering</name><uri>http://www.blogger.com/profile/01145894902967208519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6456446978653192228.post-6829623003802385157</id><published>2009-11-21T13:58:00.000-08:00</published><updated>2009-11-24T13:25:04.240-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Volium-1'/><category scheme='http://www.blogger.com/atom/ns#' term='Longest Increasing Sequence[LIS]'/><category scheme='http://www.blogger.com/atom/ns#' term='Sorting'/><title type='text'>103 Stacking Boxes</title><content type='html'>&lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type"&gt;&lt;/meta&gt;&lt;meta content="Word.Document" name="ProgId"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Generator"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Originator"&gt;&lt;/meta&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;&lt;br /&gt;&lt;!--&lt;br /&gt; /* Font Definitions */&lt;br /&gt; @font-face&lt;br /&gt;	{font-family:Vrinda;&lt;br /&gt;	panose-1:1 1 6 0 1 1 1 1 1 1;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:auto;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:65539 0 0 0 1 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:"Cambria Math";&lt;br /&gt;	panose-1:2 4 5 3 5 4 6 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:roman;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1107304683 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:Calibri;&lt;br /&gt;	panose-1:2 15 5 2 2 2 4 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:swiss;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1073750139 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:Consolas;&lt;br /&gt;	panose-1:2 11 6 9 2 2 4 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:modern;&lt;br /&gt;	mso-font-pitch:fixed;&lt;br /&gt;	mso-font-signature:-1610611985 1073750091 0 0 159 0;}&lt;br /&gt; /* Style Definitions */&lt;br /&gt; p.MsoNormal, li.MsoNormal, div.MsoNormal&lt;br /&gt;	{mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-parent:"";&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:0in;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	mso-bidi-font-size:14.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:Vrinda;}&lt;br /&gt;.MsoChpDefault&lt;br /&gt;	{mso-style-type:export-only;&lt;br /&gt;	mso-default-props:yes;&lt;br /&gt;	font-size:10.0pt;&lt;br /&gt;	mso-ansi-font-size:10.0pt;&lt;br /&gt;	mso-bidi-font-size:10.0pt;&lt;br /&gt;	mso-ascii-font-family:Calibri;&lt;br /&gt;	mso-hansi-font-family:Calibri;&lt;br /&gt;	mso-bidi-font-family:Vrinda;}&lt;br /&gt;@page Section1&lt;br /&gt;	{size:8.5in 11.0in;&lt;br /&gt;	margin:1.0in 1.0in 1.0in 1.0in;&lt;br /&gt;	mso-header-margin:.5in;&lt;br /&gt;	mso-footer-margin:.5in;&lt;br /&gt;	mso-paper-source:0;}&lt;br /&gt;div.Section1&lt;br /&gt;	{page:Section1;}&lt;br /&gt;--&gt;&lt;br /&gt;&lt;/style&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: Consolas; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/b&gt; Longest Increasing Subsequence&lt;b&gt;&lt;span style="font-family: Consolas; font-size: 10pt; line-height: 115%;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: center;"&gt;&lt;b&gt;&lt;span style="font-family: Consolas; font-size: 10pt; line-height: 115%;"&gt;According to Arefin book&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: Consolas; font-size: 10pt; line-height: 115%;"&gt;Input:&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Consolas; font-size: 10pt; line-height: 115%;"&gt; Given a sequence &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: Consolas; font-size: 10pt; line-height: 115%;"&gt;Output: &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Consolas; font-size: 10pt; line-height: 115%;"&gt;The longest subsequence of the given sequence such that all values in this &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 10pt; line-height: 115%;"&gt;longest&amp;nbsp; subsequence is strictly increasing/decreasing. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: Consolas; font-size: 10pt; line-height: 115%;"&gt;O(N^2) DP solution for LIS problem (this code check for increasing values): &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" height="92" style="border-collapse: collapse; border: medium none; width: 463px;"&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;   &lt;td style="border: 1pt solid black; padding: 0in 5.4pt; width: 6.65in;" valign="top" width="638"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 10pt;"&gt;for i = 1 to   total-1 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 10pt;"&gt;&amp;nbsp; for j = i+1 to total &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if height[j] &amp;gt; height[i] then &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if length[i] + 1 &amp;gt; length[j] then &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; length[j] = length[i] + 1 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; predecessor[j] = i &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 10pt; line-height: 115%;"&gt;Example of LIS &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 10pt; line-height: 115%;"&gt;height sequence: 1,6,2,3,5 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 10pt; line-height: 115%;"&gt;length initially: [1,1,1,1,1] - because max length is at least 1 rite... &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 10pt; line-height: 115%;"&gt;predecessor initially: [nil,nil,nil,nil,nil] - assume no predecessor so far&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" height="188" style="border-collapse: collapse; border: medium none; width: 482px;"&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr style="height: 139.9pt;"&gt;   &lt;td style="border: 1pt solid black; height: 139.9pt; padding: 0in 5.4pt; width: 6.65in;" valign="top" width="638"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 10pt;"&gt;After first loop   of j:&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 10pt;"&gt;&amp;nbsp; length: [1,2,2,2,2], because 6,2,3,5 are   all &amp;gt; 1 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 10pt;"&gt;&amp;nbsp; predecessor: [nil,1,1,1,1] &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 10pt;"&gt;After second loop   of j: (No change) &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 10pt;"&gt;&amp;nbsp; length: [1,2,2,2,2], because 2,3,5 are all   &amp;lt; 6 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 10pt;"&gt;&amp;nbsp; predecessor: [nil,1,1,1,1] &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 10pt;"&gt;After third loop:   &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 10pt;"&gt;&amp;nbsp; length: [1,2,2,3,3], because 3,5 are all   &amp;gt; 2 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 10pt;"&gt;&amp;nbsp; predecessor: [nil,1,1,3,3] &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 10pt;"&gt;&amp;nbsp; After fourth loop: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 10pt;"&gt;&amp;nbsp; length: [1,2,2,3,4], because 5 &amp;gt; 3 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 10pt;"&gt;&amp;nbsp; predecessor: [nil,1,1,3,4]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div style="color: blue; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;DOWNLOAD Code : &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://rt06.awardspace.com/Code/arefin.c" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s320/download.gif" /&gt;&lt;/a&gt;&lt;a href="http://www.blogger.com/goog_1258838863961"&gt;&lt;br /&gt;&lt;/a&gt; &lt;br /&gt;&lt;/div&gt;&lt;a href="http://rt06.awardspace.com/Code/arefin.c"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-size: x-large;"&gt;Download to click&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;br /&gt;&lt;/blockquote&gt;&amp;nbsp;&lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type"&gt;&lt;/meta&gt;&lt;meta content="Word.Document" name="ProgId"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Generator"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Originator"&gt;&lt;/meta&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;&lt;br /&gt;&lt;!--&lt;br /&gt; /* Font Definitions */&lt;br /&gt; @font-face&lt;br /&gt;	{font-family:Vrinda;&lt;br /&gt;	panose-1:1 1 6 0 1 1 1 1 1 1;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:auto;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:65539 0 0 0 1 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:"Cambria Math";&lt;br /&gt;	panose-1:2 4 5 3 5 4 6 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:roman;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1107304683 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:Calibri;&lt;br /&gt;	panose-1:2 15 5 2 2 2 4 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:swiss;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1073750139 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:Consolas;&lt;br /&gt;	panose-1:2 11 6 9 2 2 4 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:modern;&lt;br /&gt;	mso-font-pitch:fixed;&lt;br /&gt;	mso-font-signature:-1610611985 1073750091 0 0 159 0;}&lt;br /&gt; /* Style Definitions */&lt;br /&gt; p.MsoNormal, li.MsoNormal, div.MsoNormal&lt;br /&gt;	{mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-parent:"";&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:0in;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	mso-bidi-font-size:14.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:Vrinda;}&lt;br /&gt;.MsoChpDefault&lt;br /&gt;	{mso-style-type:export-only;&lt;br /&gt;	mso-default-props:yes;&lt;br /&gt;	font-size:10.0pt;&lt;br /&gt;	mso-ansi-font-size:10.0pt;&lt;br /&gt;	mso-bidi-font-size:10.0pt;&lt;br /&gt;	mso-ascii-font-family:Calibri;&lt;br /&gt;	mso-hansi-font-family:Calibri;&lt;br /&gt;	mso-bidi-font-family:Vrinda;}&lt;br /&gt;@page Section1&lt;br /&gt;	{size:8.5in 11.0in;&lt;br /&gt;	margin:1.0in 1.0in 1.0in 1.0in;&lt;br /&gt;	mso-header-margin:.5in;&lt;br /&gt;	mso-footer-margin:.5in;&lt;br /&gt;	mso-paper-source:0;}&lt;br /&gt;div.Section1&lt;br /&gt;	{page:Section1;}&lt;br /&gt;--&gt;&lt;br /&gt;&lt;/style&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div align="center" class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: center;"&gt;&lt;span style="font-family: Consolas; font-size: 10pt; line-height: 115%;"&gt;&lt;span style="font-size: large;"&gt;&lt;a href="http://www.algorithmist.com/index.php/Longest_Increasing_Subsequence"&gt;According to Algorithmist &lt;/a&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 10pt; line-height: 115%;"&gt;Algorithm:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" height="194" style="border-collapse: collapse; border: medium none; width: 491px;"&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;   &lt;td style="border: 1pt solid black; padding: 0in 5.4pt; width: 6.65in;" valign="top" width="638"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;function lis_length( a )&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; n&amp;nbsp;:= a.length&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; q&amp;nbsp;:= new Array(n)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for k from 1 to n:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; max&amp;nbsp;:= 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for j from 1 to k-1, if a[k] &amp;gt;   a[j]:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if q[j] &amp;gt; max, then set max =   q[j].&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; q[k]&amp;nbsp;:= max + 1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; max&amp;nbsp;:= 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for i from 1 to n:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if q[i] &amp;gt; max, then set max =   q[i].&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return max;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div style="color: blue; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;DOWNLOAD C CODE: &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://rt06.awardspace.com/Code/Longest%20Increasing%20Subsequence.c" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s320/download.gif" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div style="color: blue; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;DOWNLOAD CPP CODE : &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://rt06.awardspace.com/Code/Longest%20Increasing%20Subsequence.cpp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s320/download.gif" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="http://rt06.awardspace.com/Code/Longest%20Increasing%20Subsequence.cpp"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-size: x-large;"&gt;Download to click&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;b style="color: #0b5394;"&gt;&lt;span style="color: #3d85c6; font-size: x-large;"&gt;103 Stacking Boxes&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;blockquote&gt;&lt;h2&gt;&lt;span style="color: #0070e8;"&gt;&lt;a href="http://www.blogger.com/post-create.g?blogID=1161585120556240042" name="SECTION0001001000000000000000"&gt;Background&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;&lt;/blockquote&gt;Some concepts in Mathematics and Computer Science are simple in one or two dimensions but become more complex when extended to arbitrary dimensions.  Consider solving differential equations in several dimensions and analyzing the topology of an &lt;i&gt;n&lt;/i&gt;-dimensional hypercube.  The former is much more complicated than its one dimensional relative while the latter bears a remarkable resemblance to its ``lower-class'' cousin. &lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;h2&gt;&lt;span style="color: #0070e8;"&gt;&lt;a href="http://www.blogger.com/post-create.g?blogID=1161585120556240042" name="SECTION0001002000000000000000"&gt;The Problem&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;Consider an &lt;i&gt;n&lt;/i&gt;-dimensional ``box'' given by its dimensions.  In two dimensions the box (2,3) might represent a box with length 2 units and width 3 units.  In three dimensions the box (4,8,9) can represent a box  &lt;img align="MIDDLE" alt="tex2html_wrap_inline40" height="24" src="http://uva.onlinejudge.org/external/1/103img1.gif" width="68" /&gt;  (length, width, and height).  In 6 dimensions it is, perhaps, unclear what the box (4,5,6,7,8,9) represents; but we can analyze properties of the box such as the sum of its dimensions. &lt;br /&gt;In this problem you will analyze a property of a group of &lt;i&gt;n&lt;/i&gt;-dimensional boxes. You are to determine the longest &lt;i&gt;nesting string&lt;/i&gt; of boxes, that is a sequence of boxes  &lt;img align="MIDDLE" alt="tex2html_wrap_inline44" height="25" src="http://uva.onlinejudge.org/external/1/103img2.gif" width="91" /&gt;  such that each box  &lt;img align="MIDDLE" alt="tex2html_wrap_inline46" height="25" src="http://uva.onlinejudge.org/external/1/103img3.gif" width="11" /&gt;  nests in box  &lt;img align="MIDDLE" alt="tex2html_wrap_inline48" height="26" src="http://uva.onlinejudge.org/external/1/103img4.gif" width="28" /&gt;  ( &lt;img align="MIDDLE" alt="tex2html_wrap_inline50" height="27" src="http://uva.onlinejudge.org/external/1/103img5.gif" width="75" /&gt; . &lt;br /&gt;A box D = ( &lt;img align="MIDDLE" alt="tex2html_wrap_inline52" height="25" src="http://uva.onlinejudge.org/external/1/103img6.gif" width="96" /&gt; )  nests in a box E = ( &lt;img align="MIDDLE" alt="tex2html_wrap_inline54" height="17" src="http://uva.onlinejudge.org/external/1/103img7.gif" width="93" /&gt; ) if there is some rearrangement of the  &lt;img align="MIDDLE" alt="tex2html_wrap_inline56" height="25" src="http://uva.onlinejudge.org/external/1/103img8.gif" width="13" /&gt;   such that when rearranged each dimension is less than the corresponding dimension in box E.  This loosely corresponds to turning box D to see if it will fit in box E. However, since any rearrangement suffices, box D can be contorted, not just turned (see examples below). &lt;br /&gt;For example, the box D = (2,6) nests in the box E = (7,3) since D can be rearranged as (6,2) so that each dimension is less than the corresponding dimension in E.  The box D = (9,5,7,3) does NOT nest in the box E = (2,10,6,8) since no rearrangement of D results in a box that satisfies the nesting property, but F = (9,5,7,1) does nest in box E since F can be rearranged as (1,9,5,7) which nests in E. &lt;br /&gt;Formally, we define nesting as follows: box D = ( &lt;img align="MIDDLE" alt="tex2html_wrap_inline52" height="25" src="http://uva.onlinejudge.org/external/1/103img6.gif" width="96" /&gt; ) &lt;i&gt;nests&lt;/i&gt; in  box E = ( &lt;img align="MIDDLE" alt="tex2html_wrap_inline54" height="17" src="http://uva.onlinejudge.org/external/1/103img7.gif" width="93" /&gt; ) if there is a permutation  &lt;img align="BOTTOM" alt="tex2html_wrap_inline62" height="8" src="http://uva.onlinejudge.org/external/1/103img9.gif" width="8" /&gt;  of  &lt;img align="BOTTOM" alt="tex2html_wrap_inline64" height="12" src="http://uva.onlinejudge.org/external/1/103img10.gif" width="44" /&gt;  such that  ( &lt;img align="MIDDLE" alt="tex2html_wrap_inline66" height="26" src="http://uva.onlinejudge.org/external/1/103img11.gif" width="151" /&gt; ) ``fits'' in ( &lt;img align="MIDDLE" alt="tex2html_wrap_inline54" height="17" src="http://uva.onlinejudge.org/external/1/103img7.gif" width="93" /&gt; ) i.e., if  &lt;img align="MIDDLE" alt="tex2html_wrap_inline70" height="26" src="http://uva.onlinejudge.org/external/1/103img12.gif" width="68" /&gt;  for all  &lt;img align="MIDDLE" alt="tex2html_wrap_inline72" height="25" src="http://uva.onlinejudge.org/external/1/103img13.gif" width="70" /&gt; . &lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;h2&gt;&lt;span style="color: #0070e8;"&gt;&lt;a href="http://www.blogger.com/post-create.g?blogID=1161585120556240042" name="SECTION0001003000000000000000"&gt;The Input&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;The input consists of a series of box sequences.  Each box sequence begins with a line consisting of the the number of boxes &lt;i&gt;k&lt;/i&gt; in the sequence followed by the dimensionality of the boxes, &lt;i&gt;n&lt;/i&gt; (on the same line.) &lt;br /&gt;This line is followed by &lt;i&gt;k&lt;/i&gt; lines, one line per box with the &lt;i&gt;n&lt;/i&gt; measurements of each box on one line separated by one or more spaces.  The  &lt;img align="BOTTOM" alt="tex2html_wrap_inline82" height="15" src="http://uva.onlinejudge.org/external/1/103img14.gif" width="18" /&gt;  line in the sequence ( &lt;img align="MIDDLE" alt="tex2html_wrap_inline84" height="26" src="http://uva.onlinejudge.org/external/1/103img15.gif" width="69" /&gt; ) gives the measurements for the  &lt;img align="BOTTOM" alt="tex2html_wrap_inline82" height="15" src="http://uva.onlinejudge.org/external/1/103img14.gif" width="18" /&gt;  box. &lt;br /&gt;There may be several box sequences in the input file. Your program should process all of them and determine, for each sequence, which of the &lt;i&gt;k&lt;/i&gt;  boxes determine the longest nesting string and the length of that nesting string (the number of boxes in the string). &lt;br /&gt;In this problem the maximum dimensionality is 10 and the minimum dimensionality is 1.  The maximum number of boxes in a sequence is 30. &lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;h2&gt;&lt;span style="color: #0070e8;"&gt;&lt;a href="http://www.blogger.com/post-create.g?blogID=1161585120556240042" name="SECTION0001004000000000000000"&gt;The Output&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;For each box sequence in the input file, output the length of the longest nesting string on one line followed on the next line by a list of the boxes that comprise this string in order.  The ``smallest'' or ``innermost'' box of the nesting string should be listed first, the next box (if there is one) should be listed second, etc. &lt;br /&gt;The boxes should be numbered according to the order in which they appeared in the input file (first box is box 1, etc.). &lt;br /&gt;If there is more than one longest nesting string then any one of them can be output. &lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;h2&gt;&lt;span style="color: #0070e8;"&gt;&lt;a href="http://www.blogger.com/post-create.g?blogID=1161585120556240042" name="SECTION0001005000000000000000"&gt;Sample Input&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;&lt;br /&gt;&lt;pre&gt;5 2&lt;br /&gt;&lt;br /&gt;3 7&lt;br /&gt;&lt;br /&gt;8 10&lt;br /&gt;&lt;br /&gt;5 2&lt;br /&gt;&lt;br /&gt;9 11&lt;br /&gt;&lt;br /&gt;21 18&lt;br /&gt;&lt;br /&gt;8 6&lt;br /&gt;&lt;br /&gt;5 2 20 1 30 10&lt;br /&gt;&lt;br /&gt;23 15 7 9 11 3&lt;br /&gt;&lt;br /&gt;40 50 34 24 14 4&lt;br /&gt;&lt;br /&gt;9 10 11 12 13 14&lt;br /&gt;&lt;br /&gt;31 4 18 8 27 17&lt;br /&gt;&lt;br /&gt;44 32 13 19 41 19&lt;br /&gt;&lt;br /&gt;1 2 3 4 5 6&lt;br /&gt;&lt;br /&gt;80 37 47 18 21 9&lt;br /&gt;&lt;br /&gt;10 2&lt;br /&gt;&lt;br /&gt;1 1&lt;br /&gt;&lt;br /&gt;1 2&lt;br /&gt;&lt;br /&gt;1 3&lt;br /&gt;&lt;br /&gt;1 4&lt;br /&gt;&lt;br /&gt;1 5&lt;br /&gt;&lt;br /&gt;1 6&lt;br /&gt;&lt;br /&gt;1 7&lt;br /&gt;&lt;br /&gt;1 8&lt;br /&gt;&lt;br /&gt;1 9&lt;br /&gt;&lt;br /&gt;1 10&lt;br /&gt;&lt;br /&gt;6 1&lt;br /&gt;&lt;br /&gt;6&lt;br /&gt;&lt;br /&gt;8&lt;br /&gt;&lt;br /&gt;10&lt;br /&gt;&lt;br /&gt;4&lt;br /&gt;&lt;br /&gt;5&lt;br /&gt;&lt;br /&gt;4&lt;br /&gt;&lt;br /&gt;30 10&lt;br /&gt;&lt;br /&gt;1 2 3 4 5 6 7 8 9 10&lt;br /&gt;&lt;br /&gt;11 12 13 14 15 16 17 18 19 20&lt;br /&gt;&lt;br /&gt;21 22 23 24 25 26 27 28 29 30&lt;br /&gt;&lt;br /&gt;31 32 33 34 35 36 37 38 39 40&lt;br /&gt;&lt;br /&gt;41 42 43 44 45 46 47 48 49 50&lt;br /&gt;&lt;br /&gt;1 2 3 4 5 6 7 8 9 10&lt;br /&gt;&lt;br /&gt;11 12 13 14 15 16 17 18 19 20&lt;br /&gt;&lt;br /&gt;21 22 23 24 25 26 27 28 29 30&lt;br /&gt;&lt;br /&gt;31 32 33 34 35 36 37 38 39 40&lt;br /&gt;&lt;br /&gt;41 42 43 44 45 46 47 48 49 50&lt;br /&gt;&lt;br /&gt;200 201 202 203 204 205 206 207 208 209 &lt;br /&gt;&lt;br /&gt;100 101 102 103 104 105 106 107 108 109 &lt;br /&gt;&lt;br /&gt;300 301 302 303 304 305 306 307 308 309 &lt;br /&gt;&lt;br /&gt;200 201 202 203 204 205 206 207 208 209 &lt;br /&gt;&lt;br /&gt;100 101 102 103 104 105 106 107 108 109 &lt;br /&gt;&lt;br /&gt;300 301 302 303 304 305 306 307 308 309 &lt;br /&gt;&lt;br /&gt;400 401 402 403 404 405 406 407 408 409 &lt;br /&gt;&lt;br /&gt;500 501 502 503 504 505 506 507 508 509 &lt;br /&gt;&lt;br /&gt;411 412 413 414 415 416 417 418 419 420 &lt;br /&gt;&lt;br /&gt;521 522 523 524 525 526 527 528 529 530&lt;br /&gt;&lt;br /&gt;50 60 70 80 90 50 60 70 80 90&lt;br /&gt;&lt;br /&gt;20 30 40 50 60 70 80 90 10 99&lt;br /&gt;&lt;br /&gt;10 9 8 7 6 5 4 3 2 1&lt;br /&gt;&lt;br /&gt;19 29 39 49 59 69 79 89 95 9&lt;br /&gt;&lt;br /&gt;15 35 25 45 65 55 85 75 93 5&lt;br /&gt;&lt;br /&gt;50 60 70 80 90 50 60 70 80 90&lt;br /&gt;&lt;br /&gt;20 30 40 50 60 70 80 90 10 99&lt;br /&gt;&lt;br /&gt;10 9 8 7 6 5 4 3 2 1&lt;br /&gt;&lt;br /&gt;19 29 39 49 59 69 79 89 95 9&lt;br /&gt;&lt;br /&gt;15 35 25 45 65 55 85 75 93 5&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;h2&gt;&lt;span style="color: #0070e8;"&gt;&lt;a href="http://www.blogger.com/post-create.g?blogID=1161585120556240042" name="SECTION0001006000000000000000"&gt;Sample Output&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;&lt;br /&gt;&lt;pre&gt;5&lt;br /&gt;&lt;br /&gt;3 1 2 4 5 &lt;br /&gt;&lt;br /&gt;4&lt;br /&gt;&lt;br /&gt;7 2 5 6 &lt;br /&gt;&lt;br /&gt;1&lt;br /&gt;&lt;br /&gt;1 &lt;br /&gt;&lt;br /&gt;5&lt;br /&gt;&lt;br /&gt;4 5 1 2 3 &lt;br /&gt;&lt;br /&gt;13&lt;br /&gt;&lt;br /&gt;1 2 3 4 5 21 12 11 13 17 19 18 20 &lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type"&gt;&lt;/meta&gt;&lt;meta content="Word.Document" name="ProgId"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Generator"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Originator"&gt;&lt;/meta&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;&lt;br /&gt;&lt;!--&lt;br /&gt; /* Font Definitions */&lt;br /&gt; @font-face&lt;br /&gt;	{font-family:Vrinda;&lt;br /&gt;	panose-1:1 1 6 0 1 1 1 1 1 1;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:auto;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:65539 0 0 0 1 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:"Cambria Math";&lt;br /&gt;	panose-1:2 4 5 3 5 4 6 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:roman;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1107304683 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:Calibri;&lt;br /&gt;	panose-1:2 15 5 2 2 2 4 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:swiss;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1073750139 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:Consolas;&lt;br /&gt;	panose-1:2 11 6 9 2 2 4 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:modern;&lt;br /&gt;	mso-font-pitch:fixed;&lt;br /&gt;	mso-font-signature:-1610611985 1073750091 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:"Lucida Handwriting";&lt;br /&gt;	panose-1:3 1 1 1 1 1 1 1 1 1;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:script;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:3 0 0 0 1 0;}&lt;br /&gt; /* Style Definitions */&lt;br /&gt; p.MsoNormal, li.MsoNormal, div.MsoNormal&lt;br /&gt;	{mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-parent:"";&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:0in;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	mso-bidi-font-size:14.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:Vrinda;}&lt;br /&gt;.MsoChpDefault&lt;br /&gt;	{mso-style-type:export-only;&lt;br /&gt;	mso-default-props:yes;&lt;br /&gt;	font-size:10.0pt;&lt;br /&gt;	mso-ansi-font-size:10.0pt;&lt;br /&gt;	mso-bidi-font-size:10.0pt;&lt;br /&gt;	mso-ascii-font-family:Calibri;&lt;br /&gt;	mso-hansi-font-family:Calibri;&lt;br /&gt;	mso-bidi-font-family:Vrinda;}&lt;br /&gt;@page Section1&lt;br /&gt;	{size:8.5in 11.0in;&lt;br /&gt;	margin:1.0in 1.0in 1.0in 1.0in;&lt;br /&gt;	mso-header-margin:.5in;&lt;br /&gt;	mso-footer-margin:.5in;&lt;br /&gt;	mso-paper-source:0;}&lt;br /&gt;div.Section1&lt;br /&gt;	{page:Section1;}&lt;br /&gt; /* List Definitions */&lt;br /&gt; @list l0&lt;br /&gt;	{mso-list-id:1775592391;&lt;br /&gt;	mso-list-type:hybrid;&lt;br /&gt;	mso-list-template-ids:182487210 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}&lt;br /&gt;@list l0:level1&lt;br /&gt;	{mso-level-tab-stop:none;&lt;br /&gt;	mso-level-number-position:left;&lt;br /&gt;	text-indent:-.25in;}&lt;br /&gt;ol&lt;br /&gt;	{margin-bottom:0in;}&lt;br /&gt;ul&lt;br /&gt;	{margin-bottom:0in;}&lt;br /&gt;--&gt;&lt;br /&gt;&lt;/style&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #365f91; font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 14pt; line-height: 115%;"&gt;Discussion: Algorithm described by rizoan toufiq&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;ol start="1" style="margin-top: 0in;" type="1"&gt;&lt;li class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"&gt;First Sort dimensions for each box.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"&gt;Then sort the individual box, corresponding sorting the position      of that box.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"&gt;Now apply the LIS[least Increasing Sequence]. In LIS, the parent      box is save in parent[] array.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"&gt;From the Maximum value of inside[] array we find last box which      is include Large box sequence. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"&gt;Then By applying Backtracing algorithm we find reverse large      sequence in an arr[].&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"&gt;Reverse the array&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"&gt;Then we find the corresponding box number.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"&gt;If we use 0 index , then print the box number adding 1 to show      the output.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"&gt;To read it, You will be in trouble…..&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"&gt;So try yourself.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"&gt;Or download the code in Cpp &amp;amp; java both&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type"&gt;&lt;/meta&gt;&lt;meta content="Word.Document" name="ProgId"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Generator"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Originator"&gt;&lt;/meta&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;&lt;br /&gt;&lt;!--&lt;br /&gt; /* Font Definitions */&lt;br /&gt; @font-face&lt;br /&gt;	{font-family:Wingdings;&lt;br /&gt;	panose-1:5 0 0 0 0 0 0 0 0 0;&lt;br /&gt;	mso-font-charset:2;&lt;br /&gt;	mso-generic-font-family:auto;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:0 268435456 0 0 -2147483648 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:Vrinda;&lt;br /&gt;	panose-1:1 1 6 0 1 1 1 1 1 1;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:auto;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:65539 0 0 0 1 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:"Cambria Math";&lt;br /&gt;	panose-1:2 4 5 3 5 4 6 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:roman;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1107304683 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:Calibri;&lt;br /&gt;	panose-1:2 15 5 2 2 2 4 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:swiss;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1073750139 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:Consolas;&lt;br /&gt;	panose-1:2 11 6 9 2 2 4 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:modern;&lt;br /&gt;	mso-font-pitch:fixed;&lt;br /&gt;	mso-font-signature:-1610611985 1073750091 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:"Lucida Handwriting";&lt;br /&gt;	panose-1:3 1 1 1 1 1 1 1 1 1;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:script;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:3 0 0 0 1 0;}&lt;br /&gt; /* Style Definitions */&lt;br /&gt; p.MsoNormal, li.MsoNormal, div.MsoNormal&lt;br /&gt;	{mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-parent:"";&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:0in;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	mso-bidi-font-size:14.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:Vrinda;}&lt;br /&gt;pre&lt;br /&gt;	{mso-style-priority:99;&lt;br /&gt;	mso-style-link:"HTML Preformatted Char";&lt;br /&gt;	margin:0in;&lt;br /&gt;	margin-bottom:.0001pt;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:10.0pt;&lt;br /&gt;	font-family:"Courier New";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";}&lt;br /&gt;span.HTMLPreformattedChar&lt;br /&gt;	{mso-style-name:"HTML Preformatted Char";&lt;br /&gt;	mso-style-priority:99;&lt;br /&gt;	mso-style-unhide:no;&lt;br /&gt;	mso-style-locked:yes;&lt;br /&gt;	mso-style-link:"HTML Preformatted";&lt;br /&gt;	font-family:"Courier New";&lt;br /&gt;	mso-ascii-font-family:"Courier New";&lt;br /&gt;	mso-hansi-font-family:"Courier New";&lt;br /&gt;	mso-bidi-font-family:"Courier New";}&lt;br /&gt;.MsoChpDefault&lt;br /&gt;	{mso-style-type:export-only;&lt;br /&gt;	mso-default-props:yes;&lt;br /&gt;	font-size:10.0pt;&lt;br /&gt;	mso-ansi-font-size:10.0pt;&lt;br /&gt;	mso-bidi-font-size:10.0pt;&lt;br /&gt;	mso-ascii-font-family:Calibri;&lt;br /&gt;	mso-hansi-font-family:Calibri;&lt;br /&gt;	mso-bidi-font-family:Vrinda;}&lt;br /&gt;@page Section1&lt;br /&gt;	{size:8.5in 11.0in;&lt;br /&gt;	margin:1.0in 1.0in 1.0in 1.0in;&lt;br /&gt;	mso-header-margin:.5in;&lt;br /&gt;	mso-footer-margin:.5in;&lt;br /&gt;	mso-paper-source:0;}&lt;br /&gt;div.Section1&lt;br /&gt;	{page:Section1;}&lt;br /&gt;--&gt;&lt;br /&gt;&lt;/style&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"&gt;&lt;span style="color: #cc0000; font-size: large;"&gt;More details: described by rizoan Toufiq&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"&gt;Input:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;pre&gt;8 6&lt;/pre&gt;&lt;pre&gt;5 2 20 1 30 10&lt;/pre&gt;&lt;pre&gt;23 15 7 9 11 3&lt;/pre&gt;&lt;pre&gt;40 50 34 24 14 4&lt;/pre&gt;&lt;pre&gt;9 10 11 12 13 14&lt;/pre&gt;&lt;pre&gt;31 4 18 8 27 17&lt;/pre&gt;&lt;pre&gt;44 32 13 19 41 19&lt;/pre&gt;&lt;pre&gt;1 2 3 4 5 6&lt;/pre&gt;&lt;pre&gt;80 37 47 18 21 9&lt;/pre&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #365f91; font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 12pt; line-height: 115%;"&gt;Step 1:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #365f91; font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 12pt; line-height: 115%;"&gt;Sort each box Dimension :&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"&gt;data[i][0…5] [i=0…7]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;pre&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt;1 2 5 10 20 30 --&lt;/span&gt;&lt;span style="font-family: Wingdings; font-size: 12pt;"&gt;à&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt;Box no -1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt;3 7 9 11 15 23 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt;4 14 24 34 40 50 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt;9 10 11 12 13 14 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt;4 8 17 18 27 31 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt;13 19 19 32 41 44 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt;1 2 3 4 5 6 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt;9 18 21 37 47 80 &lt;/span&gt;&amp;nbsp;--&lt;span style="font-family: Wingdings;"&gt;à&lt;/span&gt;box No 8&lt;/pre&gt;&lt;pre&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/pre&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #365f91; font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 12pt; line-height: 115%;"&gt;Step 2:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;pre&gt;&lt;span style="color: #365f91; font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 12pt;"&gt;Sort each box:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: #365f91; font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 12pt;"&gt;Position--&lt;/span&gt;&lt;span style="color: #365f91; font-family: Wingdings; font-size: 12pt;"&gt;à&lt;/span&gt;&lt;span style="color: #365f91; font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 12pt;"&gt; box sorted dimension &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;6--&amp;gt;1 2 3 4 5 6 &lt;/pre&gt;&lt;pre&gt;0--&amp;gt;1 2 5 10 20 30 &lt;/pre&gt;&lt;pre&gt;1--&amp;gt;3 7 9 11 15 23 &lt;/pre&gt;&lt;pre&gt;4--&amp;gt;4 8 17 18 27 31 &lt;/pre&gt;&lt;pre&gt;2--&amp;gt;4 14 24 34 40 50 &lt;/pre&gt;&lt;pre&gt;3--&amp;gt;9 10 11 12 13 14 &lt;/pre&gt;&lt;pre&gt;7--&amp;gt;9 18 21 37 47 80 &lt;/pre&gt;&lt;pre&gt;5--&amp;gt;13 19 19 32 41 44&lt;/pre&gt;&lt;pre&gt;Position[]={6,0,1,4,2,3,7,5}&lt;/pre&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #365f91; font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 12pt; line-height: 115%;"&gt;Step3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #365f91; font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 12pt; line-height: 115%;"&gt;Now LIS Algorithm:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"&gt;&amp;nbsp;Do Yourself… &amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"&gt;Note: parent help us to determin when increase the value of inside [] element value….&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"&gt;Let you find&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"&gt;Inside[]= 1 1 2 3 3 2 4 4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"&gt;Par[]= -1 -1 0 2 2 0 3 3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"&gt;So max 4 which position 7 or 6&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"&gt;7-&amp;gt; parent of 7 is 3 -&amp;gt; parent of 3 is 2 -&amp;gt; parent of 2 is 0 -&amp;gt; parent of 0 is unknown -1 break&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"&gt;Reverse Sequence: 7-&amp;gt;3-&amp;gt;2-&amp;gt;0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"&gt;Sequence: 0-&amp;gt;2-&amp;gt;3-&amp;gt;7&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"&gt;We now from position array: position[0]+1 -&amp;gt;position[2]+1-&amp;gt;position[3]+1-&amp;gt;position[7]+1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"&gt;RESEULT: 7-&amp;gt;2-&amp;gt;5-&amp;gt;6&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="color: #365f91; font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 14pt; line-height: 115%;"&gt;Any Way: Is It easy?&amp;nbsp; I don’t know&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;b&gt;&lt;span style="color: #365f91; font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 14pt; line-height: 115%;"&gt;Rizoan toufiq&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div style="color: blue; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;DOWNLOAD NETCODE :RUN TIME: 0.012 sec &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://rt06.awardspace.com/Code/103%281%29.cpp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s320/download.gif" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="http://rt06.awardspace.com/Code/103%281%29.cpp"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-size: x-large;"&gt;Download to click&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div style="color: blue; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;DOWNLOAD MY CODE : run time: .008 &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://rt06.awardspace.com/Code/103mycode.cpp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s320/download.gif" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="http://rt06.awardspace.com/Code/103mycode.cpp"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-size: x-large;"&gt;Download to click&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div style="color: blue; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;DOWNLOAD Java CODE: &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://rt06.awardspace.com/Code/Main.java" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s320/download.gif" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="http://rt06.awardspace.com/Code/Main.java"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-size: x-large;"&gt;Download to click&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6456446978653192228-6829623003802385157?l=ruetprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ruetprogrammer.blogspot.com/feeds/6829623003802385157/comments/default' title='মন্তব্যগুলি পোস্ট করুন'/><link rel='replies' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/103-stacking-boxes.html#comment-form' title='0টি মন্তব্য'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/6829623003802385157'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/6829623003802385157'/><link rel='alternate' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/103-stacking-boxes.html' title='103 Stacking Boxes'/><author><name>computer science &amp;amp; Engineering</name><uri>http://www.blogger.com/profile/01145894902967208519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s72-c/download.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6456446978653192228.post-850517394060265214</id><published>2009-11-18T08:32:00.000-08:00</published><updated>2009-11-24T13:25:04.256-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Queue'/><category scheme='http://www.blogger.com/atom/ns#' term='Josephus problem'/><category scheme='http://www.blogger.com/atom/ns#' term='Simulation'/><title type='text'>440 Eeny Meeny Moo</title><content type='html'>&lt;blockquote&gt;Surely you have made the experience that when too many people use the Internet simultaneously, the net becomes very, very slow. &lt;br /&gt;&lt;br /&gt;To put an end to this problem, the University of Ulm has developed a contingency scheme for times of peak load to cut off net access for some cities of the country in a systematic, totally fair manner. Germany's cities were enumerated randomly from 1 to &lt;i&gt;n&lt;/i&gt;. Freiburg was number 1, Ulm was number 2, Karlsruhe was number 3, and so on in a purely random order. &lt;br /&gt;&lt;br /&gt;Then a number &lt;i&gt;m&lt;/i&gt; would be picked at random, and Internet access would first be cut off in city 1 (clearly the fairest starting point) and then in every &lt;i&gt;m&lt;/i&gt;th city after that, wrapping around to 1 after &lt;i&gt;n&lt;/i&gt;, and ignoring cities already cut off. For example, if &lt;i&gt;n&lt;/i&gt;=17 and &lt;i&gt;m&lt;/i&gt;=5, net access would be cut off to the cities in the order [1,6,11,16,5,12,2,9,17,10,4,15,14,3,8,13,7]. The problem is that it is clearly fairest to cut off Ulm last (after all, this is where the best programmers come from), so for a given n, the random number m needs to be carefully chosen so that city 2 is the last city selected. &lt;br /&gt;&lt;br /&gt;Your job is to write a program that will read in a number of cities &lt;i&gt;n&lt;/i&gt; and then determine the smallest integer &lt;i&gt;m&lt;/i&gt; that will ensure that Ulm can surf the net while the rest of the country is cut off. &lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;h2&gt;&lt;span style="color: #0070e8;"&gt;&lt;a href="http://www.blogger.com/post-create.do" name="SECTION0001001000000000000000"&gt;Input Specification&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;The input file will contain one or more lines, each line containing one integer &lt;i&gt;n&lt;/i&gt; with  &lt;img align="MIDDLE" alt="tex2html_wrap_inline43" height="25" src="http://acm.uva.es/p/v4/440img1.gif" width="90" /&gt; , representing the number of cities in the country. &lt;br /&gt;Input is terminated by a value of zero (0) for &lt;i&gt;n&lt;/i&gt;. &lt;br /&gt;&lt;br /&gt;&lt;h2&gt;&lt;span style="color: #0070e8;"&gt;&lt;a href="http://www.blogger.com/post-create.do" name="SECTION0001002000000000000000"&gt;Output Specification&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;For each line of the input, print one line containing the integer &lt;i&gt;m&lt;/i&gt; fulfilling the requirement specified above. &lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;h2&gt;&lt;span style="color: #0070e8;"&gt;&lt;a href="http://www.blogger.com/post-create.do" name="SECTION0001003000000000000000"&gt;Sample Input&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;&lt;br /&gt;&lt;pre&gt;3&lt;br /&gt;&lt;br /&gt;4&lt;br /&gt;&lt;br /&gt;5&lt;br /&gt;&lt;br /&gt;6&lt;br /&gt;&lt;br /&gt;7&lt;br /&gt;&lt;br /&gt;8&lt;br /&gt;&lt;br /&gt;9&lt;br /&gt;&lt;br /&gt;10&lt;br /&gt;&lt;br /&gt;11&lt;br /&gt;&lt;br /&gt;12&lt;br /&gt;&lt;br /&gt;0&lt;/pre&gt;&lt;br /&gt;&lt;h2&gt;&lt;span style="color: #0070e8;"&gt;&lt;a href="http://www.blogger.com/post-create.do" name="SECTION0001004000000000000000"&gt;Sample Output&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;&lt;br /&gt;&lt;pre&gt;2&lt;br /&gt;&lt;br /&gt;5&lt;br /&gt;&lt;br /&gt;2&lt;br /&gt;&lt;br /&gt;4&lt;br /&gt;&lt;br /&gt;3&lt;br /&gt;&lt;br /&gt;11&lt;br /&gt;&lt;br /&gt;2&lt;br /&gt;&lt;br /&gt;3&lt;br /&gt;&lt;br /&gt;8&lt;br /&gt;&lt;br /&gt;16&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Description &lt;/b&gt;&lt;/span&gt;:&lt;i&gt; presented by rizoan toufiq&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;&lt;br /&gt;&lt;!--&lt;br /&gt; /* Font Definitions */&lt;br /&gt; @font-face&lt;br /&gt;	{font-family:Wingdings;&lt;br /&gt;	panose-1:5 0 0 0 0 0 0 0 0 0;&lt;br /&gt;	mso-font-charset:2;&lt;br /&gt;	mso-generic-font-family:auto;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:0 268435456 0 0 -2147483648 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:"Cambria Math";&lt;br /&gt;	panose-1:2 4 5 3 5 4 6 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:roman;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1107304683 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:Calibri;&lt;br /&gt;	panose-1:2 15 5 2 2 2 4 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:swiss;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1073750139 0 0 159 0;}&lt;br /&gt; /* Style Definitions */&lt;br /&gt; p.MsoNormal, li.MsoNormal, div.MsoNormal&lt;br /&gt;	{mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-parent:"";&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:0in;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";}&lt;br /&gt;p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph&lt;br /&gt;	{mso-style-priority:34;&lt;br /&gt;	mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:.5in;&lt;br /&gt;	mso-add-space:auto;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";}&lt;br /&gt;p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst&lt;br /&gt;	{mso-style-priority:34;&lt;br /&gt;	mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-type:export-only;&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:0in;&lt;br /&gt;	margin-left:.5in;&lt;br /&gt;	margin-bottom:.0001pt;&lt;br /&gt;	mso-add-space:auto;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";}&lt;br /&gt;p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle&lt;br /&gt;	{mso-style-priority:34;&lt;br /&gt;	mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-type:export-only;&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:0in;&lt;br /&gt;	margin-left:.5in;&lt;br /&gt;	margin-bottom:.0001pt;&lt;br /&gt;	mso-add-space:auto;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";}&lt;br /&gt;p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast&lt;br /&gt;	{mso-style-priority:34;&lt;br /&gt;	mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-type:export-only;&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:.5in;&lt;br /&gt;	mso-add-space:auto;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";}&lt;br /&gt;.MsoChpDefault&lt;br /&gt;	{mso-style-type:export-only;&lt;br /&gt;	mso-default-props:yes;&lt;br /&gt;	font-size:10.0pt;&lt;br /&gt;	mso-ansi-font-size:10.0pt;&lt;br /&gt;	mso-bidi-font-size:10.0pt;&lt;br /&gt;	mso-ascii-font-family:Calibri;&lt;br /&gt;	mso-hansi-font-family:Calibri;}&lt;br /&gt;@page Section1&lt;br /&gt;	{size:8.5in 11.0in;&lt;br /&gt;	margin:1.0in 1.0in 1.0in 1.0in;&lt;br /&gt;	mso-header-margin:.5in;&lt;br /&gt;	mso-footer-margin:.5in;&lt;br /&gt;	mso-paper-source:0;}&lt;br /&gt;div.Section1&lt;br /&gt;	{page:Section1;}&lt;br /&gt; /* List Definitions */&lt;br /&gt; @list l0&lt;br /&gt;	{mso-list-id:340161076;&lt;br /&gt;	mso-list-type:hybrid;&lt;br /&gt;	mso-list-template-ids:475047528 890637254 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}&lt;br /&gt;@list l0:level1&lt;br /&gt;	{mso-level-number-format:image;&lt;br /&gt;	list-style-image:url("file:///C:/DOCUME~1/nayon/LOCALS~1/Temp/msohtmlclip1/01/clip_image001.gif");&lt;br /&gt;	mso-level-text:&amp;#61623;;&lt;br /&gt;	mso-level-tab-stop:none;&lt;br /&gt;	mso-level-number-position:left;&lt;br /&gt;	text-indent:-.25in;&lt;br /&gt;	font-family:Symbol;&lt;br /&gt;	color:windowtext;}&lt;br /&gt;@list l0:level2&lt;br /&gt;	{mso-level-number-format:bullet;&lt;br /&gt;	mso-level-text:o;&lt;br /&gt;	mso-level-tab-stop:none;&lt;br /&gt;	mso-level-number-position:left;&lt;br /&gt;	text-indent:-.25in;&lt;br /&gt;	font-family:"Courier New";}&lt;br /&gt;@list l0:level3&lt;br /&gt;	{mso-level-number-format:bullet;&lt;br /&gt;	mso-level-text:&amp;#61607;;&lt;br /&gt;	mso-level-tab-stop:none;&lt;br /&gt;	mso-level-number-position:left;&lt;br /&gt;	text-indent:-.25in;&lt;br /&gt;	font-family:Wingdings;}&lt;br /&gt;ol&lt;br /&gt;	{margin-bottom:0in;}&lt;br /&gt;ul&lt;br /&gt;	{margin-bottom:0in;}&lt;br /&gt;--&gt;&lt;br /&gt;&lt;/style&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;u&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 115%;"&gt;ACM problem 151 &amp;amp; 440: (Solved by Josephus):&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;Flavius Josephus was a famous historian of the first century. Legend has it that Josephus wouldn't have lived to become famous without his mathematical talents. During the Jewish-Roman war, he was among a band of 41 Jewish rebels trapped in cave by the Romans. Preferring suicide to capture, the rebels decided to form a circle and, proceeding around it, to kill every third remaining person until no one was left. But Josephus, along with an unindicted co-conspirator, wanted none of this suicide nonsense; so he quickly calculated where he and his friend stand in the vicious circle.&lt;/span&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;u&gt;&lt;span style="color: red;"&gt;Algorithm:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol; font-size: 10pt;"&gt;&lt;img alt="*" height="11" src="file:///C:/DOCUME%7E1/nayon/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.gif" width="11" /&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;Given A Circular queue: 1,2,3,4,5,6,7,8,9,10,11,12,13,14&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpFirst" style="margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol;"&gt;&lt;img alt="*" height="12" src="file:///C:/DOCUME%7E1/nayon/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.gif" width="12" /&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;If(total_ele&amp;gt;1){&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0.0001pt 1.5in; text-indent: -0.25in;"&gt;&lt;span style="font-family: Wingdings;"&gt;§&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;pop(); &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0.0001pt 1.5in; text-indent: -0.25in;"&gt;&lt;span style="font-family: Wingdings;"&gt;§&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;element--;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0.0001pt 1.5in; text-indent: -0.25in;"&gt;&lt;span style="font-family: Wingdings;"&gt;§&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;front moves;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpLast" style="margin: 0in 0in 0.0001pt 1in; text-indent: -0.25in;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;o&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol; font-size: 10pt;"&gt;&lt;img alt="*" height="11" src="file:///C:/DOCUME%7E1/nayon/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.gif" width="11" /&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;i.e _,2,3,4,5,6,7,8,9,10,11,12,13,14&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraph" style="margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol;"&gt;&lt;img alt="*" height="12" src="file:///C:/DOCUME%7E1/nayon/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.gif" width="12" /&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;if difference =2 ,then next two element push into the back.&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol; font-size: 10pt;"&gt;&lt;img alt="*" height="11" src="file:///C:/DOCUME%7E1/nayon/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.gif" width="11" /&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;While(i!=diff) it pop()data from front and then push it back.ie, _,_,_,4,5,6,7,8,9,10,11,12,13,14,2,3. Now front is on 4 data and rear is on 3 data. Element decrease by 2(i.e 12). Now Follow above step until number element 1; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpFirst" style="margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol;"&gt;&lt;img alt="*" height="12" src="file:///C:/DOCUME%7E1/nayon/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.gif" width="12" /&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;7,8,9,10,11,12,13,14,2,3,5,6 [4 die]&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol;"&gt;&lt;img alt="*" height="12" src="file:///C:/DOCUME%7E1/nayon/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.gif" width="12" /&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;10,11,12,13,14,2,3,5,6,8,9 [7 die]&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpLast" style="margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol;"&gt;&lt;img alt="*" height="12" src="file:///C:/DOCUME%7E1/nayon/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.gif" width="12" /&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;13,14,2,3,5,6,8,9,11,12 [10 die]&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol; font-size: 10pt;"&gt;&lt;img alt="*" height="11" src="file:///C:/DOCUME%7E1/nayon/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.gif" width="11" /&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;3,5,6,8,9,11,12,14,2 [13 die]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpFirst" style="margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol;"&gt;&lt;img alt="*" height="12" src="file:///C:/DOCUME%7E1/nayon/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.gif" width="12" /&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;8,9,11,12,14,2,5,6 [3 die]&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol;"&gt;&lt;img alt="*" height="12" src="file:///C:/DOCUME%7E1/nayon/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.gif" width="12" /&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;12,14,2,5,6,9,11 [8 die]&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol;"&gt;&lt;img alt="*" height="12" src="file:///C:/DOCUME%7E1/nayon/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.gif" width="12" /&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;5,6,9,11,14,2 [12 die]&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol;"&gt;&lt;img alt="*" height="12" src="file:///C:/DOCUME%7E1/nayon/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.gif" width="12" /&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;11,14,2,6,9 [5 die]&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol;"&gt;&lt;img alt="*" height="12" src="file:///C:/DOCUME%7E1/nayon/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.gif" width="12" /&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;6,9,14,2 [11 die]&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol;"&gt;&lt;img alt="*" height="12" src="file:///C:/DOCUME%7E1/nayon/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.gif" width="12" /&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;2,9,14 [6 die]&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol;"&gt;&lt;img alt="*" height="12" src="file:///C:/DOCUME%7E1/nayon/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.gif" width="12" /&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;9,14 [2 die]&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpLast" style="margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol;"&gt;&lt;img alt="*" height="12" src="file:///C:/DOCUME%7E1/nayon/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.gif" width="12" /&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;14 [9 die]&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div style="color: blue; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;DOWNLOAD DOCUMENT FILE : &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://ruetacm.wordpress.com/files/2009/11/151-440-jossepus.doc" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s320/download.gif" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="http://ruetacm.wordpress.com/files/2009/11/151-440-jossepus.doc"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-size: x-large;"&gt;Download to click&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;object height="320" width="420"&gt;&lt;embed src='http://img692.imageshack.us/img692/2443/ajabpremkighazabkahani1.swf' loop="true" width='420' height='320' wmode='transparent'/&gt;&lt;/object&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6456446978653192228-850517394060265214?l=ruetprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ruetprogrammer.blogspot.com/feeds/850517394060265214/comments/default' title='মন্তব্যগুলি পোস্ট করুন'/><link rel='replies' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/440-eeny-meeny-moo.html#comment-form' title='0টি মন্তব্য'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/850517394060265214'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/850517394060265214'/><link rel='alternate' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/440-eeny-meeny-moo.html' title='440 Eeny Meeny Moo'/><author><name>computer science &amp;amp; Engineering</name><uri>http://www.blogger.com/profile/01145894902967208519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s72-c/download.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6456446978653192228.post-2064188980703499704</id><published>2009-11-18T08:27:00.000-08:00</published><updated>2009-11-24T13:25:04.269-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Queue'/><category scheme='http://www.blogger.com/atom/ns#' term='Josephus problem'/><category scheme='http://www.blogger.com/atom/ns#' term='Simulation'/><title type='text'>151 power crisis</title><content type='html'>&lt;blockquote&gt;During the power crisis in New Zealand this winter (caused by a shortage of rain and hence low levels in the hydro dams), a contingency scheme was developed to turn off the power to areas of the country in a systematic, totally fair, manner. The country was divided up into &lt;i&gt;N&lt;/i&gt; regions (Auckland was region number 1, and Wellington number 13). A number, &lt;i&gt;m&lt;/i&gt;, would be picked `at random', and the power would first be turned off in region 1 (clearly the fairest starting point) and then in every m'th region after that, wrapping around to 1 after &lt;i&gt;N&lt;/i&gt;, and ignoring regions already turned off. For example, if &lt;i&gt;N&lt;/i&gt; = 17 and &lt;i&gt;m&lt;/i&gt; = 5, power would be turned off to the regions in the order:1,6,11,16,5,12,2,9,17,10,4,15,14,3,8,13,7. &lt;br /&gt;&lt;br /&gt;The problem is that it is clearly fairest to turn off Wellington last (after all, that is where the Electricity headquarters are), so for a given &lt;i&gt;N&lt;/i&gt;, the `random' number &lt;i&gt;m&lt;/i&gt; needs to be carefully chosen so that region 13 is the last region selected. &lt;br /&gt;&lt;br /&gt;Write a program that will read in the number of regions and then determine the smallest number &lt;i&gt;m&lt;/i&gt; that will ensure that Wellington (region 13) can function while the rest of the country is blacked out. &lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;h2&gt;&lt;span style="color: #0070e8;"&gt;&lt;a href="http://www.blogger.com/post-create.do" name="SECTION0001001000000000000000"&gt;Input and Output&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;Input will consist of a series of lines, each line containing the number of regions (&lt;i&gt;N&lt;/i&gt;) with  &lt;img align="MIDDLE" alt="tex2html_wrap_inline42" height="26" src="http://online-judge.uva.es/p/v1/151img1.gif" width="104" /&gt; . The file will be terminated by a line consisting of a single 0. &lt;br /&gt;&lt;br /&gt;Output will consist of a series of lines, one for each line of the input. Each line will consist of the number &lt;i&gt;m&lt;/i&gt; according to the above scheme. &lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;h2&gt;&lt;span style="color: #0070e8;"&gt;&lt;a href="http://www.blogger.com/post-create.do" name="SECTION0001002000000000000000"&gt;Sample input&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;&lt;br /&gt;&lt;pre&gt;17&lt;br /&gt;&lt;br /&gt;0&lt;/pre&gt;&lt;br /&gt;&lt;h2&gt;&lt;span style="color: #0070e8;"&gt;&lt;a href="http://www.blogger.com/post-create.do" name="SECTION0001003000000000000000"&gt;Sample output&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;&lt;br /&gt;&lt;pre&gt;7&lt;/pre&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Description &lt;/b&gt;&lt;/span&gt;:&lt;i&gt; presented by rizoan toufiq&lt;/i&gt;&lt;br /&gt;&lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type"&gt;&lt;/meta&gt;&lt;meta content="Word.Document" name="ProgId"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Generator"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Originator"&gt;&lt;/meta&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;&lt;br /&gt;&lt;!--&lt;br /&gt; /* Font Definitions */&lt;br /&gt; @font-face&lt;br /&gt;	{font-family:Wingdings;&lt;br /&gt;	panose-1:5 0 0 0 0 0 0 0 0 0;&lt;br /&gt;	mso-font-charset:2;&lt;br /&gt;	mso-generic-font-family:auto;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:0 268435456 0 0 -2147483648 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:"Cambria Math";&lt;br /&gt;	panose-1:2 4 5 3 5 4 6 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:roman;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1107304683 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:Calibri;&lt;br /&gt;	panose-1:2 15 5 2 2 2 4 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:swiss;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1073750139 0 0 159 0;}&lt;br /&gt; /* Style Definitions */&lt;br /&gt; p.MsoNormal, li.MsoNormal, div.MsoNormal&lt;br /&gt;	{mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-parent:"";&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:0in;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";}&lt;br /&gt;p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph&lt;br /&gt;	{mso-style-priority:34;&lt;br /&gt;	mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:.5in;&lt;br /&gt;	mso-add-space:auto;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";}&lt;br /&gt;p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst&lt;br /&gt;	{mso-style-priority:34;&lt;br /&gt;	mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-type:export-only;&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:0in;&lt;br /&gt;	margin-left:.5in;&lt;br /&gt;	margin-bottom:.0001pt;&lt;br /&gt;	mso-add-space:auto;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";}&lt;br /&gt;p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle&lt;br /&gt;	{mso-style-priority:34;&lt;br /&gt;	mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-type:export-only;&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:0in;&lt;br /&gt;	margin-left:.5in;&lt;br /&gt;	margin-bottom:.0001pt;&lt;br /&gt;	mso-add-space:auto;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";}&lt;br /&gt;p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast&lt;br /&gt;	{mso-style-priority:34;&lt;br /&gt;	mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-type:export-only;&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:.5in;&lt;br /&gt;	mso-add-space:auto;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";}&lt;br /&gt;.MsoChpDefault&lt;br /&gt;	{mso-style-type:export-only;&lt;br /&gt;	mso-default-props:yes;&lt;br /&gt;	font-size:10.0pt;&lt;br /&gt;	mso-ansi-font-size:10.0pt;&lt;br /&gt;	mso-bidi-font-size:10.0pt;&lt;br /&gt;	mso-ascii-font-family:Calibri;&lt;br /&gt;	mso-hansi-font-family:Calibri;}&lt;br /&gt;@page Section1&lt;br /&gt;	{size:8.5in 11.0in;&lt;br /&gt;	margin:1.0in 1.0in 1.0in 1.0in;&lt;br /&gt;	mso-header-margin:.5in;&lt;br /&gt;	mso-footer-margin:.5in;&lt;br /&gt;	mso-paper-source:0;}&lt;br /&gt;div.Section1&lt;br /&gt;	{page:Section1;}&lt;br /&gt; /* List Definitions */&lt;br /&gt; @list l0&lt;br /&gt;	{mso-list-id:340161076;&lt;br /&gt;	mso-list-type:hybrid;&lt;br /&gt;	mso-list-template-ids:475047528 890637254 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}&lt;br /&gt;@list l0:level1&lt;br /&gt;	{mso-level-number-format:image;&lt;br /&gt;	list-style-image:url("file:///C:/DOCUME~1/nayon/LOCALS~1/Temp/msohtmlclip1/01/clip_image001.gif");&lt;br /&gt;	mso-level-text:;&lt;br /&gt;	mso-level-tab-stop:none;&lt;br /&gt;	mso-level-number-position:left;&lt;br /&gt;	text-indent:-.25in;&lt;br /&gt;	font-family:Symbol;&lt;br /&gt;	color:windowtext;}&lt;br /&gt;@list l0:level2&lt;br /&gt;	{mso-level-number-format:bullet;&lt;br /&gt;	mso-level-text:o;&lt;br /&gt;	mso-level-tab-stop:none;&lt;br /&gt;	mso-level-number-position:left;&lt;br /&gt;	text-indent:-.25in;&lt;br /&gt;	font-family:"Courier New";}&lt;br /&gt;@list l0:level3&lt;br /&gt;	{mso-level-number-format:bullet;&lt;br /&gt;	mso-level-text:;&lt;br /&gt;	mso-level-tab-stop:none;&lt;br /&gt;	mso-level-number-position:left;&lt;br /&gt;	text-indent:-.25in;&lt;br /&gt;	font-family:Wingdings;}&lt;br /&gt;ol&lt;br /&gt;	{margin-bottom:0in;}&lt;br /&gt;ul&lt;br /&gt;	{margin-bottom:0in;}&lt;br /&gt;--&gt;&lt;br /&gt;&lt;/style&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;u&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 115%;"&gt;ACM problem 151 &amp;amp; 440: (Solved by Josephus):&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;Flavius Josephus was a famous historian of the first century. Legend has it that Josephus wouldn't have lived to become famous without his mathematical talents. During the Jewish-Roman war, he was among a band of 41 Jewish rebels trapped in cave by the Romans. Preferring suicide to capture, the rebels decided to form a circle and, proceeding around it, to kill every third remaining person until no one was left. But Josephus, along with an unindicted co-conspirator, wanted none of this suicide nonsense; so he quickly calculated where he and his friend stand in the vicious circle.&lt;/span&gt;&lt;span style="font-size: 12pt; line-height: 115%;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;u&gt;&lt;span style="color: red;"&gt;Algorithm:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol; font-size: 10pt;"&gt;&lt;img alt="*" height="11" src="file:///C:/DOCUME%7E1/nayon/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.gif" width="11" /&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;Given A Circular queue: 1,2,3,4,5,6,7,8,9,10,11,12,13,14&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpFirst" style="margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol;"&gt;&lt;img alt="*" height="12" src="file:///C:/DOCUME%7E1/nayon/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.gif" width="12" /&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;If(total_ele&amp;gt;1){&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0.0001pt 1.5in; text-indent: -0.25in;"&gt;&lt;span style="font-family: Wingdings;"&gt;§&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;pop(); &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0.0001pt 1.5in; text-indent: -0.25in;"&gt;&lt;span style="font-family: Wingdings;"&gt;§&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;element--;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0.0001pt 1.5in; text-indent: -0.25in;"&gt;&lt;span style="font-family: Wingdings;"&gt;§&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;front moves;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpLast" style="margin: 0in 0in 0.0001pt 1in; text-indent: -0.25in;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;o&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol; font-size: 10pt;"&gt;&lt;img alt="*" height="11" src="file:///C:/DOCUME%7E1/nayon/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.gif" width="11" /&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;i.e _,2,3,4,5,6,7,8,9,10,11,12,13,14&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraph" style="margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol;"&gt;&lt;img alt="*" height="12" src="file:///C:/DOCUME%7E1/nayon/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.gif" width="12" /&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;if difference =2 ,then next two element push into the back.&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol; font-size: 10pt;"&gt;&lt;img alt="*" height="11" src="file:///C:/DOCUME%7E1/nayon/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.gif" width="11" /&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;While(i!=diff) it pop()data from front and then push it back.ie, _,_,_,4,5,6,7,8,9,10,11,12,13,14,2,3. Now front is on 4 data and rear is on 3 data. Element decrease by 2(i.e 12). Now Follow above step until number element 1; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpFirst" style="margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol;"&gt;&lt;img alt="*" height="12" src="file:///C:/DOCUME%7E1/nayon/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.gif" width="12" /&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;7,8,9,10,11,12,13,14,2,3,5,6 [4 die]&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol;"&gt;&lt;img alt="*" height="12" src="file:///C:/DOCUME%7E1/nayon/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.gif" width="12" /&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;10,11,12,13,14,2,3,5,6,8,9 [7 die]&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpLast" style="margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol;"&gt;&lt;img alt="*" height="12" src="file:///C:/DOCUME%7E1/nayon/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.gif" width="12" /&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;13,14,2,3,5,6,8,9,11,12 [10 die]&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol; font-size: 10pt;"&gt;&lt;img alt="*" height="11" src="file:///C:/DOCUME%7E1/nayon/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.gif" width="11" /&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;3,5,6,8,9,11,12,14,2 [13 die]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpFirst" style="margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol;"&gt;&lt;img alt="*" height="12" src="file:///C:/DOCUME%7E1/nayon/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.gif" width="12" /&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;8,9,11,12,14,2,5,6 [3 die]&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol;"&gt;&lt;img alt="*" height="12" src="file:///C:/DOCUME%7E1/nayon/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.gif" width="12" /&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;12,14,2,5,6,9,11 [8 die]&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol;"&gt;&lt;img alt="*" height="12" src="file:///C:/DOCUME%7E1/nayon/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.gif" width="12" /&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;5,6,9,11,14,2 [12 die]&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol;"&gt;&lt;img alt="*" height="12" src="file:///C:/DOCUME%7E1/nayon/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.gif" width="12" /&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;11,14,2,6,9 [5 die]&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol;"&gt;&lt;img alt="*" height="12" src="file:///C:/DOCUME%7E1/nayon/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.gif" width="12" /&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;6,9,14,2 [11 die]&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol;"&gt;&lt;img alt="*" height="12" src="file:///C:/DOCUME%7E1/nayon/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.gif" width="12" /&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;2,9,14 [6 die]&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol;"&gt;&lt;img alt="*" height="12" src="file:///C:/DOCUME%7E1/nayon/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.gif" width="12" /&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;9,14 [2 die]&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpLast" style="margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol;"&gt;&lt;img alt="*" height="12" src="file:///C:/DOCUME%7E1/nayon/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.gif" width="12" /&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;14 [9 die]&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div style="color: blue; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;DOWNLOAD DOCUMENT FILE : &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://ruetacm.wordpress.com/files/2009/11/151-440-jossepus.doc" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s320/download.gif" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="http://ruetacm.wordpress.com/files/2009/11/151-440-jossepus.doc"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-size: x-large;"&gt;Download to click&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6456446978653192228-2064188980703499704?l=ruetprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ruetprogrammer.blogspot.com/feeds/2064188980703499704/comments/default' title='মন্তব্যগুলি পোস্ট করুন'/><link rel='replies' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/151-power-crisis.html#comment-form' title='0টি মন্তব্য'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/2064188980703499704'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/2064188980703499704'/><link rel='alternate' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/151-power-crisis.html' title='151 power crisis'/><author><name>computer science &amp;amp; Engineering</name><uri>http://www.blogger.com/profile/01145894902967208519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s72-c/download.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6456446978653192228.post-3492223436312313675</id><published>2009-11-18T07:48:00.001-08:00</published><updated>2009-11-24T13:25:04.290-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Dynamic Programming'/><title type='text'>136-ugly number</title><content type='html'>&lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type"&gt;&lt;/meta&gt;&lt;meta content="Word.Document" name="ProgId"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Generator"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Originator"&gt;&lt;/meta&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;&lt;br /&gt;&lt;!--&lt;br /&gt; /* Font Definitions */&lt;br /&gt; @font-face&lt;br /&gt;	{font-family:"Cambria Math";&lt;br /&gt;	panose-1:2 4 5 3 5 4 6 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:roman;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1107304683 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:Calibri;&lt;br /&gt;	panose-1:2 15 5 2 2 2 4 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:swiss;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1073750139 0 0 159 0;}&lt;br /&gt; /* Style Definitions */&lt;br /&gt; p.MsoNormal, li.MsoNormal, div.MsoNormal&lt;br /&gt;	{mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-parent:"";&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:0in;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";}&lt;br /&gt;.MsoChpDefault&lt;br /&gt;	{mso-style-type:export-only;&lt;br /&gt;	mso-default-props:yes;&lt;br /&gt;	font-size:10.0pt;&lt;br /&gt;	mso-ansi-font-size:10.0pt;&lt;br /&gt;	mso-bidi-font-size:10.0pt;&lt;br /&gt;	mso-ascii-font-family:Calibri;&lt;br /&gt;	mso-hansi-font-family:Calibri;}&lt;br /&gt;@page Section1&lt;br /&gt;	{size:8.5in 11.0in;&lt;br /&gt;	margin:1.0in 1.0in 1.0in 1.0in;&lt;br /&gt;	mso-header-margin:.5in;&lt;br /&gt;	mso-footer-margin:.5in;&lt;br /&gt;	mso-paper-source:0;}&lt;br /&gt;div.Section1&lt;br /&gt;	{page:Section1;}&lt;br /&gt;--&gt;&lt;br /&gt;&lt;/style&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; border: medium none;"&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;   &lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;blockquote&gt;&lt;blockquote&gt;&lt;div class="MsoNormal" style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif; line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Ugly numbers are   numbers whose only prime factors are 2, 3 or 5. The sequence &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif; line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;1, 2, 3, 4, 5, 6,   8, 9, 10, 12, 15, ... &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif; line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;shows the first   11 ugly numbers. By convention, 1 is included. &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif; line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Write a program   to find and print the 1500'th ugly number. &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif; line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;a href="http://www.blogger.com/post-create.g?blogID=1161585120556240042" name="SECTION0001001000000000000000"&gt;&lt;span style="color: #0070e8;"&gt;Input and Output&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif; line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;There is no input   to this program. Output should consist of a single line as shown below, with   &lt;number&gt; replaced by the number computed. &lt;o:p&gt;&lt;/o:p&gt;&lt;/number&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif; line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;a href="http://www.blogger.com/post-create.g?blogID=1161585120556240042" name="SECTION0001002000000000000000"&gt;&lt;span style="color: #0070e8;"&gt;Sample output&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&lt;b style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;The 1500'th ugly number is   &lt;number&gt;.&lt;/number&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; border: medium none;"&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;   &lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;blockquote&gt;&lt;blockquote&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: navy none repeat scroll 0% 0%; color: white; font-size: 12pt;"&gt;Main procedure&lt;/span&gt;&lt;span style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: navy none repeat scroll 0% 0%; color: #1f497d; font-size: 12pt;"&gt;:&lt;/span&gt;&lt;span style="color: black; font-size: 12pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; let p2=2,p3=3,p5=5&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;we know ,firt ugly number =1 ;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&amp;nbsp;so ,next ugly number =   min(p2*1,p3*1,p5*1)=2&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; note: 1 represent the   first ugly number&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&amp;nbsp;next ugly number = min   (p2*2,p3*1,p3*1)=3 &lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; note: 2 is second U.G   &amp;amp; 1 first U.G&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;next ugly number = min(p2*2,p3*2,p3*1)=min(4,6,5)=4&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;next ugly number = min(p2*3,p3*2,p3*1)=min(6,6,5)=5&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; note: 3 is third U.G&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;***next ugly number =min(p2*3,p3*2,p5*2)=min(6,6,10)[control double 6   by taking next &lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uglynumber &amp;amp; if   necessary loop i decrease, i.e * 6 is not selected in ugly number]&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;next ugly number= min(p2*4,p3*2,p5*2)=min(8,6,10)=6&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; note : 4 is fourth ug   number&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;next ugly number= min(p2*4,p3*3,p5*2)=min(8,9,10)=8&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;next ugly number= min(p2*5,p3*3,p5*2)=min(10,9,10)=9&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; note : 5 is fifth ug   number&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;next ugly number= min(p2*5,p3*4,p5*2)=min(10,12,10)[above note]&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;next ugly number= min(p2*6,p3*4,p5*2)=min(12,12,10)=10&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; note : 6 is sixth ug   number&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;next ugly number= min(p2*6,p3*4,p5*3)=min(12,12,15)[abov note]&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;next ugly number= min(p2*8,p3*4,p5*3)=min(16,12,15)=12&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; **** note : 8 is sevrnth   ug number&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;Algorithm:&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&amp;nbsp;&amp;nbsp;   ug[1]=p2=p3=p5=1;//p2=1,p3=1,p5=1 because the represent the index nub.   of ug[]array&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&amp;nbsp;&amp;nbsp; For i=2 to 1500&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(2*p2 min) then p2++;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if(3*p3 min) then   p3++;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if(5*p5 min) then   p5++;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if(2*p2==3*p3) then {   p2++; i--;}&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if(2*p2==5*p5) then {   p2++;i--;}&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if(3*p3==5*p5) then {   p3++;i--;}&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; border: medium none;"&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style="color: blue; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;DOWNLOAD DOCUMENT FILE : &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://ruetacm.wordpress.com/files/2009/11/doc137.doc" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s320/download.gif" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://ruetacm.wordpress.com/files/2009/11/doc137.doc"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-size: x-large;"&gt;Download to click&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6456446978653192228-3492223436312313675?l=ruetprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ruetprogrammer.blogspot.com/feeds/3492223436312313675/comments/default' title='মন্তব্যগুলি পোস্ট করুন'/><link rel='replies' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/136-ugly-number.html#comment-form' title='0টি মন্তব্য'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/3492223436312313675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/3492223436312313675'/><link rel='alternate' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/136-ugly-number.html' title='136-ugly number'/><author><name>computer science &amp;amp; Engineering</name><uri>http://www.blogger.com/profile/01145894902967208519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s72-c/download.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6456446978653192228.post-6413820051791198514</id><published>2009-11-18T06:02:00.000-08:00</published><updated>2009-11-24T13:25:04.301-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tower of honoi(Math)'/><title type='text'>10254.the priest mathematician</title><content type='html'>&lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type"&gt;&lt;/meta&gt;&lt;meta content="Word.Document" name="ProgId"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Generator"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Originator"&gt;&lt;/meta&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_editdata.mso" rel="Edit-Time-Data"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;&lt;br /&gt;&lt;!--&lt;br /&gt; /* Font Definitions */&lt;br /&gt; @font-face&lt;br /&gt;	{font-family:"Cambria Math";&lt;br /&gt;	panose-1:2 4 5 3 5 4 6 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:roman;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1107304683 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:Calibri;&lt;br /&gt;	panose-1:2 15 5 2 2 2 4 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:swiss;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1073750139 0 0 159 0;}&lt;br /&gt; /* Style Definitions */&lt;br /&gt; p.MsoNormal, li.MsoNormal, div.MsoNormal&lt;br /&gt;	{mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-parent:"";&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:0in;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";}&lt;br /&gt;p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph&lt;br /&gt;	{mso-style-priority:34;&lt;br /&gt;	mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:.5in;&lt;br /&gt;	mso-add-space:auto;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";}&lt;br /&gt;p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst&lt;br /&gt;	{mso-style-priority:34;&lt;br /&gt;	mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-type:export-only;&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:0in;&lt;br /&gt;	margin-left:.5in;&lt;br /&gt;	margin-bottom:.0001pt;&lt;br /&gt;	mso-add-space:auto;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";}&lt;br /&gt;p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle&lt;br /&gt;	{mso-style-priority:34;&lt;br /&gt;	mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-type:export-only;&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:0in;&lt;br /&gt;	margin-left:.5in;&lt;br /&gt;	margin-bottom:.0001pt;&lt;br /&gt;	mso-add-space:auto;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";}&lt;br /&gt;p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast&lt;br /&gt;	{mso-style-priority:34;&lt;br /&gt;	mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-type:export-only;&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:.5in;&lt;br /&gt;	mso-add-space:auto;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";}&lt;br /&gt;.MsoChpDefault&lt;br /&gt;	{mso-style-type:export-only;&lt;br /&gt;	mso-default-props:yes;&lt;br /&gt;	font-size:10.0pt;&lt;br /&gt;	mso-ansi-font-size:10.0pt;&lt;br /&gt;	mso-bidi-font-size:10.0pt;&lt;br /&gt;	mso-ascii-font-family:Calibri;&lt;br /&gt;	mso-hansi-font-family:Calibri;}&lt;br /&gt;@page Section1&lt;br /&gt;	{size:8.5in 11.0in;&lt;br /&gt;	margin:1.0in 1.0in 1.0in 1.0in;&lt;br /&gt;	mso-header-margin:.5in;&lt;br /&gt;	mso-footer-margin:.5in;&lt;br /&gt;	mso-paper-source:0;}&lt;br /&gt;div.Section1&lt;br /&gt;	{page:Section1;}&lt;br /&gt; /* List Definitions */&lt;br /&gt; @list l0&lt;br /&gt;	{mso-list-id:1139609010;&lt;br /&gt;	mso-list-type:hybrid;&lt;br /&gt;	mso-list-template-ids:188363998 -1356795756 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}&lt;br /&gt;@list l0:level1&lt;br /&gt;	{mso-level-tab-stop:none;&lt;br /&gt;	mso-level-number-position:left;&lt;br /&gt;	margin-left:21.75pt;&lt;br /&gt;	text-indent:-.25in;}&lt;br /&gt;@list l1&lt;br /&gt;	{mso-list-id:1689864798;&lt;br /&gt;	mso-list-type:hybrid;&lt;br /&gt;	mso-list-template-ids:1926380848 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}&lt;br /&gt;@list l1:level1&lt;br /&gt;	{mso-level-tab-stop:none;&lt;br /&gt;	mso-level-number-position:left;&lt;br /&gt;	text-indent:-.25in;}&lt;br /&gt;ol&lt;br /&gt;	{margin-bottom:0in;}&lt;br /&gt;ul&lt;br /&gt;	{margin-bottom:0in;}&lt;br /&gt;--&gt;&lt;br /&gt;&lt;/style&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;The ancient folklore behind the &lt;b&gt;"Towers of Hanoi"&lt;/b&gt; puzzle invented by E. Lucas in &lt;b&gt;1883&lt;/b&gt; is quite well known to us. One more recent legend tells us that the Brahmin monks from Benares never believed that the world could vanish at the moment they finished to transfer the &lt;b&gt;64&lt;/b&gt; discs from the needle on which they were to one of the other needles, and they decided to finish the task as soon as possible.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_zXj0Tqphc4M/SwP-UfJRqeI/AAAAAAAAApo/OP6Dxeo_OX8/s1600/p10254b.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_zXj0Tqphc4M/SwP-UfJRqeI/AAAAAAAAApo/OP6Dxeo_OX8/s320/p10254b.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="center" class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="center" class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;Fig: The Four Needle (Peg) Tower of Hanoi&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;One of the priests at the Benares temple (who loved the mathematics) assured their colleagues to achieve the transfer in the afternoon (the rhythm they had thought was a disc-per-second) by using an additional needle. They couldn't believe him, but he proposed them the following strategy:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;-- First move the topmost discs (say the top &lt;b&gt;k&lt;/b&gt; discs) to one of the spare needles.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;-- Then use the standard three needles strategy to move the remaining &lt;b&gt;n-k&lt;/b&gt; discs (for a general case with n discs) to their destination.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;-- Finally, move the top &lt;b&gt;k&lt;/b&gt; discs into their final destination using the four needles.&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;He calculated the value to &lt;b&gt;k&lt;/b&gt; in order to minimize the number of movements and get a total of &lt;b&gt;18433&lt;/b&gt; transfers, so they spent just &lt;b&gt;5&lt;/b&gt; hours, &lt;b&gt;7&lt;/b&gt; minutes and &lt;b&gt;13&lt;/b&gt; seconds against the more than &lt;b&gt;500000&lt;/b&gt; millions years without the additional needle (as they would have to do &lt;b&gt;2^64-1&lt;/b&gt; disc transfers. Can you believe it?)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;Try to follow the clever priest's strategy and calculate the number of transfer using four needles but according with the fixed and immutable laws of Brahma, which require that the priest on duty must not move more than one disc at a time and that he must place this disc on a needle so that there is no smaller disc below it. Of course, the main goal is to calculate the k that minimize the number of transfers (even thought it is not know for sure that this is always the optimal number of movements).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;u&gt;&lt;span style="color: red; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;Input&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;The input file contains several lines of input. Each line contains a single integer &lt;b&gt;N&lt;/b&gt;, which is the number of disks to be transferred. Here &lt;b&gt;0&amp;lt;=N&amp;lt;=10000&lt;/b&gt;. Input is terminated by end of file.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;u&gt;&lt;span style="color: red; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;Output&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;u&gt;&lt;span style="color: red; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;For each line of input produce one line of output which indicates the number of movements required to transfer the &lt;b&gt;N&lt;/b&gt; disks to the final needle.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" height="102" style="border-collapse: collapse; border: medium none; width: 510px;"&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;   &lt;td style="border: 1pt solid black; padding: 0in 5.4pt; width: 239.4pt;" valign="top" width="319"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;Sample   Input:&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;28&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;64&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border-color: black black black -moz-use-text-color; border-style: solid solid solid none; border-width: 1pt 1pt 1pt medium; padding: 0in 5.4pt; width: 239.4pt;" valign="top" width="319"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;Sample   Output:&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;769&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;18433&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style="color: #365f91; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;Interesting matter:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpFirst" style="line-height: normal; margin: 0in 0in 0.0001pt 21.75pt; text-align: justify; text-indent: -0.25in;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="color: #365f91; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;1.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style="color: #365f91; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;First I submit this code in CPP: Runtime: .068 s Ranking: 17&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin: 0in 0in 0.0001pt 21.75pt; text-align: justify; text-indent: -0.25in;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="color: #365f91; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;2.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style="color: #365f91; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;Second time, I submit this code in JAVA:&amp;nbsp; Runtime: 1.024 Ranking: Can’t see, because CPP code is better&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div class="MsoListParagraphCxSpLast" style="line-height: normal; margin: 0in 0in 0.0001pt 21.75pt; text-align: justify; text-indent: -0.25in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="color: #365f91; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;3.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style="color: #365f91; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;Third time ,I submit this code in ANSI C: Runtime: 0.008 Ranking : 2 (What !) &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="MsoListParagraphCxSpLast" style="line-height: normal; margin: 0in 0in 0.0001pt 21.75pt; text-align: justify; text-indent: -0.25in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="line-height: 115%;"&gt;Description:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" height="314" style="border-collapse: collapse; border: medium none; width: 454px;"&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;   &lt;td style="border: 1pt solid black; padding: 0in 5.4pt; width: 239.4pt;" valign="top" width="319"&gt;&lt;div class="MsoListParagraphCxSpFirst" style="line-height: normal; margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-size: small;"&gt;1.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;/span&gt;If number of   disk is 0, then move 0.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-size: small;"&gt;2.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;/span&gt;If number of   disk is 1, then move 1.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-size: small;"&gt;3.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;/span&gt;If number of   disk is 2, then move 3.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-size: small;"&gt;4.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;/span&gt;If number of   disk is 3, then move 5.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-size: small;"&gt;5.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;/span&gt;If number of   disk is 4, then move 9.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-size: small;"&gt;6.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;/span&gt;If number of   disk is 5, then move 13.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-size: small;"&gt;7.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;/span&gt;If number of   disk is 6, then move 17.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-size: small;"&gt;8.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;/span&gt;If number of   disk is 7, then move 25.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border-color: black black black -moz-use-text-color; border-style: solid solid solid none; border-width: 1pt 1pt 1pt medium; padding: 0in 5.4pt; width: 239.4pt;" valign="top" width="319"&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-size: small;"&gt;9.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;/span&gt;If number of   disk is 8, then move 33.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-size: small;"&gt;10.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;/span&gt;If number of   disk is 9, then move 41.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-size: small;"&gt;11.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;/span&gt;If number of   disk is 10, then move 49.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-size: small;"&gt;12.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;/span&gt;If number of   disk is 11 then move 65.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-size: small;"&gt;13.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;/span&gt;If number of   disk is 12, then move 81.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-size: small;"&gt;14.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;/span&gt;If number of   disk is 13, then move 97.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-size: small;"&gt;15.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;/span&gt;If number of   disk is 14, then move 113.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpLast" style="line-height: normal; margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-size: small;"&gt;16.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;/span&gt;If number of   disk is 15, then move 129.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="line-height: 115%;"&gt;So from disk number 2, we find a series,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="line-height: 115%;"&gt;3,5,9,13,17,25,33,41,49,65,81,97,113,129………………………………………………………………………………………………..&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;u&gt;&lt;span style="color: #365f91;"&gt;Algorithm:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" height="301" style="border-collapse: collapse; border: medium none; width: 509px;"&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;   &lt;td style="border: 1pt solid black; padding: 0in 5.4pt; width: 268.25pt;" valign="top" width="358"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;f(n)=f(n-1)+2^i, where f(0)=0,f(1)=1,i=2,3,4,5&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;i=1, then loop = i+1=2, diff=2^1=2&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; loop: &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1. f(2)=f(1)+2=1+2=3&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.f(3)=f(2)+2=3+2=5&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;i=2,then loop=i+1=3,diff=2^2=4&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.f[4]=f[3]+4=5+4=9&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.f[5]=f[4]+4=9+4=13&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.f[6]=f[5]+4=13+4=17&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;……&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;u&gt;&lt;span style="color: #c00000;"&gt;******Use   Big Number&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border-color: black black black -moz-use-text-color; border-style: solid solid solid none; border-width: 1pt 1pt 1pt medium; padding: 0in 5.4pt; width: 210.55pt;" valign="top" width="281"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;f[0]=0,f[1]=1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;i=2;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;loop_c;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;int j=1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;diff=1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;while(i&amp;lt;=max_disk){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; loop_c=j+1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; diff=diff+diff;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   for(int p=1;p&amp;lt;=loop_c;p++){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f[i]=f[i-1]+diff;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i++;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(i&amp;gt;max_disk)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   j++;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;u&gt;&lt;span style="color: #17365d;"&gt;Now try yourself…..&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;u&gt;&lt;span style="color: #17365d;"&gt;Or download code:&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div style="color: blue; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;DOWNLOAD DOCUMENT FILE : &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://ruetacm.wordpress.com/files/2009/11/doc10254.doc" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s320/download.gif" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://ruetacm.wordpress.com/files/2009/11/doc10254.doc"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-size: x-large;"&gt;Download to click&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6456446978653192228-6413820051791198514?l=ruetprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ruetprogrammer.blogspot.com/feeds/6413820051791198514/comments/default' title='মন্তব্যগুলি পোস্ট করুন'/><link rel='replies' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/10254the-priest-mathematician.html#comment-form' title='0টি মন্তব্য'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/6413820051791198514'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/6413820051791198514'/><link rel='alternate' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/10254the-priest-mathematician.html' title='10254.the priest mathematician'/><author><name>computer science &amp;amp; Engineering</name><uri>http://www.blogger.com/profile/01145894902967208519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_zXj0Tqphc4M/SwP-UfJRqeI/AAAAAAAAApo/OP6Dxeo_OX8/s72-c/p10254b.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6456446978653192228.post-6944848585821749879</id><published>2009-11-18T05:52:00.000-08:00</published><updated>2009-11-24T13:25:04.316-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sorting'/><title type='text'>10258.Contest Scoreboard</title><content type='html'>&lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type"&gt;&lt;/meta&gt;&lt;meta content="Word.Document" name="ProgId"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Generator"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Originator"&gt;&lt;/meta&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;&lt;br /&gt;&lt;!--&lt;br /&gt; /* Font Definitions */&lt;br /&gt; @font-face&lt;br /&gt;	{font-family:"Cambria Math";&lt;br /&gt;	panose-1:2 4 5 3 5 4 6 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:roman;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1107304683 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:Calibri;&lt;br /&gt;	panose-1:2 15 5 2 2 2 4 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:swiss;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1073750139 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:Consolas;&lt;br /&gt;	panose-1:2 11 6 9 2 2 4 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:modern;&lt;br /&gt;	mso-font-pitch:fixed;&lt;br /&gt;	mso-font-signature:-1610611985 1073750091 0 0 159 0;}&lt;br /&gt; /* Style Definitions */&lt;br /&gt; p.MsoNormal, li.MsoNormal, div.MsoNormal&lt;br /&gt;	{mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-parent:"";&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:0in;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";}&lt;br /&gt;code&lt;br /&gt;	{mso-style-noshow:yes;&lt;br /&gt;	mso-style-priority:99;&lt;br /&gt;	font-family:"Courier New";&lt;br /&gt;	mso-ascii-font-family:"Courier New";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-hansi-font-family:"Courier New";&lt;br /&gt;	mso-bidi-font-family:"Courier New";}&lt;br /&gt;p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph&lt;br /&gt;	{mso-style-priority:34;&lt;br /&gt;	mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:.5in;&lt;br /&gt;	mso-add-space:auto;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";}&lt;br /&gt;p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst&lt;br /&gt;	{mso-style-priority:34;&lt;br /&gt;	mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-type:export-only;&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:0in;&lt;br /&gt;	margin-left:.5in;&lt;br /&gt;	margin-bottom:.0001pt;&lt;br /&gt;	mso-add-space:auto;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";}&lt;br /&gt;p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle&lt;br /&gt;	{mso-style-priority:34;&lt;br /&gt;	mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-type:export-only;&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:0in;&lt;br /&gt;	margin-left:.5in;&lt;br /&gt;	margin-bottom:.0001pt;&lt;br /&gt;	mso-add-space:auto;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";}&lt;br /&gt;p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast&lt;br /&gt;	{mso-style-priority:34;&lt;br /&gt;	mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-type:export-only;&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:.5in;&lt;br /&gt;	mso-add-space:auto;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";}&lt;br /&gt;.MsoChpDefault&lt;br /&gt;	{mso-style-type:export-only;&lt;br /&gt;	mso-default-props:yes;&lt;br /&gt;	font-size:10.0pt;&lt;br /&gt;	mso-ansi-font-size:10.0pt;&lt;br /&gt;	mso-bidi-font-size:10.0pt;&lt;br /&gt;	mso-ascii-font-family:Calibri;&lt;br /&gt;	mso-hansi-font-family:Calibri;}&lt;br /&gt;@page Section1&lt;br /&gt;	{size:8.5in 11.0in;&lt;br /&gt;	margin:1.0in 1.0in 1.0in 1.0in;&lt;br /&gt;	mso-header-margin:.5in;&lt;br /&gt;	mso-footer-margin:.5in;&lt;br /&gt;	mso-paper-source:0;}&lt;br /&gt;div.Section1&lt;br /&gt;	{page:Section1;}&lt;br /&gt; /* List Definitions */&lt;br /&gt; @list l0&lt;br /&gt;	{mso-list-id:816265397;&lt;br /&gt;	mso-list-type:hybrid;&lt;br /&gt;	mso-list-template-ids:1323618666 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}&lt;br /&gt;@list l0:level1&lt;br /&gt;	{mso-level-tab-stop:none;&lt;br /&gt;	mso-level-number-position:left;&lt;br /&gt;	text-indent:-.25in;}&lt;br /&gt;ol&lt;br /&gt;	{margin-bottom:0in;}&lt;br /&gt;ul&lt;br /&gt;	{margin-bottom:0in;}&lt;br /&gt;--&gt;&lt;br /&gt;&lt;/style&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 10pt;"&gt;Think the contest score boards are wrong? Here's your chance to come up with the right rankings.Contestants are ranked first by the number of problems solved (the more the better), then by decreasing amounts of penalty time. If two or more contestants are tied in both problems solved and penalty time, they are displayed in order of increasing team numbers. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;u&gt;&lt;span style="color: #002060; font-family: Consolas; font-size: 10pt;"&gt;A problem is considered solved by a contestant if any of the submissions for that problem was judged correct. Penalty time is computed as the number of minutes it took for the first correct submission for a problem to be received plus 20 minutes for each incorrect submission received prior to the correct solution. Unsolved problems incur no time penalties. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="color: #002060; font-family: Consolas; font-size: 12pt;"&gt;Input:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 10pt;"&gt;The input begins with a single positive integer on a line by itself indicating the number of the cases following, each of them as described below. This line is followed by a blank line, and there is also a blank line between two consecutive inputs&lt;b&gt;.&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 10pt;"&gt;Input consists of &lt;b&gt;&lt;u&gt;&lt;span style="color: #002060;"&gt;a snapshot of the judging queue&lt;/span&gt;, &lt;span style="color: #002060;"&gt;containing entries from some or all of contestants 1 through 100 solving problems 1 through 9. Each line of input will consist of three numbers&lt;/span&gt; and &lt;span style="color: #002060;"&gt;a letter in the format &lt;i&gt;contestant&lt;/i&gt; &lt;i&gt;problem&lt;/i&gt; &lt;i&gt;time&lt;/i&gt; &lt;i&gt;L&lt;/i&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;span style="color: #002060;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 10pt;"&gt;where &lt;i&gt;L&lt;/i&gt; can be &lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 10pt;"&gt;C&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 10pt;"&gt;, &lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 10pt;"&gt;I&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 10pt;"&gt;, &lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 10pt;"&gt;R&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 10pt;"&gt;, &lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 10pt;"&gt;U&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 10pt;"&gt; or &lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 10pt;"&gt;E&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 10pt;"&gt;. These stand for Correct, Incorrect, clarification Request, Unjudged and Erroneous submission. The last three cases do not affect scoring.Lines of input are in the order in which submissions were received. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="color: #002060; font-family: Consolas; font-size: 12pt;"&gt;Output:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: Consolas; font-size: 10pt;"&gt;For each test case, the output must follow the description below. &lt;u&gt;&lt;span style="color: #002060;"&gt;The outputs of two consecutive cases will be separated by a blank &lt;/span&gt;&lt;/u&gt;line.&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Consolas; font-size: 10pt;"&gt;Output will consist of a scoreboard sorted as previously described&lt;b&gt;&lt;u&gt;&lt;span style="color: #002060;"&gt;. Each line of output will contain a contestant number, the number of problems solved by the contestant and the time penalty accumulated by the contestant. Since not all of contestants 1-100 are actually participating, display only the contestants that have made a submission. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" height="1065" style="border-collapse: collapse; border: medium none; width: 415px;"&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;   &lt;td style="border: 1pt solid black; padding: 0in 5.4pt; width: 239.4pt;" valign="top" width="319"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt;"&gt;Sample Input:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;5&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;1   1 20 C&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;1   1 25 C&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;1   2 10 I&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;3   1 11 C&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;1   2 19 R&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;1   2 21 C&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;1   1 25 C&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;1   2 10 I&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;3   1 11 C&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;1   2 19 R&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;1   2 21 C&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;1   1 25 C&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;1   3 20 I&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;5   1 30 I&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;3   2 10 C&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;4   1 30 I&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;38   1 0 C&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;48   1 1 R&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;83   1 2 E&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;89   9 3 R&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;7   5 4 R&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;68   1 5 U&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;61   1 6 U&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;27   1 7 R&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;21   7 8 R&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;55   2 9 I&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;54   1 10 U&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;69   1 11 C&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;59   2 12 I&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;43   3 13 I&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;7   9 14 R&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;84   6 15 R&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;52   8 16 C&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;32   7 17 C&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;87   7 18 U&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;44   1 19 I&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;87   6 20 I&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;21   6 21 U&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;6   4 22 E&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;44   8 23 I&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;72   5 24 R&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;35   1 25 E&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;57   4 26 E&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;24   5 27 C&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;30   3 28 I&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;85   9 29 I&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;72   5 30 U&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;30   7 31 U&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;8   5 32 R&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;88   1 33 I&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;61   2 34 C&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;35   6 35 R&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;77   4 36 C&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;46   8 37 I&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;21   9 38 E&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;74   3 39 R&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;7   4 40 U&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;25   4 41 R&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;48   1 42 I&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;87   1 43 C&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;84   3 44 U&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;96   9 45 U&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;60   5 46 R&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;75   2 47 I&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;29   4 48 E&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;3   7 49 I&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;1   2 10 I&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;3   1 11 C&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;1   2 19 R&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;1   2 21 C&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;1   1 25 C&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;1   3 20 I&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;1   4 40 I&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;8   4 50 I&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border-color: black black black -moz-use-text-color; border-style: solid solid solid none; border-width: 1pt 1pt 1pt medium; padding: 0in 5.4pt; width: 239.4pt;" valign="top" width="319"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt;"&gt;Sample Output:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;1 1 20&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;1 2 66&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;3 1 11&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;3 2 21&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;1 2 66&lt;/span&gt;&lt;/code&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;br /&gt;4 0 0&lt;br /&gt;&lt;code&gt;5 0 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;38 1 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;69 1 11&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;52 1 16&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;32 1 17&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;24 1 27&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;61 1 34&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;77 1 36&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;87 1 43&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;3 0 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;6 0 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;7 0 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;8 0 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;21 0 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;25 0 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;27 0 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;29 0 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;30 0 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;35 0 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;43 0 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;44 0 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;46 0 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;48 0 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;54 0 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;55 0 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;57 0 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;59 0 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;60 0 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;68 0 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;72 0 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;74 0 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;75 0 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;83 0 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;84 0 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;85 0 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;88 0 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;89 0 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;96 0 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;code&gt;&lt;span style="font-size: 10pt;"&gt;1 2 66&lt;/span&gt;&lt;/code&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;br /&gt;&lt;code&gt;3 1 11&lt;/code&gt;&lt;br /&gt;&lt;code&gt;8 0 0&lt;/code&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;i&gt;&lt;span style="font-size: large;"&gt;Hinds:&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;Big problem is&amp;nbsp; to take input:&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;Solution:&lt;br /&gt;&lt;/div&gt;&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; border: medium none;"&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;   &lt;td style="border: 1pt solid black; padding: 0in 5.4pt; width: 6.65in;" valign="top" width="638"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="color: #002060;"&gt;gets(str);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="color: #002060;"&gt;if(strlen(str)==0)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="color: #002060;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   break;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="color: #002060;"&gt;sscanf(str,”%d %d %d   %c”,&amp;amp;tn,&amp;amp;pn,&amp;amp;rt,&amp;amp;ch);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="MsoListParagraphCxSpFirst" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;1.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Remember, when a solution is accepted then penalty time is added .otherwise not.&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;2.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;First sort descending order according to total solved problem, if equal , then sort ascending order according to penalty time, if equal ,then sort ascending order according to team number&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;3.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Same problem can accept twice; take only first time, other is ignored (see first input).&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;4.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Use structure &amp;amp; use qsort function.&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;5.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Initialize the data correctly.&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;6.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #002060; font-family: Consolas; font-size: 10pt;"&gt;The outputs of two consecutive cases will be separated by a blank &lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 10pt;"&gt;line.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpLast" style="line-height: normal; margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;7.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #002060; font-family: Consolas; font-size: 10pt;"&gt;Last has no newline…Be Careful.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;Try owning ….&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;If can’t, take the code….&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div style="color: blue; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;DOWNLOAD DOCUMENT FILE : &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://ruetacm.wordpress.com/files/2009/11/doc10258.doc" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s320/download.gif" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://ruetacm.wordpress.com/files/2009/11/doc10258.doc"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-size: x-large;"&gt;Download to click&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6456446978653192228-6944848585821749879?l=ruetprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ruetprogrammer.blogspot.com/feeds/6944848585821749879/comments/default' title='মন্তব্যগুলি পোস্ট করুন'/><link rel='replies' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/10258contest-scoreboard.html#comment-form' title='0টি মন্তব্য'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/6944848585821749879'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/6944848585821749879'/><link rel='alternate' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/10258contest-scoreboard.html' title='10258.Contest Scoreboard'/><author><name>computer science &amp;amp; Engineering</name><uri>http://www.blogger.com/profile/01145894902967208519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s72-c/download.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6456446978653192228.post-6007366872948971135</id><published>2009-11-18T05:42:00.000-08:00</published><updated>2009-11-24T13:25:04.330-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ad Hoc'/><title type='text'>10252.common permutation</title><content type='html'>&lt;blockquote&gt;Given two strings of lowercase letters, a and b, print the longest string x of lowercase letters such that there is a permutation of x that is a subsequence of a and there is a permutation of x that is a subsequence of b. &lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;Input&lt;br /&gt;Input file contains several lines of input. Consecutive two lines make a set of input. That means in the input file line 1 and 2 is a set of input, line 3 and 4 is a set of input and so on. The first line of a pair contains a and the second contains b. Each string is on a separate line and consists of at most 1000 lowercase letters.&lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;br /&gt;Output&lt;br /&gt;For each set of input, output a line containing x. If several x satisfy the criteria above, choose the first one in alphabetical order. &lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;Sample Input:&lt;br /&gt;&lt;br /&gt;icky&lt;br /&gt;pretty&lt;br /&gt;women&lt;br /&gt;walking&lt;br /&gt;down&lt;br /&gt;the&lt;br /&gt;street&lt;br /&gt;meningitis&lt;br /&gt;frontal&lt;br /&gt;yelp&lt;br /&gt;&lt;br /&gt;verbatim&lt;br /&gt;greater&lt;br /&gt;prettywoman&lt;br /&gt;walkingdown&lt;br /&gt;inging&lt;br /&gt;singing&lt;br /&gt;ab&lt;br /&gt;ba&lt;br /&gt;ab&lt;br /&gt;cd&lt;br /&gt;cat &lt;br /&gt;bat &lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;Sample Output:&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;e &lt;br /&gt;nw &lt;br /&gt;et &lt;br /&gt;nt &lt;br /&gt;&lt;br /&gt;aert &lt;br /&gt;anow &lt;br /&gt;ggiinn &lt;br /&gt;ab &lt;br /&gt;&lt;br /&gt;at &lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div style="color: #990000;"&gt;&lt;b&gt;!Be careful: here may be empty lines in the input.&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: blue; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;Discussion:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;i&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;You can use straightforward algorithm or the following:&lt;/b&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;i&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;1. First take two array A[],B[],sort two input by using qsort() function.&lt;/b&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;i&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;2. Each char of two string is convert into integer n then A[n]++ for A[] and B[n]++ for B[].&lt;/b&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;i&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;3. Then from i=97 to 122  a to z element of A[] &amp;amp; B[] check, if both have value greater than 0 then take m=min(A[i],B[i]). Convert I to char ch. Ch print m times&lt;/b&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;i&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;4. Print newline.&lt;/b&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div style="color: blue; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;DOWNLOAD DOCUMENT FILE : &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://ruetacm.wordpress.com/files/2009/11/doc10252.doc" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s320/download.gif" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://ruetacm.wordpress.com/files/2009/11/doc10252.doc"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-size: x-large;"&gt;Download to click&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6456446978653192228-6007366872948971135?l=ruetprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ruetprogrammer.blogspot.com/feeds/6007366872948971135/comments/default' title='মন্তব্যগুলি পোস্ট করুন'/><link rel='replies' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/10252common-permutation.html#comment-form' title='0টি মন্তব্য'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/6007366872948971135'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/6007366872948971135'/><link rel='alternate' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/10252common-permutation.html' title='10252.common permutation'/><author><name>computer science &amp;amp; Engineering</name><uri>http://www.blogger.com/profile/01145894902967208519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s72-c/download.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6456446978653192228.post-769570001838762698</id><published>2009-11-18T05:29:00.000-08:00</published><updated>2009-11-24T13:25:04.338-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Math (Big Integer)'/><title type='text'>10213.How many pieces of land</title><content type='html'>&lt;blockquote&gt;You are given an elliptical shaped land and you are asked to choose n arbitrary points on its boundary. Then you connect all these points with one another with straight lines (that’s n*(n-1)/2 connections for n points). What is the maximum number of pieces of land you will get by choosing the points on the boundary carefully? &lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_zXj0Tqphc4M/SwPznqZR4iI/AAAAAAAAApg/Jr2vixuTS2Y/s1600/p10213.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_zXj0Tqphc4M/SwPznqZR4iI/AAAAAAAAApg/Jr2vixuTS2Y/s320/p10213.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;Fig: When the value of n is 6. &lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;Input&lt;br /&gt;The first line of the input file contains one integer S (0 &amp;lt; S &amp;lt; 3500), which indicates how many sets of input are there. The next S lines contain S sets of input. Each input contains one integer N (0&amp;lt;=N&amp;lt;2^31).&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;Output&lt;br /&gt;For each set of input you should output in a single line the maximum number pieces of land possible to get for the value of N.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;Sample Input:&lt;br /&gt;4&lt;br /&gt;1&lt;br /&gt;2&lt;br /&gt;3&lt;br /&gt;4 Sample Output:&lt;br /&gt;1&lt;br /&gt;2&lt;br /&gt;4&lt;br /&gt;8&lt;br /&gt;&lt;/blockquote&gt;&lt;div style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;Description: &lt;i&gt;presented by rizoan toufiq&lt;/i&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;blockquote&gt;F(N) = ( N * (N-1) * (N*N-5*N+18) / 24 ) + 1 &lt;br /&gt;proof:&lt;br /&gt;oh......that is quite difficult to tell you the proof by text......hope you will understand what I say:Let P(n) be the number of lands when n points are drawn on circle…. Now assume knowing P(n-1), want to know P(n) by adding the n-th point&lt;br /&gt;when the n-th point draw a line to the k-th point (1 &amp;lt;= k &amp;lt;= n-1)on the LHS on k-th point, there is k-1 points between k-th and n-th point on the RHS on k-th point, there is (n-1)-k+1 points between k-th and n-th point the points in these 2 sets(LHS, RHS) are completely connected,so there are (k-1)*(n-k) lines crossed by the newly drawn line,creating (k-1)*(n-k)+1 new lands......&lt;br /&gt;So, drawing lines from newly added n-th point to all n-1 old points,&lt;br /&gt;will create  summation[(k-1)(j-k)+1] {k = 1..j (j = n-1)} new lands&lt;br /&gt;let says the summation be F(j)&lt;br /&gt;P(n)= P(n-1) + F(n-1)&lt;br /&gt;= P(n-2) + F(n-2) + F(n-1)&lt;br /&gt;.....&lt;br /&gt;= P(0) + F(1) + F(2) + ....... + F(n-1)&lt;br /&gt;= 1 + summation(F(i)) {i = 1..n-1}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;by using formula of summation to simplify the equatoin(what a difficult job.....)&lt;br /&gt;I get answer = (i - 1) * i * (i * i - 5 * i + 18) / 24 + 1;&lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div style="color: blue; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;DOWNLOAD DOCUMENT FILE : &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://ruetacm.wordpress.com/files/2009/11/10213doc.doc" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s320/download.gif" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://ruetacm.wordpress.com/files/2009/11/10213doc.doc"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-size: x-large;"&gt;Download to click&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6456446978653192228-769570001838762698?l=ruetprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ruetprogrammer.blogspot.com/feeds/769570001838762698/comments/default' title='মন্তব্যগুলি পোস্ট করুন'/><link rel='replies' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/10213how-many-pieces-of-land.html#comment-form' title='0টি মন্তব্য'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/769570001838762698'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/769570001838762698'/><link rel='alternate' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/10213how-many-pieces-of-land.html' title='10213.How many pieces of land'/><author><name>computer science &amp;amp; Engineering</name><uri>http://www.blogger.com/profile/01145894902967208519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_zXj0Tqphc4M/SwPznqZR4iI/AAAAAAAAApg/Jr2vixuTS2Y/s72-c/p10213.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6456446978653192228.post-2076150884783317129</id><published>2009-11-17T23:27:00.000-08:00</published><updated>2009-11-24T13:25:04.345-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ad Hoc'/><title type='text'>10137.the trip</title><content type='html'>&lt;blockquote&gt;A number of students are members of a club that travels annually to exotic locations. Their destinations in the past have included Indianapolis, Phoenix, Nashville, Philadelphia, San Jose, and Atlanta. This spring they are planning a trip to Eindhoven. &lt;br /&gt;The group agrees in advance to share expenses equally, but it is not practical to have them share every expense as it occurs. So individuals in the group pay for particular things, like meals, hotels, taxi rides, plane tickets, etc. After the trip, each student's expenses are tallied and money is exchanged so that the net cost to each is the same, to within one cent. In the past, this money exchange has been tedious and time consuming. Your job is to compute, from a list of expenses, the minimum amount of money that must change hands in order to equalize (within a cent) all the students' costs. &lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;b&gt;The Input&lt;/b&gt;&lt;br /&gt;Standard input will contain the information for several trips. The information for each trip consists of a line containing a positive integer, n, the number of students on the trip, followed by n lines of input, each containing the amount, in dollars and cents, spent by a student. There are no more than 1000 students and no student spent more than $10,000.00. A single line containing 0 follows the information for the last trip. &lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;b&gt;The Output&lt;/b&gt;&lt;br /&gt;For each trip, output a line stating the total amount of money, in dollars and cents, that must be exchanged to equalize the students' costs. &lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Sample Input &lt;br /&gt;3&lt;br /&gt;10.00&lt;br /&gt;20.00&lt;br /&gt;30.00&lt;br /&gt;4&lt;br /&gt;15.00&lt;br /&gt;15.01&lt;br /&gt;3.00&lt;br /&gt;3.01&lt;br /&gt;0 &lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;b&gt;Output for Sample Input &lt;/b&gt;&lt;br /&gt;$10.00&lt;br /&gt;$11.99&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;Tips:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;1. &lt;br /&gt;If (currentStudentPayment &amp;gt; averagePayment)&lt;br /&gt;positiveDifference += currentStudentPayment - averagePayment;&lt;br /&gt;Else&lt;br /&gt;negativeDifference += averagePayment - currentStudentPayment;&lt;br /&gt;&lt;br /&gt;if(negativeDifference &amp;gt; positiveDifference)&lt;br /&gt;return negativeDifference&lt;br /&gt;else&lt;br /&gt;return positiveDifference&lt;br /&gt;&lt;br /&gt;2. Here negative or positive difference must be int which is the tic of this problem&lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;b&gt;More Specific hinds:&lt;/b&gt;&lt;br /&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;he problem with this problem may be related   to precision error. Here is solution by Neilor:&lt;/span&gt; &lt;br /&gt;&lt;div align="left" style="margin-left: 10px; margin-right: 10px;"&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;double highx = (int)((total/n+0.&lt;wbr&gt;&lt;/wbr&gt;0099)*100);&lt;br /&gt;double lowx = (int)((total/n)*100);&lt;br /&gt;highx /= 100;&lt;br /&gt;lowx /= 100;&lt;br /&gt;Where total is the total sum of the money and n is the number of students.&lt;br /&gt;&lt;br /&gt;Then, test each student money if is &amp;gt; than highx or &amp;lt; than lowx, accumulate   (student[i]-highx) or (lowx-students[i]), respectively.&lt;br /&gt;Then, output the variable that have the bigger value.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div style="color: blue; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;DOWNLOAD DOCUMENT FILE : &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://ruetacm.wordpress.com/files/2009/11/10137code.doc" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s320/download.gif" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://ruetacm.wordpress.com/files/2009/11/10137code.doc"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-size: x-large;"&gt;Download to click&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6456446978653192228-2076150884783317129?l=ruetprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ruetprogrammer.blogspot.com/feeds/2076150884783317129/comments/default' title='মন্তব্যগুলি পোস্ট করুন'/><link rel='replies' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/10137the-trip.html#comment-form' title='0টি মন্তব্য'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/2076150884783317129'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/2076150884783317129'/><link rel='alternate' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/10137the-trip.html' title='10137.the trip'/><author><name>computer science &amp;amp; Engineering</name><uri>http://www.blogger.com/profile/01145894902967208519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s72-c/download.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6456446978653192228.post-8813667889487673459</id><published>2009-11-17T23:20:00.000-08:00</published><updated>2009-11-24T13:25:04.352-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Graph'/><title type='text'>10116.robot motion</title><content type='html'>&lt;blockquote style="color: #990000;"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_zXj0Tqphc4M/SwOfkjuSZNI/AAAAAAAAApY/Tub0CpsgEdE/s1600/P10116.GIF" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_zXj0Tqphc4M/SwOfkjuSZNI/AAAAAAAAApY/Tub0CpsgEdE/s320/P10116.GIF" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;b&gt;A robot has been programmed to follow the instructions in its path. Instructions for the next direction the robot is to move are laid down in a grid. The possible instructions are&lt;/b&gt;&lt;br /&gt;&lt;b&gt;N north (up the page)&lt;/b&gt;&lt;br /&gt;&lt;b&gt;S south (down the page)&lt;/b&gt;&lt;br /&gt;&lt;b&gt;E east (to the right on the page)&lt;/b&gt;&lt;br /&gt;&lt;b&gt;W west (to the left on the page)&lt;/b&gt;&lt;br /&gt;&lt;b&gt;For example, suppose the robot starts on the north (top) side of Grid 1 and starts south (down). The path the robot follows is shown. The robot goes through 10 instructions in the grid before leaving the grid.&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Compare what happens in Grid 2: the robot goes through 3 instructions only once, and then starts a loop through 8 instructions, and never exits.&lt;/b&gt;&lt;br /&gt;&lt;b&gt;You are to write a program that determines how long it takes a robot to get out of the grid or how the robot loops around.&lt;/b&gt;&lt;br /&gt;&lt;b&gt;There will be one or more grids for robots to navigate. The data for each is in the following form. On the first line are three integers separated by blanks: the number of rows in the grid, the number of columns in the grid, and the number of the column in which the robot enters from the north. The possible entry columns are numbered starting with one at the left. Then come the rows of the direction instructions. Each grid will have at least one and at most 10 rows and columns of instructions. The lines of instructions contain only the characters N, S, E, or W with no blanks. The end of input is indicated by a row containing 0 0 0.&lt;/b&gt;&lt;br /&gt;&lt;b&gt;For each grid in the input there is one line of output. Either the robot follows a certain number of instructions and exits the grid on any one the four sides or else the robot follows the instructions on a certain number of locations once, and then the instructions on some number of locations repeatedly. The sample input below corresponds to the two grids above and illustrates the two forms of output. The word "step" is always immediately followed by "(s)" whether or not the number before it is 1.&lt;/b&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;b&gt;Example input:&lt;/b&gt;&lt;br /&gt;3 6 5&lt;br /&gt;NEESWE&lt;br /&gt;WWWESS&lt;br /&gt;SNWWWW&lt;br /&gt;4 5 1&lt;br /&gt;SESWE&lt;br /&gt;EESNW&lt;br /&gt;NWEEN&lt;br /&gt;EWSEN&lt;br /&gt;0 0 0&lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;b&gt;Example output:&lt;/b&gt;&lt;br /&gt;10 step(s) to exit&lt;br /&gt;3 step(s) before a loop of 8 step(s) &lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Tips:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;1. First you have to input correctly.&lt;br /&gt;2. Take two array on is indicate input array other array element represent movement number.&lt;br /&gt;3. If out of col or row then only print count step&lt;br /&gt;4. Otherwise count -arry count current position value -1&lt;br /&gt;5. And count= count-loop count;&lt;br /&gt;6. End&lt;br /&gt;&lt;/blockquote&gt;&lt;div style="color: blue; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;DOWNLOAD DOCUMENT FILE : &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://ruetacm.wordpress.com/files/2009/11/10116doc.doc" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s320/download.gif" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://ruetacm.wordpress.com/files/2009/11/10116doc.doc"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-size: x-large;"&gt;Download to click&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6456446978653192228-8813667889487673459?l=ruetprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ruetprogrammer.blogspot.com/feeds/8813667889487673459/comments/default' title='মন্তব্যগুলি পোস্ট করুন'/><link rel='replies' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/10116robot-motion.html#comment-form' title='0টি মন্তব্য'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/8813667889487673459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/8813667889487673459'/><link rel='alternate' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/10116robot-motion.html' title='10116.robot motion'/><author><name>computer science &amp;amp; Engineering</name><uri>http://www.blogger.com/profile/01145894902967208519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_zXj0Tqphc4M/SwOfkjuSZNI/AAAAAAAAApY/Tub0CpsgEdE/s72-c/P10116.GIF' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6456446978653192228.post-5446864346678055837</id><published>2009-11-17T23:13:00.000-08:00</published><updated>2009-11-24T13:25:04.454-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ad Hoc'/><title type='text'>10062.Tell me the frequencies!</title><content type='html'>&lt;blockquote&gt;Given a line of text you will have to find out the frequencies of the ASCII characters present in it. The given lines will contain none of the first 32 or last 128 ASCII characters. Of course lines may end with ‘\n’ and ‘\r’ but always keep those out of consideration. &lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;b&gt;Input&lt;/b&gt;&lt;br /&gt;Several lines of text are given as input. Each line of text is considered as a single input. Maximum length of each line is 1000.&lt;br /&gt;&lt;/blockquote&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;b&gt;Output&lt;/b&gt;&lt;br /&gt;Print the ASCII value of the ASCII characters which are present and their frequency according to the given format below. A blank line should separate each set of output. Print the ASCII characters in the ascending order of their frequencies. If two characters are present the same time print the information of the ASCII character with higher ASCII value first. Input is terminated by end of file. &lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;b&gt;Sample Input:&lt;/b&gt;&lt;br /&gt;AAABBC&lt;br /&gt;122333&lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;b&gt;Sample Output:&lt;/b&gt;&lt;br /&gt;67 1&lt;br /&gt;66 2&lt;br /&gt;65 3&lt;br /&gt;&lt;br /&gt;49 1&lt;br /&gt;50 2&lt;br /&gt;51 3&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: x-large;"&gt;&lt;b&gt;Tics:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: red;"&gt;&lt;b&gt;1. Declear a structure like: struct arra{ int ascii,int fre} a[128];&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: red;"&gt;&lt;b&gt;2. Store a[m].ascii=m and a[m].fre++&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: red;"&gt;&lt;b&gt;3.  Sort frequency wise and if both fre. Are equal the first large ascii&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: red;"&gt;&lt;b&gt;4. Loop is continue from 32 to 127&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: red;"&gt;&lt;b&gt;5. Print newline exactly. No etra new line at the end of the output.&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div style="color: blue; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;DOWNLOAD DOCUMENT FILE : &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://ruetacm.wordpress.com/files/2009/11/10062doc.doc" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s320/download.gif" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://ruetacm.wordpress.com/files/2009/11/10062doc.doc"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-size: x-large;"&gt;Download to click&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6456446978653192228-5446864346678055837?l=ruetprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ruetprogrammer.blogspot.com/feeds/5446864346678055837/comments/default' title='মন্তব্যগুলি পোস্ট করুন'/><link rel='replies' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/10062tell-me-frequencies.html#comment-form' title='0টি মন্তব্য'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/5446864346678055837'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/5446864346678055837'/><link rel='alternate' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/10062tell-me-frequencies.html' title='10062.Tell me the frequencies!'/><author><name>computer science &amp;amp; Engineering</name><uri>http://www.blogger.com/profile/01145894902967208519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s72-c/download.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6456446978653192228.post-8073719484860837253</id><published>2009-11-17T23:05:00.000-08:00</published><updated>2009-11-24T13:25:04.471-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='prime Number'/><category scheme='http://www.blogger.com/atom/ns#' term='Math'/><title type='text'>10042.Smith Numbers</title><content type='html'>&lt;blockquote&gt;&lt;div style="color: blue;"&gt;&lt;b&gt;Background  &lt;/b&gt;&lt;br /&gt;&lt;/div&gt;While skimming his phone directory in 1982, Albert Wilansky, a mathematician of Lehigh University , noticed that the telephone number of his brother-in-law H. Smith had the following peculiar property: The sum of the digits of that number was equal to the sum of the digits of the prime factors of that number. Got it? Smith's telephone number was 493-7775. This number can be written as the product of its prime factors in the following way: &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The sum of all digits of the telephone number is 4+9+3+7+7+7+5=42, and the sum of the digits of its prime factors is equally 3+5+5+6+5+8+3+7=42. Wilansky was so amazed by his discovery that he named this type of numbers after his brother-in-law: Smith numbers. &lt;br /&gt;As this observation is also true for every prime number, Wilansky decided later that a (simple and unsophisticated) prime number is not worth being a Smith number and he excluded them from the definition. &lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div style="color: blue;"&gt;&lt;b&gt;Problem  &lt;/b&gt;&lt;br /&gt;&lt;/div&gt;Wilansky published an article about Smith numbers in the Two Year College Mathematics Journal and was able to present a whole collection of different Smith numbers: For example, 9985 is a Smith number and so is 6036. However, Wilansky was not able to give a Smith number which was larger than the telephone number of his brother-in-law. It is your task to find Smith numbers which are larger than 4937775. &lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div style="color: blue;"&gt;&lt;b&gt;Input  &lt;/b&gt;&lt;br /&gt;&lt;/div&gt;The input consists of several test cases, the number of which you are given in the first line of the input. &lt;br /&gt;Each test case consists of one line containing a single positive integer smaller than 109. &lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div style="color: blue;"&gt;&lt;b&gt;Output  &lt;/b&gt;&lt;br /&gt;&lt;/div&gt;For every input value n, you are to compute the smallest Smith number which is larger than n and print each number on a single line. You can assume that such a number exists. &lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div style="color: blue;"&gt;&lt;b&gt;Sample Input  &lt;/b&gt;&lt;br /&gt;&lt;/div&gt;1&lt;br /&gt;4937774&lt;br /&gt;&lt;div style="color: blue;"&gt;&lt;b&gt;Sample Output  &lt;/b&gt;&lt;br /&gt;&lt;/div&gt;4937775&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div style="color: #990000; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Tips:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: blue; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;1. First initialize prime number , in special way&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;blockquote style="color: #cc0000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;span style="text-decoration: underline;"&gt;How we generate prime number:&lt;/span&gt;&lt;br /&gt;Let: p[]={1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; &lt;b&gt;ie p[ele]=1&lt;/b&gt; means &lt;b&gt;ele&lt;/b&gt; is a &lt;b&gt;prime&lt;/b&gt;.&lt;br /&gt;&lt;b&gt;Take i=2&lt;/b&gt; which is prime, Now p[2]=0,p[4]=0,p[6]=0,p[8]=0,p[10]=0;p[12]=0;p[14]=0;&lt;br /&gt;So now p[]={1,1,1,1,0,0,1,0,1,0,1,0,1,0,1}&lt;br /&gt;&lt;b&gt;Take i=3&lt;/b&gt; which is prime, Now p[6]=0,p[9]=0;p[12]=0;p[15]=0;&lt;br /&gt;So now p[]={1,1,1,1,0,1,0,1,0,0,0,1,0,1,0,0}&lt;br /&gt;&lt;b&gt;For i=4 , i&amp;lt;=sqrt(16) false so end&lt;/b&gt;&lt;br /&gt;P[0]=1 ;p[1]=1,p[2]=1;p[3]=1;p[5]=1,p[7]=1;p[11]=1;p[13]=1;&lt;br /&gt;Move a[0]=0,a[1]=1;a[2]=2;a[3]=3;a[4]=5;a[5]=7;a[6]=11;a[7]=13&lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div style="color: blue; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;2. Then sum each digit&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: blue; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;3. Find per factor, find sum of digit of that factor, then add it with total sum&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: blue; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;4. Check it not prime and totals are equal.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div style="color: blue; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;DOWNLOAD DOCUMENT FILE : &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://ruetacm.wordpress.com/files/2009/11/10042doc.doc" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s320/download.gif" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://ruetacm.wordpress.com/files/2009/11/10042doc.doc"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-size: x-large;"&gt;Download to click&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6456446978653192228-8073719484860837253?l=ruetprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ruetprogrammer.blogspot.com/feeds/8073719484860837253/comments/default' title='মন্তব্যগুলি পোস্ট করুন'/><link rel='replies' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/10042smith-numbers.html#comment-form' title='0টি মন্তব্য'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/8073719484860837253'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/8073719484860837253'/><link rel='alternate' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/10042smith-numbers.html' title='10042.Smith Numbers'/><author><name>computer science &amp;amp; Engineering</name><uri>http://www.blogger.com/profile/01145894902967208519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s72-c/download.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6456446978653192228.post-2423144468279688540</id><published>2009-11-17T09:48:00.000-08:00</published><updated>2009-11-24T13:25:04.462-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ad Hoc'/><title type='text'>10041   -Vito's Family</title><content type='html'>&lt;blockquote&gt;&lt;div style="background-color: blue; color: white;"&gt;&lt;b&gt;Background  &lt;/b&gt;&lt;br /&gt;&lt;/div&gt;The world-known gangster Vito Deadstone is moving to New York. He has a very big family there, all of them living in Lamafia Avenue. Since he will visit all his relatives very often, he is trying to find a house close to them. &lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div style="background-color: blue; color: white;"&gt;&lt;b&gt;Problem  &lt;/b&gt;&lt;br /&gt;&lt;/div&gt;Vito wants to minimize the total distance to all of them and has blackmailed you to write a program that solves his problem. &lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div style="background-color: blue;"&gt;&lt;span style="background-color: blue;"&gt;&lt;/span&gt;&lt;b style="color: white;"&gt;Input  &lt;/b&gt;&lt;br /&gt;&lt;/div&gt;The input consists of several test cases. The first line contains the number of test cases. &lt;br /&gt;For each test case you will be given the integer number of relatives r ( 0 &amp;lt; r &amp;lt; 500) and the street numbers (also integers)  where they live ( 0 &amp;lt; si &amp;lt; 30000 ). Note that several relatives could live in the same street number. &lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div style="background-color: blue; color: white;"&gt;&lt;b&gt;Output  &lt;/b&gt;&lt;br /&gt;&lt;/div&gt;For each test case your program must write the minimal sum of distances from the optimal Vito's house to each one of his relatives. The distance between two street numbers si and sj is dij= |si-sj|. &lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div style="background-color: blue; color: white;"&gt;&lt;b&gt;Sample Input  &lt;/b&gt;&lt;br /&gt;&lt;/div&gt;2&lt;br /&gt;2 2 4 &lt;br /&gt;3 2 4 6&lt;br /&gt;&lt;div style="background-color: blue; color: #f3f3f3;"&gt;&lt;b&gt;Sample Output  &lt;/b&gt;&lt;br /&gt;&lt;/div&gt;2&lt;br /&gt;4&lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type"&gt;&lt;/meta&gt;&lt;meta content="Word.Document" name="ProgId"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Generator"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Originator"&gt;&lt;/meta&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;&lt;br /&gt;&lt;!--&lt;br /&gt; /* Font Definitions */&lt;br /&gt; @font-face&lt;br /&gt;	{font-family:"Cambria Math";&lt;br /&gt;	panose-1:2 4 5 3 5 4 6 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:roman;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1107304683 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:Calibri;&lt;br /&gt;	panose-1:2 15 5 2 2 2 4 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:swiss;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1073750139 0 0 159 0;}&lt;br /&gt; /* Style Definitions */&lt;br /&gt; p.MsoNormal, li.MsoNormal, div.MsoNormal&lt;br /&gt;	{mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-parent:"";&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:0in;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-language:AR-SA;}&lt;br /&gt;p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph&lt;br /&gt;	{mso-style-priority:34;&lt;br /&gt;	mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:.5in;&lt;br /&gt;	mso-add-space:auto;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-language:AR-SA;}&lt;br /&gt;p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst&lt;br /&gt;	{mso-style-priority:34;&lt;br /&gt;	mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-type:export-only;&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:0in;&lt;br /&gt;	margin-left:.5in;&lt;br /&gt;	margin-bottom:.0001pt;&lt;br /&gt;	mso-add-space:auto;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-language:AR-SA;}&lt;br /&gt;p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle&lt;br /&gt;	{mso-style-priority:34;&lt;br /&gt;	mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-type:export-only;&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:0in;&lt;br /&gt;	margin-left:.5in;&lt;br /&gt;	margin-bottom:.0001pt;&lt;br /&gt;	mso-add-space:auto;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-language:AR-SA;}&lt;br /&gt;p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast&lt;br /&gt;	{mso-style-priority:34;&lt;br /&gt;	mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-type:export-only;&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:.5in;&lt;br /&gt;	mso-add-space:auto;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-language:AR-SA;}&lt;br /&gt;.MsoChpDefault&lt;br /&gt;	{mso-style-type:export-only;&lt;br /&gt;	mso-default-props:yes;&lt;br /&gt;	font-size:10.0pt;&lt;br /&gt;	mso-ansi-font-size:10.0pt;&lt;br /&gt;	mso-bidi-font-size:10.0pt;&lt;br /&gt;	mso-ascii-font-family:Calibri;&lt;br /&gt;	mso-hansi-font-family:Calibri;}&lt;br /&gt;@page Section1&lt;br /&gt;	{size:8.5in 11.0in;&lt;br /&gt;	margin:1.0in 1.0in 1.0in 1.0in;&lt;br /&gt;	mso-header-margin:.5in;&lt;br /&gt;	mso-footer-margin:.5in;&lt;br /&gt;	mso-paper-source:0;}&lt;br /&gt;div.Section1&lt;br /&gt;	{page:Section1;}&lt;br /&gt; /* List Definitions */&lt;br /&gt; @list l0&lt;br /&gt;	{mso-list-id:96489948;&lt;br /&gt;	mso-list-type:hybrid;&lt;br /&gt;	mso-list-template-ids:225115324 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}&lt;br /&gt;@list l0:level1&lt;br /&gt;	{mso-level-tab-stop:none;&lt;br /&gt;	mso-level-number-position:left;&lt;br /&gt;	text-indent:-.25in;}&lt;br /&gt;ol&lt;br /&gt;	{margin-bottom:0in;}&lt;br /&gt;ul&lt;br /&gt;	{margin-bottom:0in;}&lt;br /&gt;--&gt;&lt;br /&gt;&lt;/style&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="color: #990000; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif; line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-size: small;"&gt;Tics:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpFirst" style="color: #990000; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif; line-height: normal; margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;b&gt;&lt;span style="font-size: small;"&gt;1.&lt;span style="font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp; &lt;/span&gt;Sort the street number&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="color: #990000; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif; line-height: normal; margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;b&gt;&lt;span style="font-size: small;"&gt;2.&lt;span style="font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp; &lt;/span&gt;Find median&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpLast" style="line-height: normal; margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;b style="color: #990000;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;3.&lt;span style="font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 9pt;"&gt;&lt;b style="color: #990000;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;Find summation of distance from median to street number i.e dis+=|median-s&lt;/span&gt;&lt;sub style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;i&lt;/sub&gt;&lt;span style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;|&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: blue; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;DOWNLOAD DOCUMENT FILE : &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://ruetacm.wordpress.com/files/2009/11/10041doc.doc" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s320/download.gif" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://ruetacm.wordpress.com/files/2009/11/10041doc.doc"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-size: x-large;"&gt;Download to click&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6456446978653192228-2423144468279688540?l=ruetprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ruetprogrammer.blogspot.com/feeds/2423144468279688540/comments/default' title='মন্তব্যগুলি পোস্ট করুন'/><link rel='replies' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/10041-vito-family.html#comment-form' title='0টি মন্তব্য'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/2423144468279688540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/2423144468279688540'/><link rel='alternate' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/10041-vito-family.html' title='10041   -Vito&amp;#39;s Family'/><author><name>computer science &amp;amp; Engineering</name><uri>http://www.blogger.com/profile/01145894902967208519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s72-c/download.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6456446978653192228.post-7098482335852181374</id><published>2009-11-17T07:18:00.000-08:00</published><updated>2009-11-24T13:25:04.478-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Math'/><title type='text'>10035- Primary Arithmetic</title><content type='html'>&lt;blockquote&gt;Children are taught to add multi-digit numbers from right-to-left one digit at a time. Many find the "carry" operation - in which a 1 is carried from one digit position to be added to the next - to be a significant challenge. Your job is to count the number of carry operations for each of a set of addition problems so that educators may assess their difficulty. &lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Input&lt;br /&gt;Each line of input contains two unsigned integers less than 10 digits. The last line of input contains 0 0. &lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Output&lt;br /&gt;For each line of input except the last you should compute and print the number of carry operations that would result from adding the two numbers, in the format shown below. &lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div style="color: blue;"&gt;&lt;b&gt;Sample Input&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;123 456&lt;br /&gt;555 555&lt;br /&gt;123 594&lt;br /&gt;0 0&lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div style="color: blue;"&gt;&lt;b&gt;Sample Output &lt;/b&gt;&lt;br /&gt;&lt;/div&gt;No carry operation.&lt;br /&gt;3 carry operations.&lt;br /&gt;1 carry operation.&lt;br /&gt;&lt;/blockquote&gt;&lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type"&gt;&lt;/meta&gt;&lt;meta content="Word.Document" name="ProgId"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Generator"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Originator"&gt;&lt;/meta&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;&lt;br /&gt;&lt;!--&lt;br /&gt; /* Font Definitions */&lt;br /&gt; @font-face&lt;br /&gt;	{font-family:"Cambria Math";&lt;br /&gt;	panose-1:2 4 5 3 5 4 6 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:roman;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1107304683 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:Calibri;&lt;br /&gt;	panose-1:2 15 5 2 2 2 4 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:swiss;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1073750139 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:Consolas;&lt;br /&gt;	panose-1:2 11 6 9 2 2 4 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:modern;&lt;br /&gt;	mso-font-pitch:fixed;&lt;br /&gt;	mso-font-signature:-1610611985 1073750091 0 0 159 0;}&lt;br /&gt; /* Style Definitions */&lt;br /&gt; p.MsoNormal, li.MsoNormal, div.MsoNormal&lt;br /&gt;	{mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-parent:"";&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:0in;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";}&lt;br /&gt;p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph&lt;br /&gt;	{mso-style-priority:34;&lt;br /&gt;	mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:.5in;&lt;br /&gt;	mso-add-space:auto;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";}&lt;br /&gt;p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst&lt;br /&gt;	{mso-style-priority:34;&lt;br /&gt;	mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-type:export-only;&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:0in;&lt;br /&gt;	margin-left:.5in;&lt;br /&gt;	margin-bottom:.0001pt;&lt;br /&gt;	mso-add-space:auto;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";}&lt;br /&gt;p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle&lt;br /&gt;	{mso-style-priority:34;&lt;br /&gt;	mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-type:export-only;&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:0in;&lt;br /&gt;	margin-left:.5in;&lt;br /&gt;	margin-bottom:.0001pt;&lt;br /&gt;	mso-add-space:auto;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";}&lt;br /&gt;p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast&lt;br /&gt;	{mso-style-priority:34;&lt;br /&gt;	mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-type:export-only;&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:.5in;&lt;br /&gt;	mso-add-space:auto;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";}&lt;br /&gt;.MsoChpDefault&lt;br /&gt;	{mso-style-type:export-only;&lt;br /&gt;	mso-default-props:yes;&lt;br /&gt;	font-size:10.0pt;&lt;br /&gt;	mso-ansi-font-size:10.0pt;&lt;br /&gt;	mso-bidi-font-size:10.0pt;&lt;br /&gt;	mso-ascii-font-family:Calibri;&lt;br /&gt;	mso-hansi-font-family:Calibri;}&lt;br /&gt;@page Section1&lt;br /&gt;	{size:8.5in 11.0in;&lt;br /&gt;	margin:1.0in 1.0in 1.0in 1.0in;&lt;br /&gt;	mso-header-margin:.5in;&lt;br /&gt;	mso-footer-margin:.5in;&lt;br /&gt;	mso-paper-source:0;}&lt;br /&gt;div.Section1&lt;br /&gt;	{page:Section1;}&lt;br /&gt; /* List Definitions */&lt;br /&gt; @list l0&lt;br /&gt;	{mso-list-id:1023022238;&lt;br /&gt;	mso-list-type:hybrid;&lt;br /&gt;	mso-list-template-ids:210541594 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}&lt;br /&gt;@list l0:level1&lt;br /&gt;	{mso-level-tab-stop:none;&lt;br /&gt;	mso-level-number-position:left;&lt;br /&gt;	text-indent:-.25in;}&lt;br /&gt;ol&lt;br /&gt;	{margin-bottom:0in;}&lt;br /&gt;ul&lt;br /&gt;	{margin-bottom:0in;}&lt;br /&gt;--&gt;&lt;br /&gt;&lt;/style&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div class="MsoNormal" style="color: blue; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif; line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Tics:&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpFirst" style="color: blue; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif; line-height: normal; margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;1.&lt;span style="font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp; &lt;/span&gt;Number separate 10 time only , this make solution easy.&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpLast" style="line-height: normal; margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="color: blue; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif; font-size: small;"&gt;&lt;b&gt;2.&lt;span style="font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9pt;"&gt;&lt;span style="color: blue; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif; font-size: small;"&gt;&lt;b&gt;Every loop, a%10+b%10+carry&amp;gt;9 then carry_counter++&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpLast" style="line-height: normal; margin-bottom: 0.0001pt; text-indent: -0.25in;"&gt;&lt;span style="font-family: Consolas; font-size: 9pt;"&gt;&lt;span style="color: blue; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif; font-size: small;"&gt;&lt;b&gt;3.&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="color: #38761d;"&gt;(note, if total carry&amp;gt;1 you must output ''operations"      instead of "operation").&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9pt;"&gt;&lt;span style="color: blue; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif; font-size: small;"&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div style="color: blue; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;DOWNLOAD DOCUMENT FILE : &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://ruetacm.wordpress.com/files/2009/11/10035doc.doc" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s320/download.gif" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="http://download94.mediafire.com/aohxjnxjnmgg/ijyyynadymz/doc.doc"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-size: x-large;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://ruetacm.wordpress.com/files/2009/11/10035doc.doc"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-size: x-large;"&gt;Download to click&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6456446978653192228-7098482335852181374?l=ruetprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ruetprogrammer.blogspot.com/feeds/7098482335852181374/comments/default' title='মন্তব্যগুলি পোস্ট করুন'/><link rel='replies' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/10035-primary-arithmetic.html#comment-form' title='0টি মন্তব্য'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/7098482335852181374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/7098482335852181374'/><link rel='alternate' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/10035-primary-arithmetic.html' title='10035- Primary Arithmetic'/><author><name>computer science &amp;amp; Engineering</name><uri>http://www.blogger.com/profile/01145894902967208519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s72-c/download.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6456446978653192228.post-2245014160643359228</id><published>2009-11-17T06:14:00.000-08:00</published><updated>2009-11-24T13:25:04.487-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Math (Big Integer)'/><title type='text'>10013 - Super long sums</title><content type='html'>&lt;blockquote&gt;&lt;h2&gt;&lt;a href="http://www.blogger.com/post-create.g?blogID=1161585120556240042" name="SECTION0001002000000000000000"&gt;&lt;span lang="EN" style="color: #0070e8;"&gt;The Problem&lt;/span&gt;&lt;/a&gt;&lt;span lang="EN"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div class="a"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 12pt;"&gt;The creators of a new programming language D++ have found out that whatever limit for SuperLongInt type they make, sometimes programmers need to operate even larger numbers. A limit of 1000 digits is so small... You have to find the sum of two numbers with maximal size of 1.000.000 digits.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;h2&gt;&lt;a href="http://www.blogger.com/post-create.g?blogID=1161585120556240042" name="SECTION0001003000000000000000"&gt;&lt;span lang="EN" style="color: #0070e8;"&gt;The Input&lt;/span&gt;&lt;/a&gt;&lt;span lang="EN"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div class="a"&gt;&lt;span lang="EN" style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 12pt;"&gt;The first line of a input file is an integer N, then a blank line followed by N input blocks. &lt;/span&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 12pt;"&gt;The first line of an each input block contains a single number M (1&amp;lt;=M&amp;lt;=1000000) — the length of the integers (in order to make their lengths equal, some leading zeroes can be added). It is followed by these integers written in columns. That is, the next M lines contain two digits each, divided by a space. Each of the two given integers is not less than 1, and the length of their sum does not exceed M.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="a"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 12pt;"&gt;There is a blank line between input blocks.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;h2&gt;&lt;span lang="EN" style="color: #0070e8;"&gt;The Output&lt;/span&gt;&lt;span lang="EN"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div class="a"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 12pt;"&gt;Each output block should contain exactly M digits in a single line representing the sum of these two integers.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="a"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 12pt;"&gt;There is a blank line between output blocks.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;h2&gt;&lt;span lang="EN" style="color: #0070e8;"&gt;Sample Input&lt;/span&gt;&lt;span lang="EN"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;pre&gt;2&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;4&lt;br /&gt;&lt;br /&gt;0 4&lt;br /&gt;&lt;br /&gt;4 2&lt;br /&gt;&lt;br /&gt;6 8&lt;br /&gt;&lt;br /&gt;3 7&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3&lt;br /&gt;&lt;br /&gt;3 0&lt;br /&gt;&lt;br /&gt;7 9&lt;br /&gt;&lt;br /&gt;2 8&lt;br /&gt;&lt;br /&gt;  &lt;/pre&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;h2&gt;&lt;a href="http://www.blogger.com/post-create.g?blogID=1161585120556240042" name="SECTION0001006000000000000000"&gt;&lt;span lang="EN" style="color: #0070e8;"&gt;Sample Output&lt;/span&gt;&lt;/a&gt;&lt;span lang="EN"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;pre&gt;4750&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;470&lt;br /&gt;&lt;br /&gt;  &lt;/pre&gt;&lt;/blockquote&gt;&lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type"&gt;&lt;/meta&gt;&lt;meta content="Word.Document" name="ProgId"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Generator"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Originator"&gt;&lt;/meta&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;&lt;br /&gt;&lt;!--&lt;br /&gt; /* Font Definitions */&lt;br /&gt; @font-face&lt;br /&gt;	{font-family:"Cambria Math";&lt;br /&gt;	panose-1:2 4 5 3 5 4 6 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:roman;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1107304683 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:Calibri;&lt;br /&gt;	panose-1:2 15 5 2 2 2 4 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:swiss;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1073750139 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:"Lucida Handwriting";&lt;br /&gt;	panose-1:3 1 1 1 1 1 1 1 1 1;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:script;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:3 0 0 0 1 0;}&lt;br /&gt; /* Style Definitions */&lt;br /&gt; p.MsoNormal, li.MsoNormal, div.MsoNormal&lt;br /&gt;	{mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-parent:"";&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:0in;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";}&lt;br /&gt;.MsoChpDefault&lt;br /&gt;	{mso-style-type:export-only;&lt;br /&gt;	mso-default-props:yes;&lt;br /&gt;	font-size:10.0pt;&lt;br /&gt;	mso-ansi-font-size:10.0pt;&lt;br /&gt;	mso-bidi-font-size:10.0pt;&lt;br /&gt;	mso-ascii-font-family:Calibri;&lt;br /&gt;	mso-hansi-font-family:Calibri;}&lt;br /&gt;@page Section1&lt;br /&gt;	{size:8.5in 11.0in;&lt;br /&gt;	margin:1.0in 1.0in 1.0in 1.0in;&lt;br /&gt;	mso-header-margin:.5in;&lt;br /&gt;	mso-footer-margin:.5in;&lt;br /&gt;	mso-paper-source:0;}&lt;br /&gt;div.Section1&lt;br /&gt;	{page:Section1;}&lt;br /&gt; /* List Definitions */&lt;br /&gt; @list l0&lt;br /&gt;	{mso-list-id:2087916200;&lt;br /&gt;	mso-list-type:hybrid;&lt;br /&gt;	mso-list-template-ids:678475050 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}&lt;br /&gt;@list l0:level1&lt;br /&gt;	{mso-level-tab-stop:none;&lt;br /&gt;	mso-level-number-position:left;&lt;br /&gt;	text-indent:-.25in;}&lt;br /&gt;ol&lt;br /&gt;	{margin-bottom:0in;}&lt;br /&gt;ul&lt;br /&gt;	{margin-bottom:0in;}&lt;br /&gt;--&gt;&lt;br /&gt;&lt;/style&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 18pt;"&gt;&lt;span style="color: blue;"&gt;Discussion: presented by rizoan toufiq&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;ol start="1" style="margin-top: 0in;" type="1"&gt;&lt;li class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 12pt;"&gt;Need a[100001] &amp;amp; b[1000001] character type array. Because      the value of the array not more than 9.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 12pt;"&gt;Must print the last carry &amp;amp; be careful to print last      newline&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 12pt;"&gt;Each case: &amp;nbsp;take      input from 1 no array index. so that you can put last carry in 0 index.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 12pt;"&gt;&amp;nbsp;For example:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 0.5in;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A[][2][3][4][5]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 0.5in;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B[][9][4][3][5] so here last index=4 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 0.5in;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 12pt;"&gt;Add:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 0.5in;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 12pt;"&gt;&amp;nbsp;I=4, (a[4]+b[4])%10+carry[initially it zero]=0 =reault[4=i]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 0.5in;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Carry=(a[4]+b[4])/10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 0.5in;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 12pt;"&gt;I=3,similarly, result[i]=8 carry=0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 0.5in;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 12pt;"&gt;I=2 ,similarly result[i]=7 carry=0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 0.5in;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 12pt;"&gt;I=1,similarly result[i]=1 carry=1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 0.5in;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 12pt;"&gt;I=0 ,result[i]=carry&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 0.5in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 0.5in;"&gt;&lt;span style="font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 12pt;"&gt;&lt;b&gt;*** I think it is helped you&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 0.5in;"&gt;&lt;span style="font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 12pt;"&gt;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="color: blue; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;DOWNLOAD DOCUMENT FILE : &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://ruetacm.wordpress.com/files/2009/11/10013doc.doc" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s320/download.gif" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="http://download94.mediafire.com/aohxjnxjnmgg/ijyyynadymz/doc.doc"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-size: x-large;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://ruetacm.wordpress.com/files/2009/11/10013doc.doc"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-size: x-large;"&gt;Download to click&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6456446978653192228-2245014160643359228?l=ruetprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ruetprogrammer.blogspot.com/feeds/2245014160643359228/comments/default' title='মন্তব্যগুলি পোস্ট করুন'/><link rel='replies' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/10013-super-long-sums.html#comment-form' title='0টি মন্তব্য'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/2245014160643359228'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/2245014160643359228'/><link rel='alternate' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/10013-super-long-sums.html' title='10013 - Super long sums'/><author><name>computer science &amp;amp; Engineering</name><uri>http://www.blogger.com/profile/01145894902967208519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s72-c/download.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6456446978653192228.post-5575400790790601839</id><published>2009-11-17T02:20:00.000-08:00</published><updated>2009-11-24T13:25:04.498-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ad Hoc'/><title type='text'>102 Ecological Bin Packing</title><content type='html'>&lt;blockquote&gt;&lt;div style="color: #cc0000;"&gt;&lt;b&gt;Background&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;Bin packing, or the placement of objects of certain weights into different bins subject to certain constraints, is an historically interesting problem. Some bin packing problems are NP-complete but are amenable to dynamic programming solutions or to approximately optimal heuristic solutions. &lt;br /&gt;In this problem you will be solving a bin packing problem that deals with recycling glass. &lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div style="color: #cc0000;"&gt;&lt;b&gt;The Problem&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;Recycling glass requires that the glass be separated by color into one of three categories: brown glass, green glass, and clear glass. In this problem you will be given three recycling bins, each containing a specified number of brown, green and clear bottles. In order to be recycled, the bottles will need to be moved so that each bin contains bottles of only one color. &lt;br /&gt;The problem is to minimize the number of bottles that are moved. You may assume that the only problem is to minimize the number of movements between boxes. &lt;br /&gt;For the purposes of this problem, each bin has infinite capacity and the only constraint is moving the bottles so that each bin contains bottles of a single color. The total number of bottles will never exceed 2^31. &lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div style="color: #cc0000;"&gt;&lt;b&gt;The Input&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;The input consists of a series of lines with each line containing 9 integers. The first three integers on a line represent the number of brown, green, and clear bottles (respectively) in bin number 1, the second three represent the number of brown, green and clear bottles (respectively) in bin number 2, and the last three integers represent the number of brown, green, and clear bottles (respectively) in bin number 3. For example, the line 10 15 20 30 12 8 15 8 31 &lt;br /&gt;indicates that there are 20 clear bottles in bin 1, 12 green bottles in bin 2, and 15 brown bottles in bin 3. &lt;br /&gt;Integers on a line will be separated by one or more spaces. Your program should process all lines in the input file. &lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div style="color: #cc0000;"&gt;&lt;b&gt;The Output&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;For each line of input there will be one line of output indicating what color bottles go in what bin to minimize the number of bottle movements. You should also print the minimum number of bottle movements. &lt;br /&gt;The output should consist of a string of the three upper case characters 'G', 'B', 'C' (representing the colors green, brown, and clear) representing the color associated with each bin. &lt;br /&gt;The first character of the string represents the color associated with the first bin, the second character of the string represents the color associated with the second bin, and the third character represents the color associated with the third bin. &lt;br /&gt;The integer indicating the minimum number of bottle movements should follow the string. &lt;br /&gt;If more than one order of brown, green, and clear bins yields the minimum number of movements then the alphabetically first string representing a minimal configuration should be printed. &lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div style="color: #0b5394;"&gt;&lt;b&gt;Sample Input&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;1 2 3 4 5 6 7 8 9&lt;br /&gt;5 10 5 20 10 5 10 20 10&lt;br /&gt;&lt;div style="color: #45818e;"&gt;&lt;b&gt;Sample Output&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;BCG 30&lt;br /&gt;CBG 50&lt;br /&gt;&lt;/blockquote&gt;&lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type"&gt;&lt;/meta&gt;&lt;meta content="Word.Document" name="ProgId"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Generator"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Originator"&gt;&lt;/meta&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;&lt;br /&gt;&lt;!--&lt;br /&gt; /* Font Definitions */&lt;br /&gt; @font-face&lt;br /&gt;	{font-family:"Cambria Math";&lt;br /&gt;	panose-1:2 4 5 3 5 4 6 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:roman;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1107304683 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:Calibri;&lt;br /&gt;	panose-1:2 15 5 2 2 2 4 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:swiss;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1073750139 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:Consolas;&lt;br /&gt;	panose-1:2 11 6 9 2 2 4 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:modern;&lt;br /&gt;	mso-font-pitch:fixed;&lt;br /&gt;	mso-font-signature:-1610611985 1073750091 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:"Lucida Handwriting";&lt;br /&gt;	panose-1:3 1 1 1 1 1 1 1 1 1;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:script;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:3 0 0 0 1 0;}&lt;br /&gt; /* Style Definitions */&lt;br /&gt; p.MsoNormal, li.MsoNormal, div.MsoNormal&lt;br /&gt;	{mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-parent:"";&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:0in;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-language:AR-SA;}&lt;br /&gt;p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph&lt;br /&gt;	{mso-style-priority:34;&lt;br /&gt;	mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:.5in;&lt;br /&gt;	mso-add-space:auto;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-language:AR-SA;}&lt;br /&gt;p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst&lt;br /&gt;	{mso-style-priority:34;&lt;br /&gt;	mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-type:export-only;&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:0in;&lt;br /&gt;	margin-left:.5in;&lt;br /&gt;	margin-bottom:.0001pt;&lt;br /&gt;	mso-add-space:auto;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-language:AR-SA;}&lt;br /&gt;p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle&lt;br /&gt;	{mso-style-priority:34;&lt;br /&gt;	mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-type:export-only;&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:0in;&lt;br /&gt;	margin-left:.5in;&lt;br /&gt;	margin-bottom:.0001pt;&lt;br /&gt;	mso-add-space:auto;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-language:AR-SA;}&lt;br /&gt;p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast&lt;br /&gt;	{mso-style-priority:34;&lt;br /&gt;	mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-type:export-only;&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:.5in;&lt;br /&gt;	mso-add-space:auto;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-language:AR-SA;}&lt;br /&gt;.MsoChpDefault&lt;br /&gt;	{mso-style-type:export-only;&lt;br /&gt;	mso-default-props:yes;&lt;br /&gt;	font-size:10.0pt;&lt;br /&gt;	mso-ansi-font-size:10.0pt;&lt;br /&gt;	mso-bidi-font-size:10.0pt;&lt;br /&gt;	mso-ascii-font-family:Calibri;&lt;br /&gt;	mso-hansi-font-family:Calibri;}&lt;br /&gt;@page Section1&lt;br /&gt;	{size:8.5in 11.0in;&lt;br /&gt;	margin:1.0in 1.0in 1.0in 1.0in;&lt;br /&gt;	mso-header-margin:.5in;&lt;br /&gt;	mso-footer-margin:.5in;&lt;br /&gt;	mso-paper-source:0;}&lt;br /&gt;div.Section1&lt;br /&gt;	{page:Section1;}&lt;br /&gt; /* List Definitions */&lt;br /&gt; @list l0&lt;br /&gt;	{mso-list-id:298535202;&lt;br /&gt;	mso-list-type:hybrid;&lt;br /&gt;	mso-list-template-ids:-1083434788 664442506 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}&lt;br /&gt;@list l0:level1&lt;br /&gt;	{mso-level-tab-stop:none;&lt;br /&gt;	mso-level-number-position:left;&lt;br /&gt;	margin-left:28.5pt;&lt;br /&gt;	text-indent:-.25in;}&lt;br /&gt;ol&lt;br /&gt;	{margin-bottom:0in;}&lt;br /&gt;ul&lt;br /&gt;	{margin-bottom:0in;}&lt;br /&gt;--&gt;&lt;br /&gt;&lt;/style&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="color: #0070c0; font-family: &amp;quot;Lucida Handwriting&amp;quot;; font-size: 18pt;"&gt;Discussion: presented by rizoan&amp;nbsp; toufiq &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt;There three bin: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpFirst" style="line-height: normal; margin: 0in 0in 0.0001pt 28.5pt; text-indent: -0.25in;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt;1.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt;first three integer represent the number of brown ,Green and clean glass in bin1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin: 0in 0in 0.0001pt 28.5pt; text-indent: -0.25in;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt;2.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt;second three integer represent the number of brown ,Green and clean glass in bin2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpLast" style="line-height: normal; margin: 0in 0in 0.0001pt 28.5pt; text-indent: -0.25in;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt;3.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt;third three integer represent the number of brown ,Green and clean glass in bin3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 10.5pt;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt;Now our task , minimum move to same colored glass in one bin.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 10.5pt;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt;We discuss only one case: 1 2 3 4 5 6 7 8 9&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 10.5pt;"&gt;&lt;b&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt;Bin1 : 1+2+3=6; Bin2: 4+5+6=15 Bin3: 7+8+9=24 [note: total=45]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 10.5pt;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt;You have to calculate below sequence [it is must, because more minimum combination will find. So combination of color glass in Bin: BCG,BGC,CBG,CGB,GBC,GCB]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 10.5pt;"&gt;&lt;b&gt;&lt;u&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt;1.If we want to take brown glass in bin1, clean in bin2 &amp;amp; green in bin3[BCG]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 10.5pt;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt;Bin1: We have to move 3 clean &amp;amp; 2 green glass from bin1; so move=2+3=5&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 10.5pt;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt;Bin2: We have to move 4 brown &amp;amp; 5 green glass from bin2 ;so move=4+5=9&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 10.5pt;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt;Bin3: We have to move 7 brown &amp;amp; 9 clean glass from bin3 ; so move=7+9=16&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 10.5pt;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt;Total move=5+9+16=30&amp;nbsp; [note: 45-1-6-8=30]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 10.5pt;"&gt;&lt;b&gt;&lt;u&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt;2.If we want to take brown glass in bin1, green in bin2 &amp;amp; clean in bin3[BGC]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 10.5pt;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt;Bin1: We have to move 3 clean &amp;amp; 2 green glass from bin1; so move=2+3=5&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 10.5pt;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt;Bin2: We have to move 4 brown &amp;amp; 6 clean glass from bin2 ;so move=4+6=10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 10.5pt;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt;Bin3: We have to move 7 brown &amp;amp; 8 green glass from bin3 ; so move=7+8=15&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 10.5pt;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt;Total move=5+10+15=30&amp;nbsp; [note: 45-1-5-9=30]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 10.5pt;"&gt;&lt;b&gt;&lt;u&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt;3. CBG:&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt; bin1: move=1+2=3, bin2: move=11; bin3: 16 total move: 30 [note…]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 10.5pt;"&gt;&lt;b&gt;&lt;u&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt;4.CGB:&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt; bin1: move:3&amp;nbsp; ,bin2: move=10 ,bin3: move=17 ,total move= 30&amp;nbsp;&amp;nbsp; [note …]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 10.5pt;"&gt;&lt;b&gt;&lt;u&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt;5.GBC: &lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt;bin1: move:4&amp;nbsp; ,bin2: move=11 ,bin3: move=15,total move= 30&amp;nbsp;&amp;nbsp; [note …]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 10.5pt;"&gt;&lt;b&gt;&lt;u&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt;6.GCB:&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt; bin1: move:4&amp;nbsp; ,bin2: move=9&amp;nbsp; ,bin3:17 move= ,total move= 30&amp;nbsp;&amp;nbsp; [note …] &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 10.5pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0.0001pt 10.5pt;"&gt;&lt;span style="font-family: Consolas; font-size: 12pt;"&gt;So minimum move =30 for each combination of color glass in the bin&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="color: #0070c0; font-family: Consolas; font-size: 12pt; line-height: 115%;"&gt;So Answer: BCG 30 [BCG is alphabetically first]&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;div style="color: blue; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;DOWNLOAD DOCUMENT FILE : &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://ruetacm.wordpress.com/files/2009/11/102doc.doc" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s320/download.gif" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: #cc0000; text-align: center;"&gt;&lt;a href="http://ruetacm.wordpress.com/files/2009/11/102doc.doc"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-size: x-large;"&gt;Download to click&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6456446978653192228-5575400790790601839?l=ruetprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ruetprogrammer.blogspot.com/feeds/5575400790790601839/comments/default' title='মন্তব্যগুলি পোস্ট করুন'/><link rel='replies' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/102-ecological-bin-packing.html#comment-form' title='0টি মন্তব্য'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/5575400790790601839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/5575400790790601839'/><link rel='alternate' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/102-ecological-bin-packing.html' title='102 Ecological Bin Packing'/><author><name>computer science &amp;amp; Engineering</name><uri>http://www.blogger.com/profile/01145894902967208519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s72-c/download.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6456446978653192228.post-4630302369872874047</id><published>2009-11-02T21:11:00.000-08:00</published><updated>2009-11-24T13:25:04.540-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='prime Number'/><title type='text'>583.Prime Factors</title><content type='html'>&lt;blockquote&gt;The most relevant definition for this problem is 2a: An integer g&amp;gt;1 is said to be prime if and only if its only positive divisors are itself and one (otherwise it is said to be composite). For example, the number 21 is composite; the number 23 is prime. Note that the decompositon of a positive number g into its prime factors, i.e., &lt;a href="http://1.bp.blogspot.com/_zXj0Tqphc4M/SwKAKf4vi1I/AAAAAAAAAnw/Yf4OsVJBahc/s1600/583IMG3.GIF" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_zXj0Tqphc4M/SwKAKf4vi1I/AAAAAAAAAnw/Yf4OsVJBahc/s320/583IMG3.GIF" /&gt;&lt;/a&gt;  is unique if we assert that fi &amp;gt; 1 for all i and&lt;a href="http://3.bp.blogspot.com/_zXj0Tqphc4M/SwKATkSMdgI/AAAAAAAAAn4/aB5_DAF8Qvw/s1600/583IMG4.GIF" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_zXj0Tqphc4M/SwKATkSMdgI/AAAAAAAAAn4/aB5_DAF8Qvw/s320/583IMG4.GIF" /&gt;&lt;/a&gt;  for i&lt;j.one --="" -="" 1.="" 1772="" 1="" 231="" 2p-="" a="" aid="" all="" are="" class="" computer.="" euler="" form="" in="" interesting="" is="" mersenne="" numbers="" of="" one="" prime="" primes="" proved="" so-called="" that="" the="" which="" without=""&gt;&lt;j&gt;&lt;j.&gt;&lt;/j.&gt;&lt;/j&gt;&lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type"&gt;&lt;/meta&gt;&lt;meta content="Word.Document" name="ProgId"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Generator"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Originator"&gt;&lt;/meta&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;&lt;br /&gt;&lt;!--&lt;br /&gt; /* Font Definitions */&lt;br /&gt; @font-face&lt;br /&gt;	{font-family:"Cambria Math";&lt;br /&gt;	panose-1:2 4 5 3 5 4 6 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:roman;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1107304683 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:Calibri;&lt;br /&gt;	panose-1:2 15 5 2 2 2 4 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:swiss;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1073750139 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:Consolas;&lt;br /&gt;	panose-1:2 11 6 9 2 2 4 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:modern;&lt;br /&gt;	mso-font-pitch:fixed;&lt;br /&gt;	mso-font-signature:-1610611985 1073750091 0 0 159 0;}&lt;br /&gt; /* Style Definitions */&lt;br /&gt; p.MsoNormal, li.MsoNormal, div.MsoNormal&lt;br /&gt;	{mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-parent:"";&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:0in;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-language:AR-SA;}&lt;br /&gt;.MsoChpDefault&lt;br /&gt;	{mso-style-type:export-only;&lt;br /&gt;	mso-default-props:yes;&lt;br /&gt;	font-size:10.0pt;&lt;br /&gt;	mso-ansi-font-size:10.0pt;&lt;br /&gt;	mso-bidi-font-size:10.0pt;&lt;br /&gt;	mso-ascii-font-family:Calibri;&lt;br /&gt;	mso-hansi-font-family:Calibri;}&lt;br /&gt;@page Section1&lt;br /&gt;	{size:8.5in 11.0in;&lt;br /&gt;	margin:1.0in 1.0in 1.0in 1.0in;&lt;br /&gt;	mso-header-margin:.5in;&lt;br /&gt;	mso-footer-margin:.5in;&lt;br /&gt;	mso-paper-source:0;}&lt;br /&gt;div.Section1&lt;br /&gt;	{page:Section1;}&lt;br /&gt;--&gt;&lt;br /&gt;&lt;/style&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;/j.one&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 8pt;"&gt;One interesting class of prime numbers are the so-called &lt;i&gt;Mersenne&lt;/i&gt; primes which are of the form 2&lt;i&gt;&lt;sup&gt;p&lt;/sup&gt;&lt;/i&gt;- 1. Euler proved that 2&lt;sup&gt;31&lt;/sup&gt; - 1 is prime in 1772 -- all without the aid of a computer. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;j.one --="" -="" 1.="" 1772="" 1="" 231="" 2p-="" a="" aid="" all="" are="" class="" computer.="" euler="" form="" in="" interesting="" is="" mersenne="" numbers="" of="" one="" prime="" primes="" proved="" so-called="" that="" the="" which="" without=""&gt;&lt;j&gt; Input  &lt;/j&gt;&lt;/j.one&gt;&lt;br /&gt;&lt;j.one --="" -="" 1.="" 1772="" 1="" 231="" 2p-="" a="" aid="" all="" are="" class="" computer.="" euler="" form="" in="" interesting="" is="" mersenne="" numbers="" of="" one="" prime="" primes="" proved="" so-called="" that="" the="" which="" without=""&gt;&lt;j&gt; The input will consist of a sequence of numbers. Each line of input will contain one number g in the range -231 &amp;lt; g &amp;lt;231, but different of -1 and 1. The end of input will be indicated by an input line having a value of zero. &lt;/j&gt;&lt;/j.one&gt;&lt;br /&gt;&lt;j.one --="" -="" 1.="" 1772="" 1="" 231="" 2p-="" a="" aid="" all="" are="" class="" computer.="" euler="" form="" in="" interesting="" is="" mersenne="" numbers="" of="" one="" prime="" primes="" proved="" so-called="" that="" the="" which="" without=""&gt;&lt;j&gt;&lt;/j&gt;&lt;/j.one&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;j.one --="" -="" 1.="" 1772="" 1="" 231="" 2p-="" a="" aid="" all="" are="" class="" computer.="" euler="" form="" in="" interesting="" is="" mersenne="" numbers="" of="" one="" prime="" primes="" proved="" so-called="" that="" the="" which="" without=""&gt;&lt;j&gt; &lt;/j&gt;&lt;/j.one&gt;&lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type"&gt;&lt;/meta&gt;&lt;meta content="Word.Document" name="ProgId"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Generator"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Originator"&gt;&lt;/meta&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_editdata.mso" rel="Edit-Time-Data"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;&lt;br /&gt;&lt;!--&lt;br /&gt; /* Font Definitions */&lt;br /&gt; @font-face&lt;br /&gt;	{font-family:"Cambria Math";&lt;br /&gt;	panose-1:2 4 5 3 5 4 6 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:roman;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1107304683 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:Calibri;&lt;br /&gt;	panose-1:2 15 5 2 2 2 4 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:swiss;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1073750139 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:Consolas;&lt;br /&gt;	panose-1:2 11 6 9 2 2 4 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:modern;&lt;br /&gt;	mso-font-pitch:fixed;&lt;br /&gt;	mso-font-signature:-1610611985 1073750091 0 0 159 0;}&lt;br /&gt; /* Style Definitions */&lt;br /&gt; p.MsoNormal, li.MsoNormal, div.MsoNormal&lt;br /&gt;	{mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-parent:"";&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:0in;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-language:AR-SA;}&lt;br /&gt;.MsoChpDefault&lt;br /&gt;	{mso-style-type:export-only;&lt;br /&gt;	mso-default-props:yes;&lt;br /&gt;	font-size:10.0pt;&lt;br /&gt;	mso-ansi-font-size:10.0pt;&lt;br /&gt;	mso-bidi-font-size:10.0pt;&lt;br /&gt;	mso-ascii-font-family:Calibri;&lt;br /&gt;	mso-hansi-font-family:Calibri;}&lt;br /&gt;@page Section1&lt;br /&gt;	{size:8.5in 11.0in;&lt;br /&gt;	margin:1.0in 1.0in 1.0in 1.0in;&lt;br /&gt;	mso-header-margin:.5in;&lt;br /&gt;	mso-footer-margin:.5in;&lt;br /&gt;	mso-paper-source:0;}&lt;br /&gt;div.Section1&lt;br /&gt;	{page:Section1;}&lt;br /&gt;--&gt;&lt;br /&gt;&lt;/style&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="color: #0070e8; font-family: Consolas; font-size: 8pt;"&gt;Output&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="font-family: Consolas; font-size: 8pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 8pt;"&gt;For each line of input, your program should print a line of output consisting of the input number and its prime factors. For an input number &lt;/span&gt;&lt;a href="http://3.bp.blogspot.com/_zXj0Tqphc4M/SwKBm-w3rfI/AAAAAAAAAoo/UgA2_Fu3DdE/s1600/583IMG5.GIF" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_zXj0Tqphc4M/SwKBm-w3rfI/AAAAAAAAAoo/UgA2_Fu3DdE/s320/583IMG5.GIF" /&gt;&lt;/a&gt;&lt;span style="font-family: Consolas; font-size: 8pt;"&gt;, where each &lt;i&gt;f&lt;sub&gt;i&lt;/sub&gt;&lt;/i&gt; is a prime number greater than unity (with&amp;nbsp; &lt;/span&gt;&lt;a href="http://3.bp.blogspot.com/_zXj0Tqphc4M/SwKATkSMdgI/AAAAAAAAAn4/aB5_DAF8Qvw/s1600/583IMG4.GIF" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_zXj0Tqphc4M/SwKATkSMdgI/AAAAAAAAAn4/aB5_DAF8Qvw/s320/583IMG4.GIF" /&gt;&lt;/a&gt;&lt;span style="font-family: Consolas; font-size: 8pt;"&gt; for &lt;i&gt;i&lt;/i&gt;&amp;lt;&lt;i&gt;j&lt;/i&gt;), the format of the output line should be &lt;/span&gt;&lt;a href="http://4.bp.blogspot.com/_zXj0Tqphc4M/SwKBpCYPdXI/AAAAAAAAAow/rSITppOWrjY/s1600/583IMG6.GIF" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_zXj0Tqphc4M/SwKBpCYPdXI/AAAAAAAAAow/rSITppOWrjY/s320/583IMG6.GIF" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="center" class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: center;"&gt;&lt;span style="font-family: Consolas; font-size: 8pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal;"&gt;&lt;span style="font-family: Consolas; font-size: 8pt;"&gt;When &lt;i&gt;g&lt;/i&gt; &amp;lt; 0, if , &lt;/span&gt;&lt;a href="http://1.bp.blogspot.com/_zXj0Tqphc4M/SwKAKf4vi1I/AAAAAAAAAnw/Yf4OsVJBahc/s1600/583IMG3.GIF" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_zXj0Tqphc4M/SwKAKf4vi1I/AAAAAAAAAnw/Yf4OsVJBahc/s320/583IMG3.GIF" /&gt;&lt;/a&gt;&lt;span style="font-family: Consolas; font-size: 8pt;"&gt;the format of the output line should be &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="http://4.bp.blogspot.com/_zXj0Tqphc4M/SwKBvh7N7CI/AAAAAAAAApA/h1gJlYr3oOU/s1600/583IMG8.GIF" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_zXj0Tqphc4M/SwKBvh7N7CI/AAAAAAAAApA/h1gJlYr3oOU/s320/583IMG8.GIF" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type"&gt;&lt;/meta&gt;&lt;meta content="Word.Document" name="ProgId"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Generator"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Originator"&gt;&lt;/meta&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;&lt;br /&gt;&lt;!--&lt;br /&gt; /* Font Definitions */&lt;br /&gt; @font-face&lt;br /&gt;	{font-family:"Cambria Math";&lt;br /&gt;	panose-1:2 4 5 3 5 4 6 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:roman;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1107304683 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:Calibri;&lt;br /&gt;	panose-1:2 15 5 2 2 2 4 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:swiss;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1073750139 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:Consolas;&lt;br /&gt;	panose-1:2 11 6 9 2 2 4 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:modern;&lt;br /&gt;	mso-font-pitch:fixed;&lt;br /&gt;	mso-font-signature:-1610611985 1073750091 0 0 159 0;}&lt;br /&gt; /* Style Definitions */&lt;br /&gt; p.MsoNormal, li.MsoNormal, div.MsoNormal&lt;br /&gt;	{mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-parent:"";&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:0in;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-language:AR-SA;}&lt;br /&gt;.MsoChpDefault&lt;br /&gt;	{mso-style-type:export-only;&lt;br /&gt;	mso-default-props:yes;&lt;br /&gt;	font-size:10.0pt;&lt;br /&gt;	mso-ansi-font-size:10.0pt;&lt;br /&gt;	mso-bidi-font-size:10.0pt;&lt;br /&gt;	mso-ascii-font-family:Calibri;&lt;br /&gt;	mso-hansi-font-family:Calibri;}&lt;br /&gt;@page Section1&lt;br /&gt;	{size:8.5in 11.0in;&lt;br /&gt;	margin:1.0in 1.0in 1.0in 1.0in;&lt;br /&gt;	mso-header-margin:.5in;&lt;br /&gt;	mso-footer-margin:.5in;&lt;br /&gt;	mso-paper-source:0;}&lt;br /&gt;div.Section1&lt;br /&gt;	{page:Section1;}&lt;br /&gt;--&gt;&lt;br /&gt;&lt;/style&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" height="171" style="border-collapse: collapse; border: medium none; width: 487px;"&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;   &lt;td style="border: 1pt solid black; padding: 0in 5.4pt; width: 239.4pt;" valign="top" width="319"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=1161585120556240042&amp;amp;postID=7713960538618606411" name="SECTION0001003000000000000000"&gt;&lt;b&gt;&lt;span style="color: #0070e8; font-family: Consolas; font-size: 8pt;"&gt;Sample Input&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;b&gt;&lt;span style="color: #0070e8; font-family: Consolas; font-size: 8pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="font-family: Consolas; font-size: 8pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 8pt;"&gt;-190&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 8pt;"&gt;-191&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 8pt;"&gt;-192&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 8pt;"&gt;-193&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 8pt;"&gt;-194&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 8pt;"&gt;195&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 8pt;"&gt;196&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 8pt;"&gt;197&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 8pt;"&gt;198&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 8pt;"&gt;199&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 8pt;"&gt;200&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 8pt;"&gt;0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border-color: black black black -moz-use-text-color; border-style: solid solid solid none; border-width: 1pt 1pt 1pt medium; padding: 0in 5.4pt; width: 239.4pt;" valign="top" width="319"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=1161585120556240042&amp;amp;postID=7713960538618606411" name="SECTION0001004000000000000000"&gt;&lt;b&gt;&lt;span style="color: #0070e8; font-family: Consolas; font-size: 8pt;"&gt;Sample Output&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;b&gt;&lt;span style="color: #0070e8; font-family: Consolas; font-size: 8pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="font-family: Consolas; font-size: 8pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 8pt;"&gt;-190   = -1 x 2 x 5 x 19&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 8pt;"&gt;-191   = -1 x 191&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 8pt;"&gt;-192   = -1 x 2 x 2 x 2 x 2 x 2 x 2 x 3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 8pt;"&gt;-193   = -1 x 193&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 8pt;"&gt;-194   = -1 x 2 x 97&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 8pt;"&gt;195   = 3 x 5 x 13&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 8pt;"&gt;196   = 2 x 2 x 7 x 7&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 8pt;"&gt;197   = 197&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 8pt;"&gt;198   = 2 x 3 x 3 x 11&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 8pt;"&gt;199   = 199&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 8pt;"&gt;200   = 2 x 2 x 2 x 5 x 5&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 8pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;j.one --="" -="" 1.="" 1772="" 1="" 231="" 2p-="" a="" aid="" all="" are="" class="" computer.="" euler="" form="" in="" interesting="" is="" mersenne="" numbers="" of="" one="" prime="" primes="" proved="" so-called="" that="" the="" which="" without=""&gt;&lt;j&gt;&lt;j), be="" format="" line="" of="" output="" should="" the=""&gt; &lt;span style="color: #3d85c6; font-size: large;"&gt;&lt;b&gt;&lt;span style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;Discussion&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/j),&gt;&lt;/j&gt;&lt;/j.one&gt;&lt;br /&gt;&lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type"&gt;&lt;/meta&gt;&lt;meta content="Word.Document" name="ProgId"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Generator"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Originator"&gt;&lt;/meta&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;&lt;br /&gt;&lt;!--&lt;br /&gt; /* Font Definitions */&lt;br /&gt; @font-face&lt;br /&gt;	{font-family:"Cambria Math";&lt;br /&gt;	panose-1:2 4 5 3 5 4 6 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:roman;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1107304683 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:Calibri;&lt;br /&gt;	panose-1:2 15 5 2 2 2 4 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:swiss;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1073750139 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:"Lucida Handwriting";&lt;br /&gt;	panose-1:3 1 1 1 1 1 1 1 1 1;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:script;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:3 0 0 0 1 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:"Lucida Calligraphy";&lt;br /&gt;	panose-1:3 1 1 1 1 1 1 1 1 1;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:script;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:3 0 0 0 1 0;}&lt;br /&gt; /* Style Definitions */&lt;br /&gt; p.MsoNormal, li.MsoNormal, div.MsoNormal&lt;br /&gt;	{mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-parent:"";&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:0in;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-language:AR-SA;}&lt;br /&gt;.MsoChpDefault&lt;br /&gt;	{mso-style-type:export-only;&lt;br /&gt;	mso-default-props:yes;&lt;br /&gt;	font-size:10.0pt;&lt;br /&gt;	mso-ansi-font-size:10.0pt;&lt;br /&gt;	mso-bidi-font-size:10.0pt;&lt;br /&gt;	mso-ascii-font-family:Calibri;&lt;br /&gt;	mso-hansi-font-family:Calibri;}&lt;br /&gt;@page Section1&lt;br /&gt;	{size:8.5in 11.0in;&lt;br /&gt;	margin:1.0in 1.0in 1.0in 1.0in;&lt;br /&gt;	mso-header-margin:.5in;&lt;br /&gt;	mso-footer-margin:.5in;&lt;br /&gt;	mso-paper-source:0;}&lt;br /&gt;div.Section1&lt;br /&gt;	{page:Section1;}&lt;br /&gt; /* List Definitions */&lt;br /&gt; @list l0&lt;br /&gt;	{mso-list-id:1995333338;&lt;br /&gt;	mso-list-type:hybrid;&lt;br /&gt;	mso-list-template-ids:-1947836280 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}&lt;br /&gt;@list l0:level1&lt;br /&gt;	{mso-level-tab-stop:none;&lt;br /&gt;	mso-level-number-position:left;&lt;br /&gt;	text-indent:-.25in;}&lt;br /&gt;ol&lt;br /&gt;	{margin-bottom:0in;}&lt;br /&gt;ul&lt;br /&gt;	{margin-bottom:0in;}&lt;br /&gt;--&gt;&lt;br /&gt;&lt;/style&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div class="MsoNormal" style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;span style="color: #134f5c;"&gt;Algorithm:&lt;/span&gt;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;ol start="1" style="font-family: Arial,Helvetica,sans-serif; margin-top: 0in;" type="1"&gt;&lt;li class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;Generate prime number in a array.&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;Divide the given number by the array element until      arr[ele]&amp;lt;=sqrt(input). print arr[ele].&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;Print output carefully.&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div class="MsoNormal" style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&lt;u&gt;&lt;span style="color: red;"&gt;How we generate prime number:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;Let: p[]={1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; &lt;b&gt;ie p[ele]=1&lt;/b&gt; means &lt;b&gt;ele&lt;/b&gt; is a &lt;b&gt;prime&lt;/b&gt;.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Take i=2&lt;/b&gt; which is prime, Now p[2]=0,p[4]=0,p[6]=0,p[8]=0,p[10]=0;p[12]=0;p[14]=0;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;So now p[]={1,1,1,1,0,0,1,0,1,0,1,0,1,0,1}&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Take i=3&lt;/b&gt; which is prime, Now p[6]=0,p[9]=0;p[12]=0;p[15]=0;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;So now p[]={1,1,1,1,0,1,0,1,0,0,0,1,0,1,0,0}&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;span style="line-height: 115%;"&gt;For i=4 , i&amp;lt;=sqrt(16) false so end&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;P[0]=1 ;p[1]=1,p[2]=1;p[3]=1;p[5]=1,p[7]=1;p[11]=1;p[13]=1;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: small;"&gt;Move a[0]=0,a[1]=1;a[2]=2;a[3]=3;a[4]=5;a[5]=7;a[6]=11;a[7]=13&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;div style="color: blue; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;DOWNLOAD DOCUMENT FILE : &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://ruetacm.wordpress.com/files/2009/11/583doc.doc" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s320/download.gif" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: #cc0000; text-align: center;"&gt;&lt;a href="http://ruetacm.wordpress.com/files/2009/11/583doc.doc"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-size: x-large;"&gt;Download to click&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6456446978653192228-4630302369872874047?l=ruetprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ruetprogrammer.blogspot.com/feeds/4630302369872874047/comments/default' title='মন্তব্যগুলি পোস্ট করুন'/><link rel='replies' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/583prime-factors.html#comment-form' title='0টি মন্তব্য'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/4630302369872874047'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6456446978653192228/posts/default/4630302369872874047'/><link rel='alternate' type='text/html' href='http://ruetprogrammer.blogspot.com/2009/11/583prime-factors.html' title='583.Prime Factors'/><author><name>computer science &amp;amp; Engineering</name><uri>http://www.blogger.com/profile/01145894902967208519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_zXj0Tqphc4M/SwKAKf4vi1I/AAAAAAAAAnw/Yf4OsVJBahc/s72-c/583IMG3.GIF' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6456446978653192228.post-6716964227263554142</id><published>2009-11-01T13:35:00.000-08:00</published><updated>2009-11-24T13:25:04.513-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fibonacci Number'/><title type='text'>10183: How many Fibs?[First Java Code Accepted]</title><content type='html'>&lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type"&gt;&lt;/meta&gt;&lt;meta content="Word.Document" name="ProgId"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Generator"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Originator"&gt;&lt;/meta&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cnayon%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;&lt;br /&gt;&lt;!--&lt;br /&gt; /* Font Definitions */&lt;br /&gt; @font-face&lt;br /&gt;	{font-family:"Cambria Math";&lt;br /&gt;	panose-1:2 4 5 3 5 4 6 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:roman;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1107304683 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:Calibri;&lt;br /&gt;	panose-1:2 15 5 2 2 2 4 3 2 4;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:swiss;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:-1610611985 1073750139 0 0 159 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:"Bodoni MT";&lt;br /&gt;	panose-1:2 7 6 3 8 6 6 2 2 3;&lt;br /&gt;	mso-font-charset:0;&lt;br /&gt;	mso-generic-font-family:roman;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:3 0 0 0 1 0;}&lt;br /&gt;@font-face&lt;br /&gt;	{font-family:"Arabic Transparent";&lt;br /&gt;	panose-1:2 1 0 0 0 0 0 0 0 0;&lt;br /&gt;	mso-font-charset:178;&lt;br /&gt;	mso-generic-font-family:auto;&lt;br /&gt;	mso-font-pitch:variable;&lt;br /&gt;	mso-font-signature:8193 0 0 0 64 0;}&lt;br /&gt; /* Style Definitions */&lt;br /&gt; p.MsoNormal, li.MsoNormal, div.MsoNormal&lt;br /&gt;	{mso-style-unhide:no;&lt;br /&gt;	mso-style-qformat:yes;&lt;br /&gt;	mso-style-parent:"";&lt;br /&gt;	margin-top:0in;&lt;br /&gt;	margin-right:0in;&lt;br /&gt;	margin-bottom:10.0pt;&lt;br /&gt;	margin-left:0in;&lt;br /&gt;	line-height:115%;&lt;br /&gt;	mso-pagination:widow-orphan;&lt;br /&gt;	font-size:11.0pt;&lt;br /&gt;	font-family:"Calibri","sans-serif";&lt;br /&gt;	mso-fareast-font-family:"Times New Roman";&lt;br /&gt;	mso-bidi-font-family:"Times New Roman";}&lt;br /&gt;.MsoChpDefault&lt;br /&gt;	{mso-style-type:export-only;&lt;br /&gt;	mso-default-props:yes;&lt;br /&gt;	font-size:10.0pt;&lt;br /&gt;	mso-ansi-font-size:10.0pt;&lt;br /&gt;	mso-bidi-font-size:10.0pt;&lt;br /&gt;	mso-ascii-font-family:Calibri;&lt;br /&gt;	mso-hansi-font-family:Calibri;}&lt;br /&gt;@page Section1&lt;br /&gt;	{size:8.5in 11.0in;&lt;br /&gt;	margin:1.0in 1.0in 1.0in 1.0in;&lt;br /&gt;	mso-header-margin:.5in;&lt;br /&gt;	mso-footer-margin:.5in;&lt;br /&gt;	mso-paper-source:0;}&lt;br /&gt;div.Section1&lt;br /&gt;	{page:Section1;}&lt;br /&gt;--&gt;&lt;br /&gt;&lt;/style&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;div align="center" class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: center;"&gt;&lt;b&gt;&lt;span style="color: red; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 115%;"&gt;Java Submission In ACM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div align="center" class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: center;"&gt;&lt;b&gt;&lt;u&gt;&lt;span style="color: #365f91; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt;"&gt;Problem B: How many Fibs?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;Recall the definition of the Fibonacci numbers: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;i&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;f&lt;/span&gt;&lt;/i&gt;&lt;sub&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;1&lt;/span&gt;&lt;/sub&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt; := 1 &lt;br /&gt;&lt;i&gt;f&lt;/i&gt;&lt;sub&gt;2&lt;/sub&gt; := 2 &lt;br /&gt;&lt;i&gt;f&lt;/i&gt;&lt;sub&gt;n&lt;/sub&gt; := &lt;i&gt;f&lt;/i&gt;&lt;sub&gt;n-1&lt;/sub&gt; + &lt;i&gt;f&lt;/i&gt;&lt;sub&gt;n-2&lt;/sub&gt; &amp;nbsp; &amp;nbsp; (n&amp;gt;=3) &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;Given two numbers &lt;i&gt;a&lt;/i&gt; and &lt;i&gt;b&lt;/i&gt;, calculate how many Fibonacci numbers are in the range [&lt;i&gt;a&lt;/i&gt;,&lt;i&gt;b&lt;/i&gt;]. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;u&gt;&lt;span style="color: #365f91; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;Input Specification&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;u&gt;&lt;span style="color: #365f91; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;The input contains several test cases. Each test case consists of two non-negative integer numbers &lt;i&gt;a&lt;/i&gt; and &lt;i&gt;b&lt;/i&gt;. Input is terminated by &lt;i&gt;a=b=0&lt;/i&gt;. Otherwise, &lt;i&gt;a&amp;lt;=b&amp;lt;=10&lt;sup&gt;100&lt;/sup&gt;&lt;/i&gt;. The numbers &lt;i&gt;a&lt;/i&gt; and &lt;i&gt;b&lt;/i&gt; are given with no superfluous leading zeros. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;u&gt;&lt;span style="color: #365f91; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;Output Specification&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;u&gt;&lt;span style="color: #365f91; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;For each test case output on a single line the number of Fibonacci numbers &lt;i&gt;f&lt;sub&gt;i&lt;/sub&gt;&lt;/i&gt; with &lt;i&gt;a&amp;lt;=f&lt;sub&gt;i&lt;/sub&gt;&amp;lt;=b&lt;/i&gt;. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;u&gt;&lt;span style="color: #365f91; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;Sample Input&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;b&gt;&lt;u&gt;&lt;span style="color: #365f91; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;10 100&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;1234567890 9876543210&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;0 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;u&gt;&lt;span style="color: #365f91; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;Sample Output&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;u&gt;&lt;span style="color: #365f91; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;5&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;4&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div style="color: blue; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;DOWNLOAD CPP&amp;nbsp; DOCUMENT FILE : &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://ruetacm.wordpress.com/files/2009/11/10183cppdoc.doc" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s320/download.gif" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="http://ruetacm.wordpress.com/files/2009/11/10183cppdoc.doc"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-size: x-large;"&gt;Download to click&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: blue; font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;DOWNLOAD Java&amp;nbsp; DOCUMENT FILE : &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://ruetacm.wordpress.com/files/2009/11/10183javadoc.doc" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_zXj0Tqphc4M/SwJ89oALCuI/AAAAAAAAAno/J7RfCLfngwQ/s320/download.gif" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="http://ruetacm.wordpress.com/files/2009/11/10183javadoc.doc"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-size: x-large;"&gt;Download to click&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" height="941" style="border-collapse: collapse; border: medium none; width: 496px;"&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;   &lt;td style="border: 1pt solid black; padding: 0in 5.4pt; width: 6.65in;" valign="top" width="638"&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;import java.util.*;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;import   java.math.BigInteger;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;public class&amp;nbsp; Main{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static void   main(String[] args)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; String first=null;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; try{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //File   file=new File("a.in");&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Scanner   in=new Scanner(file);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Scanner in =   new Scanner(System.in);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(true){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //first = s.next();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //System.out.println(first);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BigInteger startNum = new   BigInteger(in.next());&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   BigInteger endNum = new BigInteger(in.next());&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   if(startNum.compareTo(BigInteger.valueOf(0)) == 0 &amp;amp;&amp;amp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   endNum.compareTo(BigInteger.valueOf(0)) == 0)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BigInteger bigFiboNum1 = new   BigInteger("1");&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BigInteger bigFiboNum2 = new   BigInteger("2");&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BigInteger bigFiboNum3 = new   BigInteger("0");&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BigInteger bigTemp = new   BigInteger("0");&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int fiboCount = 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(int i=1 ; ; i++) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(i == 1)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   bigFiboNum3 = BigInteger.valueOf(1);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if(i ==   2)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   bigFiboNum3 = BigInteger.valueOf(2);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   bigTemp = BigInteger.valueOf(0);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;bigTemp =   bigTemp.add(bigFiboNum3);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   bigFiboNum3 = bigFiboNum1.add(bigFiboNum2);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;bigFiboNum1 = BigInteger.valueOf(0);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   bigFiboNum1 = bigFiboNum1.add(bigTemp);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   bigFiboNum2 = BigInteger.valueOf(0);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;bigFiboNum2 =   bigFiboNum2.add(bigFiboNum3);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   if(bigFiboNum3.compareTo(startNum) &amp;gt;= 0) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(bigFiboNum3.compareTo(endNum)   &amp;lt;= 0) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   fiboCount++;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else   {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   System.out.println(fiboCount);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   break;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; catch(Exception ex) { &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println("exception   "+ex.getMessage()+" caught");&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: #0d0d0d; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10pt; line-height: 115%;"&gt;}&lt;/span&gt;&lt;b&gt;&lt;span style="color: red; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 9pt; line-height: 115%;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;If you want to submit your code in java then give your file name Main.java&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;And class name must be given &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" height="65" style="border-collapse: collapse; border: medium none; width: 488px;"&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;   &lt;td style="border: 1pt solid black; padding: 0in 5.4pt; width: 6.65in;" valign="top" width="638"&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;public class Main{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Staric   void main(String [] args){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;   }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;Are you understand?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;u&gt;&lt;span style="color: red; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 14pt; line-height: 115%;"&gt;BigInteger Class Example:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="color: #365f91; font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;File name: test.java&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" height="696" style="border-collapse: collapse; border: medium none; width: 489px;"&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;   &lt;td style="border: 1pt solid black; padding: 0in 5.4pt; width: 6.65in;" valign="top" width="638"&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;import java.io.*;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;import java.util.*;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;import java.math.BigInteger;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;/** Demonstrate using Scanner to   read a file. **/&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;public class test&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&amp;nbsp;   public static void main (String[] arg) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;   File file = null;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;   file = new File ("a.in");&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;   Scanner scanner = null;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;   try {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Create a scanner to read the file&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; scanner = new Scanner (file);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;   } catch (FileNotFoundException e) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println ("File not   found!");&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Stop program if no file found&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.exit (0);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;   }&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;   while(scanner.hasNext()){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(scanner.next());&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;   }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;   BigInteger bg1=new BigInteger("123456789");&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;   BigInteger bg2=new BigInteger("-123456789");&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;   System.out.println(bg2);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;   bg2=bg2.abs();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;   System.out.println(bg2);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;   bg2=bg2.negate();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;   System.out.println(bg2);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;   //return -1,0 or 1 for negative,zero or positive&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;   System.out.println(bg2.signum());&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;   //mod: this mod m&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;   BigInteger bg3=new BigInteger("123");&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;   bg3=bg3.mod(bg1);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;   System.out.println(bg3);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;&amp;nbsp;   } // main&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Bodoni MT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;} // class test&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" height="2367" style="width: 489px;"&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;   &lt;td colspan="2" style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: rgb(204, 204, 255) none repeat scroll 0% 0%; padding: 2.25pt;"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;a href="http://www.blogger.com/post-edit.do" name="method_summary"&gt;&lt;/a&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 18pt;"&gt;Method Summary&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt; width: 1%;" valign="top" width="1%"&gt;&lt;div align="right" class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: right;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html" title="class in java.math"&gt;&lt;span style="color: blue;"&gt;BigInteger&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt;"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html#abs%28%29"&gt;&lt;span style="color: blue;"&gt;abs&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;()&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Returns a   BigInteger whose value is the absolute value of this BigInteger.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt; width: 1%;" valign="top" width="1%"&gt;&lt;div align="right" class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: right;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html" title="class in java.math"&gt;&lt;span style="color: blue;"&gt;BigInteger&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt;"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html#add%28java.math.BigInteger%29"&gt;&lt;span style="color: blue;"&gt;add&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;(&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html" title="class in java.math"&gt;&lt;span style="color: blue;"&gt;BigInteger&lt;/span&gt;&lt;/a&gt;&amp;nbsp;val)&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Returns a   BigInteger whose value is &lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;(this + val)&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt; width: 1%;" valign="top" width="1%"&gt;&lt;div align="right" class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: right;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html" title="class in java.math"&gt;&lt;span style="color: blue;"&gt;BigInteger&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt;"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html#and%28java.math.BigInteger%29"&gt;&lt;span style="color: blue;"&gt;and&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;(&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html" title="class in java.math"&gt;&lt;span style="color: blue;"&gt;BigInteger&lt;/span&gt;&lt;/a&gt;&amp;nbsp;val)&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Returns a   BigInteger whose value is &lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;(this &amp;amp; val)&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt; width: 1%;" valign="top" width="1%"&gt;&lt;div align="right" class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: right;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html" title="class in java.math"&gt;&lt;span style="color: blue;"&gt;BigInteger&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt;"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html#andNot%28java.math.BigInteger%29"&gt;&lt;span style="color: blue;"&gt;andNot&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;(&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html" title="class in java.math"&gt;&lt;span style="color: blue;"&gt;BigInteger&lt;/span&gt;&lt;/a&gt;&amp;nbsp;val)&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Returns a   BigInteger whose value is &lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;(this &amp;amp; ~val)&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt; width: 1%;" valign="top" width="1%"&gt;&lt;div align="right" class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: right;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;int&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt;"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html#bitCount%28%29"&gt;&lt;span style="color: blue;"&gt;bitCount&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;()&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Returns the   number of bits in the two's complement representation of this BigInteger that   differ from its sign bit.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt; width: 1%;" valign="top" width="1%"&gt;&lt;div align="right" class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: right;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;int&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt;"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html#bitLength%28%29"&gt;&lt;span style="color: blue;"&gt;bitLength&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;()&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Returns the   number of bits in the minimal two's-complement representation of this   BigInteger, &lt;i&gt;excluding&lt;/i&gt; a sign bit.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt; width: 1%;" valign="top" width="1%"&gt;&lt;div align="right" class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: right;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html" title="class in java.math"&gt;&lt;span style="color: blue;"&gt;BigInteger&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt;"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html#clearBit%28int%29"&gt;&lt;span style="color: blue;"&gt;clearBit&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;(int&amp;nbsp;n)&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Returns a   BigInteger whose value is equivalent to this BigInteger with the designated   bit cleared.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt; width: 1%;" valign="top" width="1%"&gt;&lt;div align="right" class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: right;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;int&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt;"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html#compareTo%28java.math.BigInteger%29"&gt;&lt;span style="color: blue;"&gt;compareTo&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;(&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html" title="class in java.math"&gt;&lt;span style="color: blue;"&gt;BigInteger&lt;/span&gt;&lt;/a&gt;&amp;nbsp;val)&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Compares this   BigInteger with the specified BigInteger.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt; width: 1%;" valign="top" width="1%"&gt;&lt;div align="right" class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: right;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;int&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt;"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html#compareTo%28java.lang.Object%29"&gt;&lt;span style="color: blue;"&gt;compareTo&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;(&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" title="class in java.lang"&gt;&lt;span style="color: blue;"&gt;Object&lt;/span&gt;&lt;/a&gt;&amp;nbsp;o)&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Compares this   BigInteger with the specified Object.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt; width: 1%;" valign="top" width="1%"&gt;&lt;div align="right" class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: right;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html" title="class in java.math"&gt;&lt;span style="color: blue;"&gt;BigInteger&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt;"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html#divide%28java.math.BigInteger%29"&gt;&lt;span style="color: blue;"&gt;divide&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;(&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html" title="class in java.math"&gt;&lt;span style="color: blue;"&gt;BigInteger&lt;/span&gt;&lt;/a&gt;&amp;nbsp;val)&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Returns a   BigInteger whose value is &lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;(this / val)&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt; width: 1%;" valign="top" width="1%"&gt;&lt;div align="right" class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: right;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html" title="class in java.math"&gt;&lt;span style="color: blue;"&gt;BigInteger&lt;/span&gt;&lt;/a&gt;[]&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt;"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html#divideAndRemainder%28java.math.BigInteger%29"&gt;&lt;span style="color: blue;"&gt;divideAndRemainder&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;(&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html" title="class in java.math"&gt;&lt;span style="color: blue;"&gt;BigInteger&lt;/span&gt;&lt;/a&gt;&amp;nbsp;val)&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Returns an array   of two BigIntegers containing &lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;(this / val)&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt; followed by &lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;(this   % val)&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt; width: 1%;" valign="top" width="1%"&gt;&lt;div align="right" class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: right;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;double&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt;"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html#doubleValue%28%29"&gt;&lt;span style="color: blue;"&gt;doubleValue&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;()&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Converts this   BigInteger to a &lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;double&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt; width: 1%;" valign="top" width="1%"&gt;&lt;div align="right" class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: right;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;boolean&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt;"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html#equals%28java.lang.Object%29"&gt;&lt;span style="color: blue;"&gt;equals&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;(&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" title="class in java.lang"&gt;&lt;span style="color: blue;"&gt;Object&lt;/span&gt;&lt;/a&gt;&amp;nbsp;x)&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Compares this   BigInteger with the specified Object for equality.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt; width: 1%;" valign="top" width="1%"&gt;&lt;div align="right" class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: right;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html" title="class in java.math"&gt;&lt;span style="color: blue;"&gt;BigInteger&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt;"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html#flipBit%28int%29"&gt;&lt;span style="color: blue;"&gt;flipBit&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;(int&amp;nbsp;n)&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Returns a BigInteger   whose value is equivalent to this BigInteger with the designated bit flipped.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt; width: 1%;" valign="top" width="1%"&gt;&lt;div align="right" class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: right;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;float&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt;"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html#floatValue%28%29"&gt;&lt;span style="color: blue;"&gt;floatValue&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;()&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Converts this   BigInteger to a &lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;float&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt; width: 1%;" valign="top" width="1%"&gt;&lt;div align="right" class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: right;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html" title="class in java.math"&gt;&lt;span style="color: blue;"&gt;BigInteger&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt;"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html#gcd%28java.math.BigInteger%29"&gt;&lt;span style="color: blue;"&gt;gcd&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;(&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html" title="class in java.math"&gt;&lt;span style="color: blue;"&gt;BigInteger&lt;/span&gt;&lt;/a&gt;&amp;nbsp;val)&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Returns a   BigInteger whose value is the greatest common divisor of &lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;abs(this)&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt; and &lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;abs(val)&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt; width: 1%;" valign="top" width="1%"&gt;&lt;div align="right" class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: right;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;int&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt;"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html#getLowestSetBit%28%29"&gt;&lt;span style="color: blue;"&gt;getLowestSetBit&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;()&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Returns the index   of the rightmost (lowest-order) one bit in this BigInteger (the number of   zero bits to the right of the rightmost one bit).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt; width: 1%;" valign="top" width="1%"&gt;&lt;div align="right" class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: right;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;int&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt;"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html#hashCode%28%29"&gt;&lt;span style="color: blue;"&gt;hashCode&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;()&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Returns the hash   code for this BigInteger.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt; width: 1%;" valign="top" width="1%"&gt;&lt;div align="right" class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: right;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;int&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt;"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html#intValue%28%29"&gt;&lt;span style="color: blue;"&gt;intValue&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;()&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Converts this   BigInteger to an &lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;int&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt; width: 1%;" valign="top" width="1%"&gt;&lt;div align="right" class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: right;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;boolean&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt;"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html#isProbablePrime%28int%29"&gt;&lt;span style="color: blue;"&gt;isProbablePrime&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;(int&amp;nbsp;certainty)&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Returns &lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;true&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt; if this   BigInteger is probably prime, &lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;false&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt; if it's   definitely composite.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt; width: 1%;" valign="top" width="1%"&gt;&lt;div align="right" class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: right;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;long&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt;"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html#longValue%28%29"&gt;&lt;span style="color: blue;"&gt;longValue&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;()&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Converts this   BigInteger to a &lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;long&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt; width: 1%;" valign="top" width="1%"&gt;&lt;div align="right" class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: right;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html" title="class in java.math"&gt;&lt;span style="color: blue;"&gt;BigInteger&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt;"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html#max%28java.math.BigInteger%29"&gt;&lt;span style="color: blue;"&gt;max&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;(&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html" title="class in java.math"&gt;&lt;span style="color: blue;"&gt;BigInteger&lt;/span&gt;&lt;/a&gt;&amp;nbsp;val)&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Returns the   maximum of this BigInteger and &lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;val&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt; width: 1%;" valign="top" width="1%"&gt;&lt;div align="right" class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: right;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html" title="class in java.math"&gt;&lt;span style="color: blue;"&gt;BigInteger&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt;"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html#min%28java.math.BigInteger%29"&gt;&lt;span style="color: blue;"&gt;min&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;(&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html" title="class in java.math"&gt;&lt;span style="color: blue;"&gt;BigInteger&lt;/span&gt;&lt;/a&gt;&amp;nbsp;val)&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Returns the   minimum of this BigInteger and &lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;val&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;   &lt;td style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: white none repeat scroll 0% 0%; padding: 2.25pt; width: 1%;" valign="top" width="1%"&gt;&
