-
Notifications
You must be signed in to change notification settings - Fork 0
/
task.html
108 lines (90 loc) · 6.69 KB
/
task.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Helvetic Coding Contest</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="gedit" />
<meta name="author" content="Titus Cieslewski" />
<link rel="stylesheet" type="text/css" href="style23ba2.css?20150204" />
<LINK REL="SHORTCUT ICON" HREF="res/favicon3ba2.png?20150204">
<script type="text/javascript" src="js/js23ba2.js?20150204"></script>
<script type="text/javascript" src="../ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript" src="../ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
<script type="text/javascript" src="../apis.google.com/js/plusone.js"></script>
<!-- GOOGLE ANALYTICS -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-37610977-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<div style="margin:20px auto 0px auto; width:1150px; position:relative;">
<img src="img/space_kung_fu_heidi.png" style="position:absolute;left:-8%;" />
<img src="img/invader.png" style="position:absolute;left:1000px;" />
<div id="main3">
<div id="main2">
<div id="main">
<!--<img src="img/logo.png" style="position:absolute; bottom:-40px; left:-30px;" alt="logo" />-->
<!-- Some seldomly accessed links & infos here -->
<table width="100%" style="padding:0 10px; margin:3px auto 0px auto;">
<tr>
<td style="padding:0; margin:0;">
<a href="../external.html?link=http://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><script type="text/javascript" src="../platform.twitter.com/widgets.js"></script></td><td style="padding:0; margin:0;">
<iframe src="../external.html?link=http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com%2Fpages%2FHelvetic-Coding-Contest%2F309821316193&layout=button_count&show_faces=false&width=450&action=like&colorscheme=light&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:200px; height:21px;" allowTransparency="true"></iframe>
</td><td style="padding:0; margin:0;"><g:plusone size="small" annotation="inline" width="200"></g:plusone>
</td>
<td align="right" style="padding:0; margin:0;">
<form action="../external.html?link=http://2015.hc2.ch/task.php?" method="get" style="display:inline;">
<select id="language" name="lang">
<option value="En" selected>English</option>
<option value="De" >Deutsch</option>
<option value="Fr" >Français</option>
</select>
<script language="javascript">
$(function(){
$("#language").change(function(){
location.href = ("?lang="+$("#language").val());
});
});
</script>
<noscript>
<input type="Submit"/>
</noscript>
</form>
Last update: 27.07.2015 </td>
</tr>
</table>
<!-- The menu -->
<div id="menu">
<span ><a href='index-2.html'>Home</a></span><span ><a href='info.html'>Infos</a></span><span ><a href='gallery.html'>Gallery</a></span><span class='selected'><a href='register_frame.html'>Registration</a></span><span ><a href='links.html'>Sponsors</a></span>
<div align="left" id="submenu">
<span ><a href='register_frame.html'>Registration</a></span><span class='selected'><a href='task.html'>Qualification task</a></span><span ><a href='regstatus.html'>Registration status</a></span> </div>
</div>
<!-- Finally, the content -->
<div id="content">
<div class="alert">Each team will receive a slightly different task, therefore you will need to register before being able to see the input your team should use.</div><div class="alert">Use the link in your registration confirmation e-mail to view the correct input.</div><p style='font-weight: bold;'>You are too late to solve the task.</p><p>Did you know that Heidi the Coding Cow is meant to defend the world from space invaders? Well, neither did she. No wonder she is completely flabbergasted as she is rushed into the Helvetic Conquest Cruiser and given the task to intercept the first wave of invaders. Therefore, she needs your help!</p><p>Given a 2D overview of the situation (<code>v</code> = invader, <code>A</code> = Helvetic Conquest Cruiser, <code>_</code> = space) give Heidi the sequence of commands with least amount of steps that will make her take out the invaders, from the closest to earth to the furthest (that is, start with the row just above the '<code>A</code>', then go up row by row). To make things easier, there is exactly one invader in a given row (except the bottommost).</p><p>The commands are <em>X</em><code>l</code>, <em>X</em><code>r</code> and <code>s</code>, where <code>l</code>/<code>r</code> means left/right and <code>s</code> means shoot. Replace <em>X</em> with the distance (columns) to move in the given direction.</p><p>A shot instantaneously takes out the bottommost surviving invader that is in the same column as the Helvetic Conquest Cruiser. You can assume that the invaders don't move. Concatenate your commands into a single string.</p><p>Please login to see your scenario.</p><h2>Sample</h2><p>For the following example scenario:</p><pre>v___
_v__
___v
___v
v___
__A_</pre><p>You should give the following command sequence:</p><pre>2ls3rss2ls1ls</pre><p><a href="regtask2015/sample.txt" >Download the example as a text file!</a></p> </div>
<br style="clear:both;" />
<div id="foot" align="center">
<a href="../external.html?link=http://www.epfl.ch/" target="_blank" ><img src="img/logo140/epfl.png" alt="logo epfl" align="middle"/></a>
<a href="../external.html?link=http://www.open.ch/" target="_blank" ><img src="img/logo140/open.png" alt="logo open systems" align="middle" /></a>
<a href="../external.html?link=http://www.adnovum.ch/" target="_blank" ><img src="img/logo140/adnovum.png" alt="logo adnovum" align="middle"/></a>
<a href="../external.html?link=http://polyprog.epfl.ch/" target="_blank" ><img src="img/logo140/polyprog.png" alt="logo polyprog" align="middle" /></a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>