Detalii evaluare #58387590

Rezumat problemă

Se dau coordonatele carteziene a n puncte în plan. Să se determine distanța maximă dintre un punct dat și originea sistemului de coordonate și numărul de puncte situate la acea distanță față de origine.

Detalii

Problema Puncte Operații I/O tastatură/ecran
Limita timp 0.1 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #58387590 Utilizator Muresan Dragos (MuresanDragos)
Fișier puncte.cpp Dimensiune 1.11 KB
Data încărcării 31 Mai 2025, 11:45 Scor / rezultat Eroare de compilare

Evaluare

Mesaj compilare

puncte.cpp:48:5: error: 'x' does not name a type
     x , y;

     ^
puncte.cpp: In constructor 'punct::punct()':
puncte.cpp:13:9: error: 'y' was not declared in this scope
         y = x = 0 ;

         ^
puncte.cpp:13:13: error: 'x' was not declared in this scope
         y = x = 0 ;

             ^
puncte.cpp: In constructor 'punct::punct(int, int)':
puncte.cpp:18:17: error: 'class punct' has no member named 'x'
         this -> x = x;

                 ^
puncte.cpp:19:17: error: 'class punct' has no member named 'y'
         this -> y = y;

                 ^
puncte.cpp: In member function 'void punct::SetX(int)':
puncte.cpp:24:17: error: 'class punct' has no member named 'x'
         this -> x = x;

                 ^
puncte.cpp: In member function 'int punct::GetX()':
puncte.cpp:29:24: error: 'class punct' has no member named 'x'
         return this -> x;

                        ^
puncte.cpp: In member function 'void punct::SetY(int)':
puncte.cpp:34:17: error: 'class punct' has no member named 'y'
         this -> y = y ;

                 ^
puncte.cpp: In member function 'int punct::GetY()':
puncte.cpp:39:24: error: 'class punct' has no member named 'y'
         return this -> y;

                        ^
puncte.cpp: In member function 'float punct::distance()':
puncte.cpp:44:23: error: 'x' was not declared in this scope
         return sqrt ( x*x , y*y);

                       ^
puncte.cpp:44:29: error: 'y' was not declared in this scope
         return sqrt ( x*x , y*y);

                             ^
puncte.cpp: In function 'int main()':
puncte.cpp:69:19: error: 'class punct' has no member named 'dist'
         if ( p[i].dist() > dmax)

                   ^
puncte.cpp:70:25: error: 'class punct' has no member named 'dist'
             dmax = p[i].dist();

                         ^
puncte.cpp:73:19: error: 'class punct' has no member named 'dist'
         if ( p[i].dist() == dmax)

                   ^

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

Du-te sus!