Detalii evaluare #29181690

Rezumat problemă

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.

Detalii

Problema ProdMax1 Operații I/O tastatură/ecran
Limita timp 0.1 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #29181690 Utilizator Istratescu Vlad (vladistr08)
Fișier prodmax1.cpp Dimensiune 2.73 KB
Data încărcării 05 Aprilie 2021, 16:32 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

prodmax1.cpp:56:5: error: redefinition of 'int maxneg1'
 int maxneg1 = 0, maxneg2 = 0, max1 = -1, max2 = -1, minneg = -1111111111;

     ^
prodmax1.cpp:5:5: error: 'int maxneg1' previously defined here
 int maxneg1 = 0, maxneg2 = 0, max1 = -1, max2 = -1, minneg = -1111111111;

     ^
prodmax1.cpp:56:18: error: redefinition of 'int maxneg2'
 int maxneg1 = 0, maxneg2 = 0, max1 = -1, max2 = -1, minneg = -1111111111;

                  ^
prodmax1.cpp:5:18: error: 'int maxneg2' previously defined here
 int maxneg1 = 0, maxneg2 = 0, max1 = -1, max2 = -1, minneg = -1111111111;

                  ^
prodmax1.cpp:56:31: error: redefinition of 'int max1'
 int maxneg1 = 0, maxneg2 = 0, max1 = -1, max2 = -1, minneg = -1111111111;

                               ^
prodmax1.cpp:5:31: error: 'int max1' previously defined here
 int maxneg1 = 0, maxneg2 = 0, max1 = -1, max2 = -1, minneg = -1111111111;

                               ^
prodmax1.cpp:56:42: error: redefinition of 'int max2'
 int maxneg1 = 0, maxneg2 = 0, max1 = -1, max2 = -1, minneg = -1111111111;

                                          ^
prodmax1.cpp:5:42: error: 'int max2' previously defined here
 int maxneg1 = 0, maxneg2 = 0, max1 = -1, max2 = -1, minneg = -1111111111;

                                          ^
prodmax1.cpp:56:53: error: redefinition of 'int minneg'
 int maxneg1 = 0, maxneg2 = 0, max1 = -1, max2 = -1, minneg = -1111111111;

                                                     ^
prodmax1.cpp:5:53: error: 'int minneg' previously defined here
 int maxneg1 = 0, maxneg2 = 0, max1 = -1, max2 = -1, minneg = -1111111111;

                                                     ^
prodmax1.cpp: In function 'void citire()':
prodmax1.cpp:58:6: error: redefinition of 'void citire()'
 void citire(){

      ^
prodmax1.cpp:7:6: error: 'void citire()' previously defined here
 void citire(){

      ^
prodmax1.cpp: In function 'long long int produs()':
prodmax1.cpp:86:11: error: redefinition of 'long long int produs()'
 long long produs(){

           ^
prodmax1.cpp:35:11: error: 'long long int produs()' previously defined here
 long long produs(){

           ^
prodmax1.cpp: In function 'int main(int, const char**)':
prodmax1.cpp:111:5: error: redefinition of 'int main(int, const char**)'
 int main(int argc, char const *argv[])

     ^
prodmax1.cpp:104:5: error: 'int main(int, const char**)' previously defined here
 int main(int argc, char const *argv[])

     ^

Cum funcționează evaluarea?

www.pbinfo.ro permite evaluarea a două tipuri de probleme:

  • probleme la care rezolvarea presupune scrierea unui program complet
  • probleme la care rezolvarea presupune scrierea unei secvențe de program - câteva instrucțiuni, o listă de declarații, una sau mai multe funcții, etc.

Problema ProdMax1 face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:

  • Programul sursă este compilat folosind compilatorul corespunzător. Dacă în urma compilării se obțin erori sau avertismente, acestea sunt afișate în această pagină.
  • Dacă programul a fost compilat, executabilul obținut va fi rulat, furnizându-i-se unul sau mai multe seturi de date de intrare, în concordanță cu restricțiile specifice problemei. Pentru fiecare set de date se obține un anumit punctaj, în raport cu corectitudinea soluției tale.

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ă.