#2179
Max3
Fie n
un număr natural nenul şi un şir de n
numere naturale nenule, fiecare număr din şir având cel mult 3
cifre. Şirul dat se „maximizează”
prin aplicarea următoarelor transformări:
ONI GIM 2010
Problema | Max3 | Operații I/O |
max3.in /max3.out
|
---|---|---|---|
Limita timp | 1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #22589299 | Utilizator | |
Fișier | max3.cpp | Dimensiune | 2.24 KB |
Data încărcării | 24 Aprilie 2020, 15:46 | Scor / rezultat | 84 puncte |
max3.cpp:13:0: warning: ignoring #pragma warning [-Wunknown-pragmas] #pragma warning (disable:4996) ^ max3.cpp: In function 'void myfunction(int&)': max3.cpp:55:9: warning: unused variable 'cn' [-Wunused-variable] int cn = n; ^ max3.cpp: In function 'int main()': max3.cpp:11:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] #define fo(x, y) for (int i = (x); i < (y); ++i) ^ max3.cpp:90:5: note: in expansion of macro 'fo' fo(0, A.size()) ^ max3.cpp:11:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] #define fo(x, y) for (int i = (x); i < (y); ++i) ^ max3.cpp:106:5: note: in expansion of macro 'fo' fo(0, A.size() - 1) ^ max3.cpp:12:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] #define FO(x, y) for (int j = (x); j < (y); ++j) ^ max3.cpp:107:9: note: in expansion of macro 'FO' FO(i + 1, A.size()) ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | Corect a).Corect b). | 10 | 10 | Exemplu | |
2 | 0 secunde | Corect a).Corect b). | 10 | 10 | ||
3 | 0 secunde | Corect a).Corect b). | 10 | 10 | ||
4 | 0 secunde | Corect a).Corect b). | 10 | 10 | ||
5 | 0 secunde | Corect a).Gresit b). | 10 | 2 | ||
6 | 0 secunde | Corect a).Corect b). | 10 | 10 | ||
7 | 0.008 secunde | Corect a).Corect b). | 10 | 10 | ||
8 | 0 secunde | Corect a).Corect b). | 10 | 10 | ||
9 | 0 secunde | Corect a).Corect b). | 10 | 10 | ||
10 | 0.064 secunde | Corect a).Gresit b). | 10 | 2 | ||
Punctaj total | 84 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Max3 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ă.