<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-7398660108345268867</atom:id><lastBuildDate>Fri, 01 Nov 2024 07:16:50 +0000</lastBuildDate><title>Spoj Solutions</title><description></description><link>http://logicoder.blogspot.com/</link><managingEditor>noreply@blogger.com (Logicoder)</managingEditor><generator>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7398660108345268867.post-3998833907423939393</guid><pubDate>Thu, 22 Dec 2011 17:29:00 +0000</pubDate><atom:updated>2011-12-22T09:29:25.170-08:00</atom:updated><title>Learning C++</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
&lt;h3 style=&quot;background-color: white; color: maroon; font-size: 1.2em; text-align: center;&quot;&gt;&lt;u style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Learning C++&lt;/u&gt;&lt;/h3&gt;&lt;h3 style=&quot;background-color: white; color: maroon; font-size: 1.2em; text-align: center;&quot;&gt;&lt;/h3&gt;&lt;pre style=&quot;background-color: white; font-size: 0.9em; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;See &quot;FAQs&quot; above; see also &quot;C++ resources&quot;, &quot;consulting services&quot;,
&quot;everything sites&quot; and &quot;Websites for authors of C++ books and
articles&quot; below.&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;background-color: white; font-size: 0.9em; text-align: -webkit-auto;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMdfJl6GU8cZHAUo1H6pS-ikUomVpWY5Bx0a3p8ICieLZu18crjj4Ugw5xCC_aT-AS2vUu-4qqwEG2b23e16ZPnvfNlx0cZv4tPhUqsoA4G1yQoll8pIlZu_LancRo6M6QTGW4BfPEb9I/s1600/c%252B%252B.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;144&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMdfJl6GU8cZHAUo1H6pS-ikUomVpWY5Bx0a3p8ICieLZu18crjj4Ugw5xCC_aT-AS2vUu-4qqwEG2b23e16ZPnvfNlx0cZv4tPhUqsoA4G1yQoll8pIlZu_LancRo6M6QTGW4BfPEb9I/s320/c%252B%252B.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;


The C++ language from its basics up to the newest features of ANSI-C++,
including basic concepts such as arrays or classes and advanced
concepts such as polymorphism or templates. My personal favorite&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;background-color: white; font-size: 0.9em; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;you just cannot miss this site when doing something serious with C++&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;background-color: white; font-size: 0.9em; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;a href=&quot;http://www.cplusplus.com/&quot; style=&quot;color: blue; text-decoration: none;&quot;&gt;http://www.cplusplus.com/&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;background-color: white; font-size: 0.9em; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;background-color: white; font-size: 0.9em; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;background-color: white; font-size: 0.9em; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;background-color: white; font-size: 0.9em; text-align: -webkit-auto;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgb5-nHLWny0r4-5xn2hJbKdik3NMxtHuhPv8uR5eVnaBW5BS7tvTipMx43kOBasoP10fG4JAZKibY5HduQqUuicx7Fkvz6oIqh2cL3Fne3FZGfmu0wJkaQ0tcJL5-47WTDUANRiHRvLec/s1600/cprgramming.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;168&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgb5-nHLWny0r4-5xn2hJbKdik3NMxtHuhPv8uR5eVnaBW5BS7tvTipMx43kOBasoP10fG4JAZKibY5HduQqUuicx7Fkvz6oIqh2cL3Fne3FZGfmu0wJkaQ0tcJL5-47WTDUANRiHRvLec/s320/cprgramming.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;background-color: white; font-size: 0.9em; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;background-color: white; font-size: 0.9em; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;

A web site designed to help you learn the C or C++ programming
languages, and provide you with C and C++ programming language
resources.
&lt;a href=&quot;http://www.cprogramming.com/&quot; style=&quot;color: blue; text-decoration: none;&quot;&gt;http://www.cprogramming.com/&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;background-color: white; font-size: 0.9em; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;background-color: white; font-size: 0.9em; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;background-color: white; font-size: 0.9em; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Tutorials about C++
&lt;a href=&quot;http://cplus.about.com/&quot; style=&quot;color: blue; text-decoration: none;&quot;&gt;http://cplus.about.com/&lt;/a&gt; 
 
C++ Annotations (moving from C to C++)
&lt;a href=&quot;http://www.icce.rug.nl/documents/cplusplus/&quot; style=&quot;color: blue; text-decoration: none;&quot;&gt;http://www.icce.rug.nl/documents/cplusplus/&lt;/a&gt; 

DevCentral tutorials for C and C++
&lt;a href=&quot;http://devcentral.iftech.com/learning/tutorials/&quot; style=&quot;color: blue; text-decoration: none;&quot;&gt;http://devcentral.iftech.com/learning/tutorials/&lt;/a&gt; 

C++ tutorials for Windows 32, how to do without MFC, getting the compiler
to do the hard work of avoiding memory leaks, games, frequency analysis etc
&lt;a href=&quot;http://www.relisoft.com/&quot; style=&quot;color: blue; text-decoration: none;&quot;&gt;http://www.relisoft.com/&lt;/a&gt; 

Coronado enterprises tutorials (formerly Gordon Dodrill&#39;s)
You can see sample chapters, but are charged for the full tutorials
&lt;a href=&quot;http://www.coronadoenterprises.com/&quot; style=&quot;color: blue; text-decoration: none;&quot;&gt;http://www.coronadoenterprises.com/&lt;/a&gt; 

Guru of the week - ie discussion papers on using C++
&lt;a href=&quot;http://www.cntc.com/resources/gotw.html&quot; style=&quot;color: blue; text-decoration: none;&quot;&gt;http://www.cntc.com/resources/gotw.html&lt;/a&gt; 

Tutorials etc on Borland&#39;s CBuilder
&lt;a href=&quot;http://www.richplum.co.uk/cbuilder/&quot; style=&quot;color: blue; text-decoration: none;&quot;&gt;http://www.richplum.co.uk/cbuilder/&lt;/a&gt; 

Tutorial on the STL by Phil Ottewell.
&lt;a href=&quot;http://www.yrl.co.uk/~phil/stl/stl.htmlx&quot; style=&quot;color: blue; text-decoration: none;&quot;&gt;http://www.yrl.co.uk/~phil/stl/stl.htmlx&lt;/a&gt; 
&lt;a href=&quot;http://www.pottsoft.com/home/stl/stl.htmlx&quot; style=&quot;color: blue; text-decoration: none;&quot;&gt;http://www.pottsoft.com/home/stl/stl.htmlx&lt;/a&gt; 
He has also got a tutorial on C for Fortran users
&lt;a href=&quot;http://www.pottsoft.com/home/c_course/course.html&quot; style=&quot;color: blue; text-decoration: none;&quot;&gt;http://www.pottsoft.com/home/c_course/course.html&lt;/a&gt; 

Notes for a university lecture course, but
maybe there is enough here for independent study. 
&lt;a href=&quot;http://m2tech.net/cppclass/&quot; style=&quot;color: blue; text-decoration: none;&quot;&gt;http://m2tech.net/cppclass/&lt;/a&gt; 

Note on pointers - perhaps more oriented towards C than C++.
&lt;a href=&quot;http://www.cudenver.edu/~tgibson/tutorial/&quot; style=&quot;color: blue; text-decoration: none;&quot;&gt;http://www.cudenver.edu/~tgibson/tutorial/&lt;/a&gt; 

Very simple C under DOS or MS-windows. Not much C++;
possibly useful to someone interested in programming
MS-windows without MFC etc.
&lt;a href=&quot;http://www.cpp-programming.com/&quot; style=&quot;color: blue; text-decoration: none;&quot;&gt;http://www.cpp-programming.com&lt;/a&gt; 

Weekly newsletter on C++ and other things: aimed at helping new
and intermediate programmers improve their coding skills.
&lt;a href=&quot;http://www.cyberelectric.net.au/~collins&quot; style=&quot;color: blue; text-decoration: none;&quot;&gt;http://www.cyberelectric.net.au/~collins&lt;/a&gt; 

www.informit.com - a site run by Macmillan USA containing a lot
of information including the several well-known C++ books for
free download - if you are prepared to supply name and email address 
&lt;a href=&quot;http://www.informit.com/&quot; style=&quot;color: blue; text-decoration: none;&quot;&gt;http://www.informit.com/&lt;/a&gt; 

C++ in 21 days - 2nd edition
&lt;a href=&quot;http://newdata.box.sk/bx/c/&quot; style=&quot;color: blue; text-decoration: none;&quot;&gt;http://newdata.box.sk/bx/c/&lt;/a&gt; 

A variety of C++ books on line (Macmillian, Sams, Wiley, IDG etc)
You can see the tables of contents, but you will have to have a
subscription to read the books themselves after a free trial.
&lt;a href=&quot;http://www.itknowledge.com/reference/dir.programminglanguages.c1.html&quot; style=&quot;color: blue; text-decoration: none;&quot;&gt;http://www.itknowledge.com/reference/dir.programminglanguages.c1.html&lt;/a&gt; 

Elementary introduction to C++ (mostly the C subset)
&lt;a href=&quot;http://clio.mit.csu.edu.au/TTT/&quot; style=&quot;color: blue; text-decoration: none;&quot;&gt;http://clio.mit.csu.edu.au/TTT/&lt;/a&gt; 

How to use function-pointers in C and C++, callbacks, functors
&lt;a href=&quot;http://www.function-pointer.org/&quot; style=&quot;color: blue; text-decoration: none;&quot;&gt;http://www.function-pointer.org&lt;/a&gt; 
&lt;a href=&quot;http://www.newty.de/fpt/fpt.html&quot; style=&quot;color: blue; text-decoration: none;&quot;&gt;http://www.newty.de/fpt/fpt.html&lt;/a&gt; 

Short C++ tutorial, aimed at people who already have
experience with an object-oriented programming language
&lt;a href=&quot;http://www.entish.org/realquickcpp/&quot; style=&quot;color: blue; text-decoration: none;&quot;&gt;http://www.entish.org/realquickcpp/&lt;/a&gt; 

Articles about Win32, C++, MFC articles using VC++ compiler. 
&lt;a href=&quot;http://www.codersource.net/&quot; style=&quot;color: blue; text-decoration: none;&quot;&gt;http://www.codersource.net&lt;/a&gt; 
&lt;/span&gt;&lt;/pre&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;</description><link>http://logicoder.blogspot.com/2011/12/learning-c.html</link><author>noreply@blogger.com (Logicoder)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMdfJl6GU8cZHAUo1H6pS-ikUomVpWY5Bx0a3p8ICieLZu18crjj4Ugw5xCC_aT-AS2vUu-4qqwEG2b23e16ZPnvfNlx0cZv4tPhUqsoA4G1yQoll8pIlZu_LancRo6M6QTGW4BfPEb9I/s72-c/c%252B%252B.PNG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7398660108345268867.post-8623406270660179074</guid><pubDate>Wed, 14 Dec 2011 09:23:00 +0000</pubDate><atom:updated>2011-12-14T01:23:54.123-08:00</atom:updated><title>2727. ARMY STRENGTH</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: large;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;a href=&quot;http://www.spoj.pl/problems/ARMY/&quot; target=&quot;_blank&quot;&gt;2727.&amp;nbsp;ARMY&amp;nbsp;STRENGTH&lt;/a&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;
&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;u&gt;Summary:-&lt;/u&gt;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
Well problem is pretty simple.... Both Godzilla and MechaGodzilla have soldiers of different strength and there will be random fight between individual soldiers and winner in this fight will be based on simple condition--&amp;gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;Strength of Godzilla soldier &amp;gt;= Strength of MechaGodzilla soldier(obviously... Godzilla one wins)&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;Strength of Godzilla soldier &amp;lt; Strength of MechaGodzilla soldier(obviously... MechaGodzilla one wins)&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;Otherwise &quot;uncertain&quot;(Yup... you are right.... this never happens)&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;This continues for every soldier and the team whose soldiers remain is declared winner by the above mentioned criteria. &lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;u&gt;&lt;b&gt;Logic:-&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;What I did is I took input of strengths in an array of required size and then found out the greatest integer in both the array and then compared it according the above criteria to score an &lt;b&gt;AC&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;Here&#39;s the code in C.&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;container&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;pre class=&quot;brush: cpp&quot;&gt;#include&amp;lt;stdio.h&amp;gt;
int main()
{
 int t;
 scanf(&quot;%d&quot;,&amp;amp;t);
 int i;
 int j;
 int ng;
 int nm;
 int m1;
 int m2;
 for(i=0;i&amp;lt;t;i++) {
  scanf(&quot;%d&quot;,&amp;amp;ng);
  scanf(&quot;%d&quot;,&amp;amp;nm);
  int g[ng];
  int m[nm];
  for(j=0;j&amp;lt;ng;j++) {
   scanf(&quot;%d&quot;,&amp;amp;g[j]);
  }
  for(j=0;j&amp;lt;nm;j++) {
   scanf(&quot;%d&quot;,&amp;amp;m[j]);
  }
  m1=g[0];
  m2=m[0];
  for(j=1;j&amp;lt;ng;j++) {
   if(m1&amp;lt;g[j])
   m1=g[j];
  }
  for(j=1;j&amp;lt;nm;j++) {
   if(m2&amp;lt;m[j])
   m2=m[j];
  }
  if(m1&amp;gt;=m2)
   printf(&quot;Godzilla\n&quot;);
  else if(m1&amp;lt;m2)
   printf(&quot;MechaGodzilla\n&quot;);
  else
   printf(&quot;uncertain\n&quot;);
 }
 return 0;
}
&lt;/pre&gt;&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://logicoder.blogspot.com/2011/12/2727-army-strength.html</link><author>noreply@blogger.com (Logicoder)</author><thr:total>4</thr:total></item></channel></rss>