Zeta offline judge
Tags: php, computerscience, challenge, programmingcontests
Published: 2018-12-16 13:24:53

<article class="markdown-body entry-content" itemprop="text">
<p>Zeta <g-emoji class="g-emoji" alias="dragon" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f409.png">🐉</g-emoji> is an offline judge for programming contests <g-emoji class="g-emoji" alias="trophy" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f3c6.png">🏆.</g-emoji>
<br>Githup link : <a href="https://github.com/aa-ahmed-aa/Zeta">https://github.com/aa-ahmed-aa/Zeta</a>
<br></p>
<h2><a id="user-content-guardsman-features" class="anchor" aria-hidden="true" href="#guardsman-features"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><g-emoji class="g-emoji" alias="guardsman" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f482.png">💂</g-emoji> Features</h2>
<ul>
<li>Contestants auto ranking.</li>
<li>Can add clarifications for problems.</li>
<li>Auto judging for c/c++ solutions (java comming soon).</li>
</ul>
<h2><a id="user-content-triangular_flag_on_post-judging-and-ranking" class="anchor" aria-hidden="true" href="#triangular_flag_on_post-judging-and-ranking"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><g-emoji class="g-emoji" alias="triangular_flag_on_post" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f6a9.png">🚩</g-emoji> Judging and Ranking</h2>
<h4><a id="user-content-pushpin-judging" class="anchor" aria-hidden="true" href="#pushpin-judging"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><g-emoji class="g-emoji" alias="pushpin" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4cc.png">📌</g-emoji> Judging</h4>
<p>after judging a problem the contestant can get one of 4 responses :- <br></p>
<ul>
<li>AC =&gt; ACCEPTED</li>
<li>WA =&gt; WRONG ANSWER</li>
<li>TLE =&gt; TIME LIMIT EXCEEDED</li>
<li>CE =&gt; COMPILER ERROR</li>
</ul>
<p><a target="_blank" rel="noopener noreferrer" href="https://github.com/aa-ahmed-aa/Zeta/blob/master/screenshots/judge.PNG"><img src="https://github.com/aa-ahmed-aa/Zeta/raw/master/screenshots/judge.PNG" alt="Alt text" title="Judge" style="max-width:100%;"></a></p>
<p><strong>green judge mean it is recommended to use this type of judging for this submmition</strong></p>
<ul>
<li>Automatic <g-emoji class="g-emoji" alias="vs" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f19a.png">🆚</g-emoji> Manual Judging
<ul>
<li>Automatic judging
It will run the contestant solution and compare it with the testcases given to that problem and respond to that user submition .<br></li>
<li>Manual Judging
Adding the response manually to this submition because Sometimes users didn't follow the rules of the contest and read or write from i/o Stream Not File.<br></li>
</ul>
</li>
</ul>
<h4><a id="user-content-oncoming_taxi-ranking" class="anchor" aria-hidden="true" href="#oncoming_taxi-ranking"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><g-emoji class="g-emoji" alias="oncoming_taxi" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f696.png">🚖</g-emoji> Ranking</h4>
<ul>
<li>Submition rank <br>
Submition are ranked according to time and problem rank so the ranking equation is :- <br></li>
</ul>
<div class="highlight highlight-text-html-php"><pre><span class="pl-s1">                                                     <span class="pl-c1">Tstart</span> <span class="pl-k">-</span> <span class="pl-c1">Tsub</span></span>
<span class="pl-s1">       <span class="pl-c1">submition_rank</span> <span class="pl-k">=</span>   <span class="pl-c1">problem_rank</span>    <span class="pl-k">-</span>    <span class="pl-c1">_________________________</span>    <span class="pl-k">-</span>    (    <span class="pl-c1">wrongAnswerCount</span>   <span class="pl-k">*</span>   <span class="pl-c1">5</span>    )</span>
<span class="pl-s1">                                                           <span class="pl-c1">60</span></span>
<span class="pl-s1"></span>
<span class="pl-s1">       <span class="pl-c1">Minimum</span> <span class="pl-c1">Submmition</span> <span class="pl-c1">Rank</span> <span class="pl-c1">is</span> <span class="pl-k">=</span> <span class="pl-c1">40</span><span class="pl-k">%</span> <span class="pl-c1">Of</span> <span class="pl-c1">problem</span> <span class="pl-c1">rank</span></span>
<span class="pl-s1"></span></pre></div>
<ul>
<li>
<p>User rank <br></p>
<ul>
<li>Users are ranked according to the highest sum of the ACCEPTED problems rank.</li>
<li>Scoreboard Time is the time of the user last submition.</li>
</ul>
<p><a target="_blank" rel="noopener noreferrer" href="https://github.com/aa-ahmed-aa/Zeta/blob/master/screenshots/scoreboard.PNG"><img src="https://github.com/aa-ahmed-aa/Zeta/raw/master/screenshots/scoreboard.PNG" alt="Alt text" title="Judge" style="max-width:100%;"></a></p>
<p><strong>Time is the Time of the user last Submmition</strong></p>
</li>
</ul>
<h2><a id="user-content-rocket-prerequirements" class="anchor" aria-hidden="true" href="#rocket-prerequirements"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><g-emoji class="g-emoji" alias="rocket" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f680.png">🚀</g-emoji> PreRequirements</h2>
<ul>
<li>xampp ( if you have any problem with the calss named String it is according to PHP version read this to fix the problem : <a href="https://github.com/cakephp/cakephp/issues/7573">https://github.com/cakephp/cakephp/issues/7573</a> )</li>
<li>GCC Compiler ( i used <a href="https://nuwen.net/mingw.html" rel="nofollow">Mingw</a> )</li>
</ul>
<h2><a id="user-content-fire-installation" class="anchor" aria-hidden="true" href="#fire-installation"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><g-emoji class="g-emoji" alias="fire" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f525.png">🔥</g-emoji> Installation</h2>
<ul>
<li>Download the Repo <code>git clone https://github.com/aa-ahmed-aa/Zeta</code> or via the download button.</li>
<li>Import the database file in the <code>Database/zeta_4.sql</code> to phpmyadmin.</li>
<li>Go to <code>app/Config/database.php</code> and update username and password to your credential</li>
<li>Download <a href="https://nuwen.net/mingw.html" rel="nofollow">Mingw</a> compiler and copy it to your Zeta path.</li>
<li>Now Goto <a href="http://localhost/Zeta" rel="nofollow"></a><a href="http://localhost/Zeta" rel="nofollow">http://localhost/Zeta</a> and user username : ahmedkhaled, password : ahmedkhaled123 to login (this is the default admin account you can use it to add other admins and contestant then delete it later)</li>
</ul>
<blockquote>
<h1><a id="user-content-before-starting-a-contest-you-should-go-to-settings-and-set-the-starting-time-of-the-contest-this-time-is-used-to-ranks-problems-and-contestant-in-the-scoreboard" class="anchor" aria-hidden="true" href="#before-starting-a-contest-you-should-go-to-settings-and-set-the-starting-time-of-the-contest-this-time-is-used-to-ranks-problems-and-contestant-in-the-scoreboard"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Before starting a contest you should go to Settings and set the starting time of the contest this time is used to ranks problems and contestant in the scoreboard</h1>
</blockquote>
<h2><a id="user-content-construction-contribution" class="anchor" aria-hidden="true" href="#construction-contribution"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><g-emoji class="g-emoji" alias="construction" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f6a7.png">🚧</g-emoji> Contribution</h2>
<blockquote>
<p>Compilation and Running is based on this package (<a href="https://github.com/aa-ahmed-aa/Dorm">DORM</a>) so feel free to have a look.<br></p>
</blockquote>
<p>If you find any problem feel free to open issues with any error you find or features you think we can add to Zeta, if you have any problem while you are installing zeta please feel free to contact me at <strong><a href="mailto:ahmedkhaled36@hotmail.com">ahmedkhaled36@hotmail.com</a></strong></p>
<h2><a id="user-content-police_car-license" class="anchor" aria-hidden="true" href="#police_car-license"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>
</article>