#4850
O matrice cu n linii şi m coloane se completează aleatoriu cu numerele \( 2^{1}, 2^{2},…, 2^{n\cdot m}\), fiecare număr fiind folosit o singură dată. Matricea se numeşte perfecta dacă produsul elementelor pe fiecare linie şi fiecare coloană este pătrat perfect. Să se afle câte matrice perfecte se pot forma.
***
| Problema | Perfecta | Operații I/O |
perfecta.in/perfecta.out
|
|---|---|---|---|
| Limita timp | 0.75 secunde | Limita memorie |
Total: 256 MB
/
Stivă 8 MB
|
| Id soluție | #62848858 | Utilizator | |
| Fișier | perfecta.cpp | Dimensiune | 7.44 KB |
| Data încărcării | 04 Februarie 2026, 10:07 | Scor/rezultat | Eroare de compilare |
perfecta.cpp:5:3: error: stray '\310' in program <title>Algoritmul Dijkstra - Animație simplă</title> ^ perfecta.cpp:5:3: error: stray '\233' in program perfecta.cpp:5:3: error: stray '\304' in program perfecta.cpp:5:3: error: stray '\203' in program perfecta.cpp:9:19: error: stray '#' in program background: #0f0f1a; ^ perfecta.cpp:10:14: error: stray '#' in program color: #e0e0ff; ^ perfecta.cpp:16:25: error: stray '#' in program border: 2px solid #444; ^ perfecta.cpp:17:19: error: stray '#' in program background: #1a1a2e; ^ perfecta.cpp:26:19: error: stray '#' in program background: #6200ea; ^ perfecta.cpp:26:20: error: exponent has no digits background: #6200ea; ^ perfecta.cpp:32:32: error: stray '#' in program button:hover { background: #7f39fb; } ^ perfecta.cpp:33:6: error: invalid preprocessing directive #status #status { ^ perfecta.cpp:36:19: error: exponent has no digits min-height: 1.6em; ^ perfecta.cpp:37:14: error: stray '#' in program color: #00e676; ^ perfecta.cpp:43:1: error: stray '\342' in program <h2>Algoritmul lui Dijkstra – vizualizare pas cu pas</h2> ^ perfecta.cpp:43:1: error: stray '\200' in program perfecta.cpp:43:1: error: stray '\223' in program perfecta.cpp:47:3: error: stray '\310' in program <button onclick="startAnimation()">Start / Restart animație</button> ^ perfecta.cpp:47:3: error: stray '\233' in program perfecta.cpp:48:3: error: stray '\304' in program <button onclick="stepByStep()">Următorul pas</button> ^ perfecta.cpp:48:3: error: stray '\203' in program perfecta.cpp:51:1: error: stray '\304' in program <div id="status">Apasă „Start” sau „Următorul pas”</div> ^ perfecta.cpp:51:1: error: stray '\203' in program perfecta.cpp:51:1: error: stray '\342' in program perfecta.cpp:51:1: error: stray '\200' in program perfecta.cpp:51:1: error: stray '\236' in program perfecta.cpp:51:1: error: stray '\342' in program perfecta.cpp:51:1: error: stray '\200' in program perfecta.cpp:51:1: error: stray '\235' in program perfecta.cpp:51:1: error: stray '\342' in program perfecta.cpp:51:1: error: stray '\200' in program perfecta.cpp:51:1: error: stray '\236' in program perfecta.cpp:51:1: error: stray '\304' in program perfecta.cpp:51:1: error: stray '\203' in program perfecta.cpp:51:1: error: stray '\342' in program perfecta.cpp:51:1: error: stray '\200' in program perfecta.cpp:51:1: error: stray '\235' in program perfecta.cpp:84:40: warning: character constant too long for its type [enabled by default] const canvas = document.getElementById('canvas'); ^ perfecta.cpp:85:34: warning: multi-character character constant [-Wmultichar] const ctx = canvas.getContext('2d'); ^ perfecta.cpp:86:40: warning: character constant too long for its type [enabled by default] const status = document.getElementById('status'); ^ perfecta.cpp:116:3: error: stray '\`' in program status.textContent = \`Start: nodul ${startNode} → dist=0\`; ^ perfecta.cpp:116:3: error: stray '\342' in program perfecta.cpp:116:3: error: stray '\206' in program perfecta.cpp:116:3: error: stray '\222' in program perfecta.cpp:116:3: error: stray '\`' in program perfecta.cpp:135:34: warning: character constant too long for its type [enabled by default] ctx.strokeStyle = isActive ? '#ff1744' : '#546e7a'; ^ perfecta.cpp:135:46: warning: character constant too long for its type [enabled by default] ctx.strokeStyle = isActive ? '#ff1744' : '#546e7a'; ^ perfecta.cpp:144:32: warning: character constant too long for its type [enabled by default] ctx.fillStyle = isActive ? '#ffeb3b' : '#b0bec5'; ^ perfecta.cpp:144:44: warning: character constant too long for its type [enabled by default] ctx.fillStyle = isActive ? '#ffeb3b' : '#b0bec5'; ^ perfecta.cpp:145:16: warning: character constant too long for its type [enabled by default] ctx.font = '14px Arial'; ^ perfecta.cpp:151:17: warning: character constant too long for its type [enabled by default] let color = '#455a64'; // nod normal ^ perfecta.cpp:152:21: warning: character constant too long for its type [enabled by default] let textColor = '#ffffff'; ^ perfecta.cpp:155:15: warning: character constant too long for its type [enabled by default] color = '#00e676'; textColor = '#000'; ^ perfecta.cpp:155:38: warning: multi-character character constant [-Wmultichar] color = '#00e676'; textColor = '#000'; ^ perfecta.cpp:157:15: warning: character constant too long for its type [enabled by default] color = '#0288d1'; ^ perfecta.cpp:159:15: warning: character constant too long for its type [enabled by default] color = '#ff9800'; // atins, dar nu procesat încă ^ perfecta.cpp:164:15: warning: character constant too long for its type [enabled by default] color = '#ab47bc'; ^ perfecta.cpp:173:16: warning: character constant too long for its type [enabled by default] ctx.font = 'bold 20px Arial'; ^ perfecta.cpp:174:21: warning: character constant too long for its type [enabled by default] ctx.textAlign = 'center'; ^ perfecta.cpp:175:24: warning: character constant too long for its type [enabled by default] ctx.textBaseline = 'middle'; ^ perfecta.cpp:180:23: warning: character constant too long for its type [enabled by default] ctx.fillStyle = '#80deea'; ^ perfecta.cpp:181:18: warning: character constant too long for its type [enabled by default] ctx.font = '14px Arial'; ^ perfecta.cpp:182:42: warning: multi-character character constant [-Wmultichar] ctx.fillText(n.dist === Infinity ? '∞' : n.dist, n.x, n.y + 45); ^ perfecta.cpp:208:3: error: stray '\`' in program status.textContent = \`Procesăm nodul → ${u} (distanță = ${du})\`; ^ perfecta.cpp:208:3: error: stray '\304' in program perfecta.cpp:208:3: error: stray '\203' in program perfecta.cpp:208:3: error: stray '\342' in program perfecta.cpp:208:3: error: stray '\206' in program perfecta.cpp:208:3: error: stray '\222' in program perfecta.cpp:208:3: error: stray '\310' in program perfecta.cpp:208:3: error: stray '\233' in program perfecta.cpp:208:3: error: stray '\304' in program perfecta.cpp:208:3: error: stray '\203' in program perfecta.cpp:208:3: error: stray '\`' in program perfecta.cpp:232:7: error: stray '\`' in program status.textContent += \` → actualizat ${v} = ${alt}\`; ^ perfecta.cpp:232:7: error: stray '\342' in program perfecta.cpp:232:7: error: stray '\206' in program perfecta.cpp:232:7: error: stray '\222' in program perfecta.cpp:232:7: error: stray '\`' in program perfecta.cpp:1:1: error: expected unqualified-id before '<' token <!DOCTYPE html> ^ perfecta.cpp:15:5: error: 'canvas' does not name a type canvas { ^ perfecta.cpp:22:5: error: 'button' does not name a type button { ^ perfecta.cpp:32:11: error: found ':' in nested-name-specifier, expected '::' button:hover { background: #7f39fb; } ^ perfecta.cpp:32:5: error: 'button' does not name a type button:hover { background: #7f39fb; } ^ perfecta.cpp:34:7: error: 'font' does not name a type font-size: 1.3rem; ^ perfecta.cpp:35:7: error: 'margin' does not name a type margin: 15px; ^ perfecta.cpp:36:7: error: 'min' does not name a type min-height: 1.6em; ^ perfecta.cpp:37:7: error: 'color' does not name a type color: #00e676; ^ perfecta.cpp:38:5: error: expected declaration before '}' token } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Perfecta 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ă.