Detalii evaluare #23060048

Rezumat problemă

Se dau n numere naturale. Considerăm poziţiile lor numerotate de la 1 la n.
Să se determine cea mai mare valoare memorată pe o poziţie pară şi cea mai mică valoare de două cifre aflată pe o poziţie impară.

Concurs de pregatire CNFB clasa a V-a

Detalii

Problema calcParImpar Operații I/O tastatură/ecran
Limita timp 0.1 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #23060048 Utilizator diana miahela (diana_mihaela_8)
Fișier calcparimpar.cpp Dimensiune 650 B
Data încărcării 20 Mai 2020, 19:22 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

calcparimpar.cpp:9:1: error: stray '\302' in program
    int n,v[20],k=0,x=0,y=99;

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

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

 ^
calcparimpar.cpp:13:1: error: stray '\240' in program
calcparimpar.cpp:13:1: error: stray '\302' in program
calcparimpar.cpp:13:1: error: stray '\240' in program
calcparimpar.cpp:15:1: error: stray '\302' in program
        cin>>V[i];

 ^
calcparimpar.cpp:15:1: error: stray '\240' in program
calcparimpar.cpp:15:1: error: stray '\302' in program
calcparimpar.cpp:15:1: error: stray '\240' in program
calcparimpar.cpp:15:1: error: stray '\302' in program
calcparimpar.cpp:15:1: error: stray '\240' in program
calcparimpar.cpp:15:1: error: stray '\302' in program
calcparimpar.cpp:15:1: error: stray '\240' in program
calcparimpar.cpp:17:1: error: stray '\302' in program
    for(int i=1;i<=n;i++)

 ^
calcparimpar.cpp:17:1: error: stray '\240' in program
calcparimpar.cpp:17:1: error: stray '\302' in program
calcparimpar.cpp:17:1: error: stray '\240' in program
calcparimpar.cpp:19:1: error: stray '\302' in program
    {

 ^
calcparimpar.cpp:19:1: error: stray '\240' in program
calcparimpar.cpp:19:1: error: stray '\302' in program
calcparimpar.cpp:19:1: error: stray '\240' in program
calcparimpar.cpp:21:1: error: stray '\302' in program
        k++;

 ^
calcparimpar.cpp:21:1: error: stray '\240' in program
calcparimpar.cpp:21:1: error: stray '\302' in program
calcparimpar.cpp:21:1: error: stray '\240' in program
calcparimpar.cpp:21:1: error: stray '\302' in program
calcparimpar.cpp:21:1: error: stray '\240' in program
calcparimpar.cpp:21:1: error: stray '\302' in program
calcparimpar.cpp:21:1: error: stray '\240' in program
calcparimpar.cpp:23:1: error: stray '\302' in program
        if(k%2==0){

 ^
calcparimpar.cpp:23:1: error: stray '\240' in program
calcparimpar.cpp:23:1: error: stray '\302' in program
calcparimpar.cpp:23:1: error: stray '\240' in program
calcparimpar.cpp:23:1: error: stray '\302' in program
calcparimpar.cpp:23:1: error: stray '\240' in program
calcparimpar.cpp:23:1: error: stray '\302' in program
calcparimpar.cpp:23:1: error: stray '\240' in program
calcparimpar.cpp:25:1: error: stray '\302' in program
            if(v[k]>x)

 ^
calcparimpar.cpp:25:1: error: stray '\240' in program
calcparimpar.cpp:25:1: error: stray '\302' in program
calcparimpar.cpp:25:1: error: stray '\240' in program
calcparimpar.cpp:25:1: error: stray '\302' in program
calcparimpar.cpp:25:1: error: stray '\240' in program
calcparimpar.cpp:25:1: error: stray '\302' in program
calcparimpar.cpp:25:1: error: stray '\240' in program
calcparimpar.cpp:25:1: error: stray '\302' in program
calcparimpar.cpp:25:1: error: stray '\240' in program
calcparimpar.cpp:25:1: error: stray '\302' in program
calcparimpar.cpp:25:1: error: stray '\240' in program
calcparimpar.cpp:27:1: error: stray '\302' in program
              x=v[k];}

 ^
calcparimpar.cpp:27:1: error: stray '\240' in program
calcparimpar.cpp:27:1: error: stray '\302' in program
calcparimpar.cpp:27:1: error: stray '\240' in program
calcparimpar.cpp:27:1: error: stray '\302' in program
calcparimpar.cpp:27:1: error: stray '\240' in program
calcparimpar.cpp:27:1: error: stray '\302' in program
calcparimpar.cpp:27:1: error: stray '\240' in program
calcparimpar.cpp:27:1: error: stray '\302' in program
calcparimpar.cpp:27:1: error: stray '\240' in program
calcparimpar.cpp:27:1: error: stray '\302' in program
calcparimpar.cpp:27:1: error: stray '\240' in program
calcparimpar.cpp:27:1: error: stray '\302' in program
calcparimpar.cpp:27:1: error: stray '\240' in program
calcparimpar.cpp:29:1: error: stray '\302' in program
        else

 ^
calcparimpar.cpp:29:1: error: stray '\240' in program
calcparimpar.cpp:29:1: error: stray '\302' in program
calcparimpar.cpp:29:1: error: stray '\240' in program
calcparimpar.cpp:29:1: error: stray '\302' in program
calcparimpar.cpp:29:1: error: stray '\240' in program
calcparimpar.cpp:29:1: error: stray '\302' in program
calcparimpar.cpp:29:1: error: stray '\240' in program
calcparimpar.cpp:31:1: error: stray '\302' in program
            {if(v[k]>=10 and v[k]<=99)

 ^
calcparimpar.cpp:31:1: error: stray '\240' in program
calcparimpar.cpp:31:1: error: stray '\302' in program
calcparimpar.cpp:31:1: error: stray '\240' in program
calcparimpar.cpp:31:1: error: stray '\302' in program
calcparimpar.cpp:31:1: error: stray '\240' in program
calcparimpar.cpp:31:1: error: stray '\302' in program
calcparimpar.cpp:31:1: error: stray '\240' in program
calcparimpar.cpp:31:1: error: stray '\302' in program
calcparimpar.cpp:31:1: error: stray '\240' in program
calcparimpar.cpp:31:1: error: stray '\302' in program
calcparimpar.cpp:31:1: error: stray '\240' in program
calcparimpar.cpp:33:1: error: stray '\302' in program
              if(y>v[k])

 ^
calcparimpar.cpp:33:1: error: stray '\240' in program
calcparimpar.cpp:33:1: error: stray '\302' in program
calcparimpar.cpp:33:1: error: stray '\240' in program
calcparimpar.cpp:33:1: error: stray '\302' in program
calcparimpar.cpp:33:1: error: stray '\240' in program
calcparimpar.cpp:33:1: error: stray '\302' in program
calcparimpar.cpp:33:1: error: stray '\240' in program
calcparimpar.cpp:33:1: error: stray '\302' in program
calcparimpar.cpp:33:1: error: stray '\240' in program
calcparimpar.cpp:33:1: error: stray '\302' in program
calcparimpar.cpp:33:1: error: stray '\240' in program
calcparimpar.cpp:33:1: error: stray '\302' in program
calcparimpar.cpp:33:1: error: stray '\240' in program
calcparimpar.cpp:35:1: error: stray '\302' in program
              y=v[k];}

 ^
calcparimpar.cpp:35:1: error: stray '\240' in program
calcparimpar.cpp:35:1: error: stray '\302' in program
calcparimpar.cpp:35:1: error: stray '\240' in program
calcparimpar.cpp:35:1: error: stray '\302' in program
calcparimpar.cpp:35:1: error: stray '\240' in program
calcparimpar.cpp:35:1: error: stray '\302' in program
calcparimpar.cpp:35:1: error: stray '\240' in program
calcparimpar.cpp:35:1: error: stray '\302' in program
calcparimpar.cpp:35:1: error: stray '\240' in program
calcparimpar.cpp:35:1: error: stray '\302' in program
calcparimpar.cpp:35:1: error: stray '\240' in program
calcparimpar.cpp:35:1: error: stray '\302' in program
calcparimpar.cpp:35:1: error: stray '\240' in program
calcparimpar.cpp:37:1: error: stray '\302' in program
    }

 ^
calcparimpar.cpp:37:1: error: stray '\240' in program
calcparimpar.cpp:37:1: error: stray '\302' in program
calcparimpar.cpp:37:1: error: stray '\240' in program
calcparimpar.cpp:39:1: error: stray '\302' in program
    if(x==0 && y!=99)

 ^
calcparimpar.cpp:39:1: error: stray '\240' in program
calcparimpar.cpp:39:1: error: stray '\302' in program
calcparimpar.cpp:39:1: error: stray '\240' in program
calcparimpar.cpp:41:1: error: stray '\302' in program
        cout<<-1<<" "<<y;;

 ^
calcparimpar.cpp:41:1: error: stray '\240' in program
calcparimpar.cpp:41:1: error: stray '\302' in program
calcparimpar.cpp:41:1: error: stray '\240' in program
calcparimpar.cpp:41:1: error: stray '\302' in program
calcparimpar.cpp:41:1: error: stray '\240' in program
calcparimpar.cpp:41:1: error: stray '\302' in program
calcparimpar.cpp:41:1: error: stray '\240' in program
calcparimpar.cpp:43:1: error: stray '\302' in program
    if(y==99 && x!=0)

 ^
calcparimpar.cpp:43:1: error: stray '\240' in program
calcparimpar.cpp:43:1: error: stray '\302' in program
calcparimpar.cpp:43:1: error: stray '\240' in program
calcparimpar.cpp:45:1: error: stray '\302' in program
        cout<<x<<" "<<-1;

 ^
calcparimpar.cpp:45:1: error: stray '\240' in program
calcparimpar.cpp:45:1: error: stray '\302' in program
calcparimpar.cpp:45:1: error: stray '\240' in program
calcparimpar.cpp:45:1: error: stray '\302' in program
calcparimpar.cpp:45:1: error: stray '\240' in program
calcparimpar.cpp:45:1: error: stray '\302' in program
calcparimpar.cpp:45:1: error: stray '\240' in program
calcparimpar.cpp:47:1: error: stray '\302' in program
    if(y!=99 && x!=0)

 ^
calcparimpar.cpp:47:1: error: stray '\240' in program
calcparimpar.cpp:47:1: error: stray '\302' in program
calcparimpar.cpp:47:1: error: stray '\240' in program
calcparimpar.cpp:49:1: error: stray '\302' in program
    cout<<x<<" "<<y;

 ^
calcparimpar.cpp:49:1: error: stray '\240' in program
calcparimpar.cpp:49:1: error: stray '\302' in program
calcparimpar.cpp:49:1: error: stray '\240' in program
calcparimpar.cpp:51:1: error: stray '\302' in program
    return 0;

 ^
calcparimpar.cpp:51:1: error: stray '\240' in program
calcparimpar.cpp:51:1: error: stray '\302' in program
calcparimpar.cpp:51:1: error: stray '\240' in program
calcparimpar.cpp: In function 'int main()':
calcparimpar.cpp:15:17: error: 'V' was not declared in this scope
        cin>>V[i];

                 ^

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