#1107
La un concurs de robotică, în timpul prezentării, un roboţel cu corp cilindric cu diametrul de o unitate scapă de sub control şi se deplasează într-un ring de formă dreptunghiulară. Ringul este împărţit în N x M pătrate identice, cu latura de o unitate, aşezate pe N linii şi M coloane.
Robotul poate părăsi ringul numai pe la colţuri, acestea fiind numerotate de la 1 la 4, colţul cu numărul 1 fiind cel din stânga jos apoi restul fiind numerotate în sens trigonometric. Suprafaţa ringului este delimitată de exterior prin intermediul a patru pereţi despărţitori: doi pereţi “verticali” (aşezaţi de la colţul 1 la colţul 4, respectiv de la colţul 2 la colţul 3) şi doi pereţi “orizontali” (aşezaţi de la colţul 1 la colţul 2, respectiv de la colţul 3 la colţul 4), fără a bloca ieşirile, ca în desenul alăturat.
1 sub un unghi de 45 grade şi cu o viteză de un pătrat/s. Ciocnirile cu pereţii sunt considerate perfect elastice (robotul nu-şi pierde din viteză) iar unghiul de incidenţă este egal cu cel de reflexie.
Se cere să se determine:
a) după câte secunde şi prin ce colţ al ringului va ieşi robotul;
b) de câte ori se ciocneşte robotul de pereţii orizontali şi verticali, rezultând o schimbare de direcţie, până la ieşirea din ring.
| Problema | Reflex | Operații I/O |
reflex.in/reflex.out
|
|---|---|---|---|
| Limita timp | 0.3 secunde | Limita memorie |
Total: 2 MB
/
Stivă 1 MB
|
| Id soluție | #60428615 | Utilizator | |
| Fișier | reflex.cpp | Dimensiune | 1.80 KB |
| Data încărcării | 01 Noiembrie 2025, 14:19 | Scor/rezultat | 0 puncte |
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0 secunde | Exited with error status 255 | 4 | 0 | ||
| 2 | 0 secunde | Exited with error status 255 | 4 | 0 | ||
| 3 | 0 secunde | Exited with error status 255 | 4 | 0 | ||
| 4 | 0 secunde | Exited with error status 255 | 4 | 0 | ||
| 5 | 0 secunde | Exited with error status 255 | 4 | 0 | ||
| 6 | 0 secunde | Exited with error status 255 | 4 | 0 | ||
| 7 | 0 secunde | Exited with error status 255 | 4 | 0 | ||
| 8 | 0 secunde | Exited with error status 255 | 4 | 0 | ||
| 9 | 0 secunde | Exited with error status 255 | 4 | 0 | ||
| 10 | 0 secunde | Exited with error status 255 | 4 | 0 | ||
| 11 | 0 secunde | Exited with error status 255 | 4 | 0 | ||
| 12 | 0 secunde | Exited with error status 255 | 4 | 0 | ||
| 13 | 0 secunde | Exited with error status 255 | 4 | 0 | ||
| 14 | 0 secunde | Exited with error status 48 | 4 | 0 | ||
| 15 | 0 secunde | Exited with error status 49 | 4 | 0 | ||
| 16 | 0 secunde | Exited with error status 10 | 4 | 0 | ||
| 17 | 0 secunde | Exited with error status 10 | 4 | 0 | ||
| 18 | 0 secunde | Exited with error status 56 | 4 | 0 | ||
| 19 | 0 secunde | Exited with error status 48 | 4 | 0 | ||
| 20 | 0 secunde | Exited with error status 255 | 4 | 0 | ||
| 21 | 0 secunde | Exited with error status 255 | 4 | 0 | ||
| 22 | 0 secunde | Exited with error status 53 | 4 | 0 | ||
| 23 | 0 secunde | Exited with error status 50 | 4 | 0 | ||
| 24 | 0 secunde | Exited with error status 52 | 4 | 0 | ||
| 25 | 0 secunde | Exited with error status 57 | 4 | 0 | ||
| Punctaj total | 0 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Reflex face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.