Differences

This shows you the differences between two versions of the page.

Link to this comparison view

pa:reguli-generale-tron [2013/04/08 00:09]
traian.rebedea created
pa:reguli-generale-tron [2013/04/19 23:15] (current)
traian.rebedea [Introducere]
Line 1: Line 1:
-Regulile oficiale în limba engleză sunt preluate de pe [[https://​www.hackerrank.com/​bucharest-tron/​challenges/​tron-many|pagina concursului de pe HackerRank]]. Vă rugăm să ne scuzați că nu le-am tradus și în limba română, dar ne ocupăm și de acest lucru în curând.+====== Descriere joc Tron Many ======
  
-În plus, limitele uzuale de timp pentru fiecare mutare de pe HackerRank sunt descrise [[https://​www.hackerrank.com/​environment|aici]]. Dacă acestea vor fi schimbate, acest lucru va fi specificat în această pagină.+===== Introducere =====
  
-====== Descriere joc Tron Many ======+Regulile oficiale în limba engleză sunt disponibile pe [[https://​www.hackerrank.com/​contests/​bucharest-tron/​challenges/​tron-many|pagina concursului de pe HackerRank]]. Aceasta este o traducere a acestor reguli în limba română, împreună cu câteva observații utile. 
 + 
 +În plus, limitele uzuale de timp pentru fiecare mutare de pe HackerRank sunt descrise [[https://​www.hackerrank.com/​environment|aici]]. Dacă acestea vor fi schimbate, acest lucru va fi specificat în această pagină. 
 +===== Obiectiv ​=====
  
-Tron is a two player game based on the popular movie Tron. The objective of the game is to cut off players movement through each others motorbikes that leave a wall behind them as they move.+Tron este un joc între doi jucători având la bază cunoscutul film Tron. Obiectivul jocului este să limitezi mişcările adversarului folosind zidul lăsat în urmă de motocicleta proprie.
  
-Input Format+===== Format ​de intrare =====
  
-Tron takes place on a mxn gridThe top left of the grid is (0,0) and the bottom right of the grid is indexed as (m-1,​n-1). ​The grid is indexed as (row,column) +Jocul are loc pe o grilă cu m rânduri şi n coloaneColţul din stânga sus este notat (0,0), iar colţul din dreapta jos este notat (m-1,​n-1). ​Grila este indexată ca (rând,coloana). În afara zidurilor lăsate în urmă de motocicletele jucătorilor,​ mai există ziduri plasate precum în figură:
-Additional walls are placed as shown in the figure+
  
 +<​code>​
 ###############​ ###############​
 #​------#​------#​ #​------#​------#​
Line 27: Line 30:
 #​------#​------#​ #​------#​------#​
 ###############​ ###############​
-The 1st player is represented by r (ascii value: 114). The 2nd player is represented by g (ascii value: 103).+</​code>​
  
-The first line contains a character representing the current player +Primul jucător este reprezentat ca ‘r’ (valoare ascii: 114)Al doilea jucător este reprezentat ca ‘g’ (valoare ascii: 103). 
-The second line consists of four single spaced integers representing the current position of 1st and 2nd players’ bike+Prima linie a inputului conţine un caracter reprezentând jucătorul curent, cel pe care botul uploadat trebuie să-l comande. A doua linie este formată din patru numere naturale separate prin spaţiu care reprezintă poziţia curentă a motocicletei jucătorului 1 şi, respectiv, a jucătorului 2.
  
-The third line consists of single spaced integers indicating the row size and column size of the gridrow lines follow each line having column characters which represents the grid map. +A treia linie conţine ​numere naturale separate prin spaţiu ce reprezintă numărul de linii (m) şi numărul de coloane a hărţii (n)Urmează m rânduri a n caractere care formează hartaUn zid este reprezentat de # (valoare ​ascii: 114), un spaţiu liber este reprezentat de - (valoare ​ascii45). Zidul lăsat în urmă de motocicletele jucătorilor este reprezentat de caracterele asociate (r sau g).
-A wall is represented by # (ascii ​value 35), an empty grid is represented by - (ascii ​value 45). The wall left behind by the player are represented by their respective characters.+
  
-Output ​Format+===== Format ​de ieşire =====
  
-Players are allowed to output any one of the following moves as the movement of their bikes.+Jucătorii trebuie să tipărească la ieşirea standard una din următoarele şiruri de caractere fără ghilimele: “LEFT”, “RIGHT”,​ “UP”, “DOWN”.
  
-LEFT +Dacă (x,y) este poziţia curentăatunci ​LEFT duce la (x,y-1), RIGHT duce la (x, y+1), UP duce la (x-1,y) and DOWN duce la (x+1,y).
-RIGHT +
-UP +
-DOWN +
-all in capital letters. +
- +
-If (x,y) is the current position of the player’s motorbikethen the new position on LEFT would be (x,y-1), RIGHT would be (x, y+1), UP would be (x-1,y) and DOWN would be (x+1,y).+
  
-Sample Input+Exemplu de intrare
  
 +<​code>​
 r r
 7 1 12 8 7 1 12 8
Line 67: Line 64:
 #​------#​gggggg#​ #​------#​gggggg#​
 ###############​ ###############​
-Sample Output+</​code>​
  
 +Exemplu de ieşire
 +<​code>​
 DOWN DOWN
-The grid results in the following state. ​+</​code>​
  
 +Harta arată astfel acum:
 +
 +<​code>​
 ###############​ ###############​
 #​r-----#​------#​ #​r-----#​------#​
Line 87: Line 89:
 #​------#​gggggg#​ #​------#​gggggg#​
 ###############​ ###############​
-The current player is r whose motor bike is positioned currently at (7,1). Valid moves are DOWN only. The player outputs DOWN.+</​code>​ 
 + 
 +Jucătorii nu au voie să dea ‘undo’ la o mutarede exemplu după o mişcare la dreapta nu au voie imediat să se mişte la stânga şi viceversa.
  
-Note:- At any point during the game play, players aren’t allowed to trace back their moves. i.e.a LEFT is not allowed after a RIGHT and viceversa or an UP isn’t allowed after a DOWN and vice versa.+Jocul este simultanAmbii jucătorii primesc aceeaşstare a hărţiiDaca ambii jucători mişcă in aceeaşi celulă intr-un tur sau amândoi se lovesc de zidjocul este considerat remiză.
  
-Game Play+====== Alte informații ======
  
-The game play is simultaneousBoth players get the same board stateIf both the players move to the same cell in their next move or both hit the wallsthe game is considered ​drawThe player who is unable to move loses.+  - In cazul în care butonul "play" al unui meci nu funcţionează,​ puteţi încerca deschiderea lui într-o fereastră separată prin apăsarea butonului "​showgame"​ reprezentat ca un link in partea de sus-dreapta a panoului. 
 +  - Limitele de timp pentru diversele limbaje de programare: https://www.hackerrank.com/​environment 
 +  - Pentru primele doua etape (etapa 1 și etapa 2) nu aveți voie sa folosiți fișiere externe. Pentru etapele următoareinclusiv pentru concursul final aveți voie să scrieți maxim 5MB în fișierele ce pot fi salvate pe serverul HackerRank. 
 +  - Daca aveți probleme cu submisiile, puteți să întrebați și un admin de pe HackerRank. Ei sunt online pe IRC cam tot timpul. Mai jos parerea unui coleg "S-rezolvat problema pana la urmaAm vorbit pe IRC cu un admin si mi-au rezolvat problema repedeFoarte binevoitori adminii. Recomand ca pe viitor daca aveti probleme, sa intrati pe **IRC**, **freenode**,​ channel **#​hackerrank**" ​
pa/reguli-generale-tron.1365368962.txt.gz · Last modified: 2013/04/08 00:09 by traian.rebedea
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0