<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<!-- DOMjudge version 3.3.2 -->
<title>Source: s1218</title>
<link rel="shortcut icon" href="../images/favicon.png" type="image/png" />
<link rel="stylesheet" href="../style.css" type="text/css" />
<link rel="stylesheet" href="style_jury.css" type="text/css" />
<script type="text/javascript" src="../js/sorttable.js"></script>
<script type="text/javascript" src="../js/domjudge.js"></script>
</head>
<body>

<h2>Source code for submission s1218</h2>

<p><a href="#diff">Go to diff to previous submission</a></p>

<div class="tabber"><div class="tabbertab"><h2 class="filename"><a name="source0"></a>mosquito.cpp</h2> 

<pre class="cpp" style="font-family:monospace;"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339900;">#include &lt;stdio.h&gt;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;">int</span> main <span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #0000ff;">int</span> m, p, l, e, r, s, n, x<span style="color: #008080;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #0000dd;">scanf</span> <span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;%d %d %d %d %d %d %d&quot;</span>, <span style="color: #000040;">&amp;</span>m, <span style="color: #000040;">&amp;</span>p, <span style="color: #000040;">&amp;</span>l, <span style="color: #000040;">&amp;</span>e, <span style="color: #000040;">&amp;</span>r, <span style="color: #000040;">&amp;</span>s, <span style="color: #000040;">&amp;</span>n<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #0000ff;">for</span><span style="color: #008000;">&#40;</span><span style="color: #0000ff;">int</span> i <span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span> i <span style="color: #000080;">&lt;</span> n<span style="color: #008080;">;</span> i<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#123;</span></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">      x <span style="color: #000080;">=</span> m<span style="color: #008080;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">      m <span style="color: #000080;">=</span> p<span style="color: #000040;">/</span>s<span style="color: #008080;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">      p <span style="color: #000080;">=</span> l<span style="color: #000040;">/</span>r<span style="color: #008080;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">      l <span style="color: #000080;">=</span> x <span style="color: #000040;">*</span> e<span style="color: #008080;">;</span></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #008000;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #0000dd;">printf</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;%d<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>, m<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #0000ff;">return</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">  <span style="color: #008000;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li></ol></pre></div></div><h2><a name="diff"></a>Diff to submission <a href="921">s921</a></h2>
<div class="tabber"><div class="tabbertab"><h2 class="filename"><a name="diff"></a>mosquito.cpp</h2>

<pre class="output_text"><span class='diff-del'>--- c4.s921.cteam104.mosquito.cpp.0.mosquito.cpp</span>
<span class='diff-add'>+++ c4.s1218.cteam104.mosquito.cpp.0.mosquito.cpp</span>
@@ -1,26 +1,22 @@
<span class='diff-del'>-#include&lt;iostream&gt;</span>
<span class='diff-del'>-using namespace std;</span>
<span class='diff-del'>-int main()</span>
<span class='diff-del'>-{</span>
<span class='diff-del'>-  int m, p, l, e, r, s, n, eggs;</span>
<span class='diff-del'>-  cin &gt;&gt; m &gt;&gt; p &gt;&gt; l &gt;&gt; e &gt;&gt; r &gt;&gt; s &gt;&gt; n;</span>
<span class='diff-add'>+#include &lt;stdio.h&gt;</span>
<span class='diff-add'>+</span>
<span class='diff-add'>+int main (){</span>
<span class='diff-add'>+</span>
<span class='diff-add'>+    int m, p, l, e, r, s, n, x;</span>
<span class='diff-add'>+</span>
<span class='diff-add'>+    scanf (&quot;%d %d %d %d %d %d %d&quot;, &amp;m, &amp;p, &amp;l, &amp;e, &amp;r, &amp;s, &amp;n);</span>
<span class='diff-add'>+</span>
<span class='diff-add'>+    for(int i = 0; i &lt; n; i++){</span>
<span class='diff-add'>+</span>
<span class='diff-add'>+      x = m;</span>
<span class='diff-add'>+      m = p/s;</span>
<span class='diff-add'>+      p = l/r;</span>
<span class='diff-add'>+      l = x * e;</span>
 
<span class='diff-del'>-  for(int a=1; a&lt;=n; a++)</span>
<span class='diff-del'>-  {</span>
<span class='diff-del'>-    if(a==1){</span>
<span class='diff-del'>-    eggs = e*m;</span>
<span class='diff-del'>-    m = p/s;</span>
<span class='diff-del'>-    p = l/r;</span>
<span class='diff-del'>-    l = eggs + l;</span>
<span class='diff-del'>-    }</span>
<span class='diff-del'>-    else{</span>
<span class='diff-del'>-    eggs = e*m;</span>
<span class='diff-del'>-    m = p/s;</span>
<span class='diff-del'>-    p = l/r;</span>
<span class='diff-del'>-    l = eggs;</span>
     }
<span class='diff-add'>+</span>
<span class='diff-add'>+    printf(&quot;%d\n&quot;, m);</span>
<span class='diff-add'>+</span>
<span class='diff-add'>+    return 0;</span>
   }
<span class='diff-del'>-  cout &lt;&lt; m &lt;&lt; endl;</span>
<span class='diff-del'>-  return 0;</span>
<span class='diff-del'>-}</span>
 
</pre>

</div></div>
</body>
</html>
