#2271
ProdMax1
Se dă un șir cu n
numere întregi. Determinați cel mai mare număr care poate fi scris ca produs de două elemente ale șirului.
Problema | ProdMax1 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #38413410 | Utilizator | |
Fișier | prodmax1.cpp | Dimensiune | 964 B |
Data încărcării | 10 Octombrie 2022, 09:50 | Scor / rezultat | 0 puncte |
prodmax1.cpp: In function 'int main()': prodmax1.cpp:47:19: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=] scanf("%d", &n); ^ prodmax1.cpp:51:26: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=] scanf("%d", &v[i]); ^ prodmax1.cpp:55:55: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=] if(v[0]*v[1]>v[n-1]*v[n-2]) printf("%d", v[0]*v[1]); ^ prodmax1.cpp:56:59: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=] else printf("%d", v[n-1]*v[n-2]); ^ prodmax1.cpp:47:20: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &n); ^ prodmax1.cpp:51:27: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &v[i]); ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0.004 secunde | Caught fatal signal 11 | 20 | 0 | Exemplu | |
2 | 0.004 secunde | Caught fatal signal 11 | 20 | 0 | ||
3 | 0.008 secunde | Caught fatal signal 11 | 10 | 0 | ||
4 | 0 secunde | Caught fatal signal 11 | 10 | 0 | ||
5 | 0.008 secunde | Caught fatal signal 11 | 10 | 0 | ||
6 | 0 secunde | Caught fatal signal 11 | 10 | 0 | ||
7 | 0 secunde | Caught fatal signal 11 | 10 | 0 | ||
8 | 0 secunde | Caught fatal signal 11 | 10 | 0 | ||
Punctaj total | 0 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ProdMax1 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ă.