#165
maxsim
Să se determine perechea de elemente dintr-un vector egal depărtate de centru cu suma elementelor maximă.
Problema | maxsim | Operații I/O |
maxsim.in /maxsim.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #20425000 | Utilizator | |
Fișier | maxsim.cpp | Dimensiune | 450 B |
Data încărcării | 29 Ianuarie 2020, 22:22 | Scor / rezultat | 0 puncte |
maxsim.cpp: In function 'int min(int)': maxsim.cpp:10:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ maxsim.cpp: In function 'int max(int)': maxsim.cpp:14:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ maxsim.cpp: In function 'int min(int)': maxsim.cpp:9:2: warning: 'y' is used uninitialized in this function [-Wuninitialized] if(x<y)return x; ^ maxsim.cpp: In function 'int max(int)': maxsim.cpp:13:1: warning: 'y' is used uninitialized in this function [-Wuninitialized] if(x>y)return x; ^ maxsim.cpp: In function 'int main()': maxsim.cpp:13:1: warning: 'b' may be used uninitialized in this function [-Wmaybe-uninitialized] maxsim.cpp:16:11: note: 'b' was declared here {int i ,a,b,s=0; ^ maxsim.cpp:9:2: warning: 'a' may be used uninitialized in this function [-Wmaybe-uninitialized] if(x<y)return x; ^ maxsim.cpp:16:9: note: 'a' was declared here {int i ,a,b,s=0; ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | Raspuns gresit. | 20 | 0 | Exemplu | |
2 | 0 secunde | Raspuns gresit. | 40 | 0 | ||
3 | 0 secunde | Raspuns gresit. | 40 | 0 | ||
Punctaj total | 0 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema maxsim 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ă.