Detalii evaluare #44423305

Rezumat problemă

Să se scrie un program care citește un șir de n numere naturale şi determină valoarea maximă din șir și de câte ori apare.

Detalii

Problema MaxAndAp Operații I/O tastatură/ecran
Limita timp 0.1 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #44423305 Utilizator Nicolau Bianca (BNicolau)
Fișier maxandap.cpp Dimensiune 599 B
Data încărcării 17 August 2023, 13:56 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

maxandap.cpp:1:9: error: #include expects "FILENAME" or <FILENAME>
 #include <iostream>

         ^
maxandap.cpp:3:1: error: stray '\302' in program
 using namespace std;

 ^
maxandap.cpp:3:1: error: stray '\240' in program
maxandap.cpp:3:1: error: stray '\302' in program
maxandap.cpp:3:1: error: stray '\240' in program
maxandap.cpp:5:1: error: stray '\302' in program
 int main()

 ^
maxandap.cpp:5:1: error: stray '\240' in program
maxandap.cpp:7:1: error: stray '\302' in program
            int n,i, max = 0, ap = 0, x;

 ^
maxandap.cpp:7:1: error: stray '\240' in program
maxandap.cpp:7:1: error: stray '\302' in program
maxandap.cpp:7:1: error: stray '\240' in program
maxandap.cpp:7:1: error: stray '\302' in program
maxandap.cpp:7:1: error: stray '\240' in program
maxandap.cpp:7:1: error: stray '\302' in program
maxandap.cpp:7:1: error: stray '\240' in program
maxandap.cpp:7:1: error: stray '\302' in program
maxandap.cpp:7:1: error: stray '\240' in program
maxandap.cpp:7:1: error: stray '\302' in program
maxandap.cpp:7:1: error: stray '\240' in program
maxandap.cpp:7:1: error: stray '\302' in program
maxandap.cpp:7:1: error: stray '\240' in program
maxandap.cpp:7:1: error: stray '\302' in program
maxandap.cpp:7:1: error: stray '\240' in program
maxandap.cpp:7:1: error: stray '\302' in program
maxandap.cpp:7:1: error: stray '\240' in program
maxandap.cpp:7:1: error: stray '\302' in program
maxandap.cpp:7:1: error: stray '\240' in program
maxandap.cpp:7:1: error: stray '\302' in program
maxandap.cpp:7:1: error: stray '\240' in program
maxandap.cpp:7:1: error: stray '\302' in program
maxandap.cpp:7:1: error: stray '\240' in program
maxandap.cpp:7:1: error: stray '\302' in program
maxandap.cpp:7:1: error: stray '\240' in program
maxandap.cpp:7:1: error: stray '\302' in program
maxandap.cpp:7:1: error: stray '\240' in program
maxandap.cpp:9:1: error: stray '\302' in program
            cin >> n;

 ^
maxandap.cpp:9:1: error: stray '\240' in program
maxandap.cpp:9:1: error: stray '\302' in program
maxandap.cpp:9:1: error: stray '\240' in program
maxandap.cpp:9:1: error: stray '\302' in program
maxandap.cpp:9:1: error: stray '\240' in program
maxandap.cpp:9:1: error: stray '\302' in program
maxandap.cpp:9:1: error: stray '\240' in program
maxandap.cpp:9:1: error: stray '\302' in program
maxandap.cpp:9:1: error: stray '\240' in program
maxandap.cpp:9:1: error: stray '\302' in program
maxandap.cpp:9:1: error: stray '\240' in program
maxandap.cpp:9:1: error: stray '\302' in program
maxandap.cpp:9:1: error: stray '\240' in program
maxandap.cpp:9:1: error: stray '\302' in program
maxandap.cpp:9:1: error: stray '\240' in program
maxandap.cpp:11:1: error: stray '\302' in program
             for ( i = 1; i <= n; i++)

 ^
maxandap.cpp:11:1: error: stray '\240' in program
maxandap.cpp:11:1: error: stray '\302' in program
maxandap.cpp:11:1: error: stray '\240' in program
maxandap.cpp:11:1: error: stray '\302' in program
maxandap.cpp:11:1: error: stray '\240' in program
maxandap.cpp:11:1: error: stray '\302' in program
maxandap.cpp:11:1: error: stray '\240' in program
maxandap.cpp:11:1: error: stray '\302' in program
maxandap.cpp:11:1: error: stray '\240' in program
maxandap.cpp:11:1: error: stray '\302' in program
maxandap.cpp:11:1: error: stray '\240' in program
maxandap.cpp:11:1: error: stray '\302' in program
maxandap.cpp:11:1: error: stray '\240' in program
maxandap.cpp:11:1: error: stray '\302' in program
maxandap.cpp:11:1: error: stray '\240' in program
maxandap.cpp:11:1: error: stray '\302' in program
maxandap.cpp:11:1: error: stray '\240' in program
maxandap.cpp:11:1: error: stray '\302' in program
maxandap.cpp:11:1: error: stray '\240' in program
maxandap.cpp:11:1: error: stray '\302' in program
maxandap.cpp:11:1: error: stray '\240' in program
maxandap.cpp:11:1: error: stray '\302' in program
maxandap.cpp:11:1: error: stray '\240' in program
maxandap.cpp:11:1: error: stray '\302' in program
maxandap.cpp:11:1: error: stray '\240' in program
maxandap.cpp:11:1: error: stray '\302' in program
maxandap.cpp:11:1: error: stray '\240' in program
maxandap.cpp:12:1: error: stray '\302' in program
             {

 ^
maxandap.cpp:12:1: error: stray '\240' in program
maxandap.cpp:12:1: error: stray '\302' in program
maxandap.cpp:12:1: error: stray '\240' in program
maxandap.cpp:12:1: error: stray '\302' in program
maxandap.cpp:12:1: error: stray '\240' in program
maxandap.cpp:12:1: error: stray '\302' in program
maxandap.cpp:12:1: error: stray '\240' in program
maxandap.cpp:12:1: error: stray '\302' in program
maxandap.cpp:12:1: error: stray '\240' in program
maxandap.cpp:12:1: error: stray '\302' in program
maxandap.cpp:12:1: error: stray '\240' in program
maxandap.cpp:13:1: error: stray '\302' in program
                    cin >> x;

 ^
maxandap.cpp:13:1: error: stray '\240' in program
maxandap.cpp:13:1: error: stray '\302' in program
maxandap.cpp:13:1: error: stray '\240' in program
maxandap.cpp:13:1: error: stray '\302' in program
maxandap.cpp:13:1: error: stray '\240' in program
maxandap.cpp:13:1: error: stray '\302' in program
maxandap.cpp:13:1: error: stray '\240' in program
maxandap.cpp:13:1: error: stray '\302' in program
maxandap.cpp:13:1: error: stray '\240' in program
maxandap.cpp:13:1: error: stray '\302' in program
maxandap.cpp:13:1: error: stray '\240' in program
maxandap.cpp:13:1: error: stray '\302' in program
maxandap.cpp:13:1: error: stray '\240' in program
maxandap.cpp:13:1: error: stray '\302' in program
maxandap.cpp:13:1: error: stray '\240' in program
maxandap.cpp:13:1: error: stray '\302' in program
maxandap.cpp:13:1: error: stray '\240' in program
maxandap.cpp:13:1: error: stray '\302' in program
maxandap.cpp:13:1: error: stray '\240' in program
maxandap.cpp:13:1: error: stray '\302' in program
maxandap.cpp:13:1: error: stray '\240' in program
maxandap.cpp:13:1: error: stray '\302' in program
maxandap.cpp:13:1: error: stray '\240' in program
maxandap.cpp:15:1: error: stray '\302' in program
                   if (x > max)

 ^
maxandap.cpp:15:1: error: stray '\240' in program
maxandap.cpp:15:1: error: stray '\302' in program
maxandap.cpp:15:1: error: stray '\240' in program
maxandap.cpp:15:1: error: stray '\302' in program
maxandap.cpp:15:1: error: stray '\240' in program
maxandap.cpp:15:1: error: stray '\302' in program
maxandap.cpp:15:1: error: stray '\240' in program
maxandap.cpp:15:1: error: stray '\302' in program
maxandap.cpp:15:1: error: stray '\240' in program
maxandap.cpp:15:1: error: stray '\302' in program
maxandap.cpp:15:1: error: stray '\240' in program
maxandap.cpp:15:1: error: stray '\302' in program
maxandap.cpp:15:1: error: stray '\240' in program
maxandap.cpp:15:1: error: stray '\302' in program
maxandap.cpp:15:1: error: stray '\240' in program
maxandap.cpp:15:1: error: stray '\302' in program
maxandap.cpp:15:1: error: stray '\240' in program
maxandap.cpp:15:1: error: stray '\302' in program
maxandap.cpp:15:1: error: stray '\240' in program
maxandap.cpp:15:1: error: stray '\302' in program
maxandap.cpp:15:1: error: stray '\240' in program
maxandap.cpp:15:1: error: stray '\302' in program
maxandap.cpp:15:1: error: stray '\240' in program
maxandap.cpp:16:1: error: stray '\302' in program
                   

 ^
maxandap.cpp:16:1: error: stray '\240' in program
maxandap.cpp:16:1: error: stray '\302' in program
maxandap.cpp:16:1: error: stray '\240' in program
maxandap.cpp:16:1: error: stray '\302' in program
maxandap.cpp:16:1: error: stray '\240' in program
maxandap.cpp:16:1: error: stray '\302' in program
maxandap.cpp:16:1: error: stray '\240' in program
maxandap.cpp:16:1: error: stray '\302' in program
maxandap.cpp:16:1: error: stray '\240' in program
maxandap.cpp:16:1: error: stray '\302' in program
maxandap.cpp:16:1: error: stray '\240' in program
maxandap.cpp:16:1: error: stray '\302' in program
maxandap.cpp:16:1: error: stray '\240' in program
maxandap.cpp:16:1: error: stray '\302' in program
maxandap.cpp:16:1: error: stray '\240' in program
maxandap.cpp:16:1: error: stray '\302' in program
maxandap.cpp:16:1: error: stray '\240' in program
maxandap.cpp:17:23: error: stray '\302' in program
                       max = x;}

                       ^
maxandap.cpp:17:23: error: stray '\240' in program
maxandap.cpp:17:23: error: stray '\302' in program
maxandap.cpp:17:23: error: stray '\240' in program
maxandap.cpp:18:6: error: stray '\302' in program
      for ( i = 1; i <= n; i++)

      ^
maxandap.cpp:18:6: error: stray '\240' in program
maxandap.cpp:18:6: error: stray '\302' in program
maxandap.cpp:18:6: error: stray '\240' in program
maxandap.cpp:18:6: error: stray '\302' in program
maxandap.cpp:18:6: error: stray '\240' in program
maxandap.cpp:18:6: error: stray '\302' in program
maxandap.cpp:18:6: error: stray '\240' in program
maxandap.cpp:18:6: error: stray '\302' in program
maxandap.cpp:18:6: error: stray '\240' in program
maxandap.cpp:18:6: error: stray '\302' in program
maxandap.cpp:18:6: error: stray '\240' in program
maxandap.cpp:18:6: error: stray '\302' in program
maxandap.cpp:18:6: error: stray '\240' in program
maxandap.cpp:18:6: error: stray '\302' in program
maxandap.cpp:18:6: error: stray '\240' in program
maxandap.cpp:21:1: error: stray '\302' in program
                                         

 ^
maxandap.cpp:21:1: error: stray '\240' in program
maxandap.cpp:21:1: error: stray '\302' in program
maxandap.cpp:21:1: error: stray '\240' in program
maxandap.cpp:21:1: error: stray '\302' in program
maxandap.cpp:21:1: error: stray '\240' in program
maxandap.cpp:21:1: error: stray '\302' in program
maxandap.cpp:21:1: error: stray '\240' in program
maxandap.cpp:21:1: error: stray '\302' in program
maxandap.cpp:21:1: error: stray '\240' in program
maxandap.cpp:21:1: error: stray '\302' in program
maxandap.cpp:21:1: error: stray '\240' in program
maxandap.cpp:21:1: error: stray '\302' in program
maxandap.cpp:21:1: error: stray '\240' in program
maxandap.cpp:21:1: error: stray '\302' in program
maxandap.cpp:21:1: error: stray '\240' in program
maxandap.cpp:21:1: error: stray '\302' in program
maxandap.cpp:21:1: error: stray '\240' in program
maxandap.cpp:21:1: error: stray '\302' in program
maxandap.cpp:21:1: error: stray '\240' in program
maxandap.cpp:21:1: error: stray '\302' in program
maxandap.cpp:21:1: error: stray '\240' in program
maxandap.cpp:21:1: error: stray '\302' in program
maxandap.cpp:21:1: error: stray '\240' in program
maxandap.cpp:21:1: error: stray '\302' in program
maxandap.cpp:21:1: error: stray '\240' in program
maxandap.cpp:21:1: error: stray '\302' in program
maxandap.cpp:21:1: error: stray '\240' in program
maxandap.cpp:21:1: error: stray '\302' in program
maxandap.cpp:21:1: error: stray '\240' in program
maxandap.cpp:21:1: error: stray '\302' in program
maxandap.cpp:21:1: error: stray '\240' in program
maxandap.cpp:21:1: error: stray '\302' in program
maxandap.cpp:21:1: error: stray '\240' in program
maxandap.cpp:21:1: error: stray '\302' in program
maxandap.cpp:21:1: error: stray '\240' in program
maxandap.cpp:21:1: error: stray '\302' in program
maxandap.cpp:21:1: error: stray '\240' in program
maxandap.cpp:21:1: error: stray '\302' in program
maxandap.cpp:21:1: error: stray '\240' in program
maxandap.cpp:21:1: error: stray '\302' in program
maxandap.cpp:21:1: error: stray '\240' in program
maxandap.cpp:22:1: error: stray '\302' in program
            cout << max << " " << ap;

 ^
maxandap.cpp:22:1: error: stray '\240' in program
maxandap.cpp:22:1: error: stray '\302' in program
maxandap.cpp:22:1: error: stray '\240' in program
maxandap.cpp:22:1: error: stray '\302' in program
maxandap.cpp:22:1: error: stray '\240' in program
maxandap.cpp:22:1: error: stray '\302' in program
maxandap.cpp:22:1: error: stray '\240' in program
maxandap.cpp:22:1: error: stray '\302' in program
maxandap.cpp:22:1: error: stray '\240' in program
maxandap.cpp:22:1: error: stray '\302' in program
maxandap.cpp:22:1: error: stray '\240' in program
maxandap.cpp:22:1: error: stray '\302' in program
maxandap.cpp:22:1: error: stray '\240' in program
maxandap.cpp:22:1: error: stray '\302' in program
maxandap.cpp:22:1: error: stray '\240' in program
maxandap.cpp:22:1: error: stray '\302' in program
maxandap.cpp:22:1: error: stray '\240' in program
maxandap.cpp:22:1: error: stray '\302' in program
maxandap.cpp:22:1: error: stray '\240' in program
maxandap.cpp:22:1: error: stray '\302' in program
maxandap.cpp:22:1: error: stray '\240' in program
maxandap.cpp:22:1: error: stray '\302' in program
maxandap.cpp:22:1: error: stray '\240' in program
maxandap.cpp:23:1: error: stray '\302' in program
         return 0;

 ^
maxandap.cpp:23:1: error: stray '\240' in program
maxandap.cpp:23:1: error: stray '\302' in program
maxandap.cpp:23:1: error: stray '\240' in program
maxandap.cpp:23:1: error: stray '\302' in program
maxandap.cpp:23:1: error: stray '\240' in program
maxandap.cpp:23:1: error: stray '\302' in program
maxandap.cpp:23:1: error: stray '\240' in program
maxandap.cpp:23:1: error: stray '\302' in program
maxandap.cpp:23:1: error: stray '\240' in program
maxandap.cpp: In function 'int main()':
maxandap.cpp:9:18: error: 'cin' was not declared in this scope
            cin >> n;

                  ^
maxandap.cpp:20:10: error: 'app' was not declared in this scope
          app++;}

          ^
maxandap.cpp:22:18: error: 'cout' was not declared in this scope
            cout << max << " " << ap;

                  ^

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