#1734
smax
Un muzeu al diamantelor își are sediul într-o clădire cu formă cubică cu N etaje, numerotate de la 1 la N. În fiecare camera se află un diamant cu valoarea cunoscută. Niște hoți vor sa fure diamantele si trebuie să aleagă cel mai profitabil traseu care să pornească din camera cu eticheta 1 1 1 și să ajungă în camera cu eticheta N N N și care, bineînțeles, să le permită să obțină o sumă maximă din vânzarea diamantelor furate din camerele prin care au trecut în traseu ales.
Concursul Național de Soft Grigore Moisil - Lugoj, 2016
Problema | smax | Operații I/O |
smax.in /smax.out
|
---|---|---|---|
Limita timp | 0.2 secunde | Limita memorie |
Total: 6 MB
/
Stivă 6 MB
|
Id soluție | #17161724 | Utilizator | |
Fișier | smax.cpp | Dimensiune | 1.92 KB |
Data încărcării | 02 Octombrie 2019, 18:38 | Scor / rezultat | 85 puncte |
smax.cpp: In function 'int main()': smax.cpp:44:33: warning: narrowing conversion of 'x' from 'int' to 'short int' inside { } [-Wnarrowing] q.push({x, y, z}); ^ smax.cpp:44:33: warning: narrowing conversion of 'y' from 'int' to 'short int' inside { } [-Wnarrowing] smax.cpp:44:33: warning: narrowing conversion of 'z' from 'int' to 'short int' inside { } [-Wnarrowing] smax.cpp:49:22: warning: narrowing conversion of 'i' from 'int' to 'short int' inside { } [-Wnarrowing] st.push({i, j, k}); ^ smax.cpp:49:22: warning: narrowing conversion of 'j' from 'int' to 'short int' inside { } [-Wnarrowing] smax.cpp:49:22: warning: narrowing conversion of 'k' from 'int' to 'short int' inside { } [-Wnarrowing] smax.cpp:64:38: warning: narrowing conversion of 'x' from 'int' to 'short int' inside { } [-Wnarrowing] st.push({x, y, z}); ^ smax.cpp:64:38: warning: narrowing conversion of 'y' from 'int' to 'short int' inside { } [-Wnarrowing] smax.cpp:64:38: warning: narrowing conversion of 'z' from 'int' to 'short int' inside { } [-Wnarrowing]
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
0 | 0 secunde | Corect! | 5 | 5 | ||
1 | 0 secunde | Corect! | 5 | 5 | ||
2 | 0 secunde | Corect! | 5 | 5 | ||
3 | 0 secunde | Corect! | 5 | 5 | ||
4 | 0.004 secunde | Incorect c! | 5 | 2 | ||
5 | 0.004 secunde | Incorect c! | 5 | 2 | ||
6 | 0.008 secunde | Corect! | 5 | 5 | ||
7 | 0.012 secunde | Incorect c! | 5 | 2 | ||
8 | 0.032 secunde | Incorect c! | 5 | 2 | ||
9 | 0.008 secunde | Corect! | 5 | 5 | ||
10 | 0.008 secunde | Corect! | 5 | 5 | ||
11 | 0.14 secunde | Incorect c! | 5 | 2 | ||
12 | 0.024 secunde | Corect! | 5 | 5 | ||
13 | 0.032 secunde | Corect! | 5 | 5 | ||
14 | 0.064 secunde | Corect! | 5 | 5 | ||
15 | 0.108 secunde | Corect! | 5 | 5 | ||
16 | 0.1 secunde | Corect! | 5 | 5 | ||
17 | 0.104 secunde | Corect! | 5 | 5 | ||
18 | 0.136 secunde | Corect! | 5 | 5 | ||
19 | 0.1 secunde | Corect! | 5 | 5 | ||
Punctaj total | 85 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema smax 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ă.