Detalii evaluare #52395097

Rezumat problemă

#2544 materom

Scrieţi un program care să determine în conformitate cu decizia directorului, diferenţa în modul dintre suma punctajelor de la limba română ale elevilor din echipa LNA şi suma punctajelor la matematică ale elevilor din echipă, precum şi suma tuturor punctajelor elevilor din echipa LNA.

Detalii

Problema materom Operații I/O materom.in/materom.out
Limita timp 0.1 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #52395097 Utilizator best in buzau (BestInBuzau)
Fișier materom.cpp Dimensiune 1.90 KB
Data încărcării 28 Septembrie 2024, 22:43 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

materom.cpp:5:19: error: too many decimal points in number
 var mat,rom:array[0..nmax] of integer;
                   ^
materom.cpp:6:15: error: too many decimal points in number
     l,s:array[0..grup,0..2*nota*grup+1] of integer;
               ^
materom.cpp:6:23: error: too many decimal points in number
     l,s:array[0..grup,0..2*nota*grup+1] of integer;
                       ^
materom.cpp:12:11: warning: character constant too long for its type [enabled by default]
  assign(f,'materom.in');reset(f);
           ^
materom.cpp:72:10: warning: character constant too long for its type [enabled by default]
 assign(f,'materom.out');rewrite(f);
          ^
materom.cpp:1:1: error: 'program' does not name a type
 program cna;
 ^
materom.cpp:2:7: error: 'nmax' does not name a type
 const nmax=200;
       ^
materom.cpp:3:7: error: 'nota' does not name a type
       nota=21;
       ^
materom.cpp:4:7: error: 'grup' does not name a type
       grup=19;
       ^
materom.cpp:5:1: error: 'var' does not name a type
 var mat,rom:array[0..nmax] of integer;
 ^
materom.cpp:6:5: error: 'l' does not name a type
     l,s:array[0..grup,0..2*nota*grup+1] of integer;
     ^
materom.cpp:7:8: error: found ':' in nested-name-specifier, expected '::'
     sol:set of byte;{solutia}
        ^
materom.cpp:7:5: error: 'sol' does not name a type
     sol:set of byte;{solutia}
     ^
materom.cpp:7:21: error: expected unqualified-id before '{' token
     sol:set of byte;{solutia}
                     ^
materom.cpp:8:2: error: 'n' does not name a type
  n,m,suma,diferenta,sm,sr:integer;
  ^
materom.cpp:9:1: error: 'procedure' does not name a type
 procedure citire;
 ^
materom.cpp:10:1: error: 'var' does not name a type
 var f:text;i:byte;
 ^
materom.cpp:10:13: error: found ':' in nested-name-specifier, expected '::'
 var f:text;i:byte;
             ^
materom.cpp:10:12: error: 'i' does not name a type
 var f:text;i:byte;
            ^
materom.cpp:11:1: error: 'begin' does not name a type
 begin
 ^
materom.cpp:12:30: error: expected constructor, destructor, or type conversion before '(' token
  assign(f,'materom.in');reset(f);
                              ^
materom.cpp:13:8: error: expected constructor, destructor, or type conversion before '(' token
  readln(f,n,m);
        ^
materom.cpp:14:2: error: expected unqualified-id before 'for'
  for i:=0 to n-1 do readln(f,mat[i],rom[i]);
  ^
materom.cpp:15:7: error: expected constructor, destructor, or type conversion before '(' token
  close(f);
       ^
materom.cpp:16:1: error: 'end' does not name a type
 end;
 ^
materom.cpp:17:1: error: 'procedure' does not name a type
 procedure rezolva;
 ^
materom.cpp:18:1: error: 'var' does not name a type
 var i,j,k,p,p2,v:integer;
 ^
materom.cpp:19:1: error: 'begin' does not name a type
 begin
 ^
materom.cpp:22:1: error: 's' does not name a type
 s:=l;{rez. pt. un elev}
 ^
materom.cpp:22:6: error: expected unqualified-id before '{' token
 s:=l;{rez. pt. un elev}
      ^
materom.cpp:23:1: error: expected unqualified-id before 'for'
 for i:=0 to n-1 do
 ^
materom.cpp:27:5: error: 's' does not name a type
     s[0,m*nota+mat[i]-rom[i]]:=mat[i]+rom[i];
     ^
materom.cpp:28:4: error: 'end' does not name a type
    end;
    ^
materom.cpp:29:1: error: expected unqualified-id before '{' token
 {restul}
 ^
materom.cpp:30:1: error: expected unqualified-id before 'for'
 for j:=0 to m-2 do
 ^
materom.cpp:36:14: error: 'p' does not name a type
        p2:=k;p:=j;{cautam daca l-am mai folosit}
              ^
materom.cpp:36:19: error: expected unqualified-id before '{' token
        p2:=k;p:=j;{cautam daca l-am mai folosit}
                   ^
materom.cpp:37:8: error: expected unqualified-id before 'while'
        while (p>=0)and(l[p,p2]<>i)do
        ^
materom.cpp:40:10: error: 'p' does not name a type
          p:=p-1;
          ^
materom.cpp:41:9: error: 'end' does not name a type
         end;
         ^
materom.cpp:42:8: error: expected unqualified-id before '{' token
        {daca nu il folosim}
        ^
materom.cpp:43:8: error: expected unqualified-id before 'if'
        if p<0 then
        ^
materom.cpp:46:11: error: 's' does not name a type
           s[j+1,k+mat[i]-rom[i]]:=s[j,k]+mat[i]+rom[i];
           ^
materom.cpp:47:9: error: 'end' does not name a type
         end;
         ^
materom.cpp:48:7: error: 'end' does not name a type
       end;
       ^
materom.cpp:49:5: error: expected unqualified-id before '{' token
     {determinare diferenta minima}
     ^
materom.cpp:50:5: error: 'v' does not name a type
     v:=nota*m+1;
     ^
materom.cpp:51:5: error: expected unqualified-id before 'for'
     for i:=0 to nota*m do
     ^
materom.cpp:56:8: error: expected unqualified-id before 'break'
        break;
        ^
materom.cpp:57:7: error: 'end' does not name a type
       end;
       ^
materom.cpp:58:6: error: expected unqualified-id before '{' token
      {det solutie}
      ^
materom.cpp:59:6: error: 'sol' does not name a type
      sol:=[];sm:=0;sr:=0;
      ^
materom.cpp:59:14: error: 'sm' does not name a type
      sol:=[];sm:=0;sr:=0;
              ^
materom.cpp:59:20: error: 'sr' does not name a type
      sol:=[];sm:=0;sr:=0;
                    ^
materom.cpp:60:6: error: expected unqualified-id before 'for'
      for j:=m-1 downto 0 do
      ^
materom.cpp:63:8: error: 'sm' does not name a type
        sm:=sm+mat[l[j,v]];
        ^
materom.cpp:64:8: error: 'sr' does not name a type
        sr:=sr+rom[l[j,v]];
        ^
materom.cpp:65:8: error: 'v' does not name a type
        v:=v-(mat[l[j,v]]-rom[l[j,v]]);
        ^
materom.cpp:67:7: error: 'end' does not name a type
       end;
       ^
materom.cpp:68:1: error: 'end' does not name a type
 end;
 ^
materom.cpp:69:1: error: 'procedure' does not name a type
 procedure scrie;
 ^
materom.cpp:70:1: error: 'var' does not name a type
 var i:byte;f:text;
 ^
materom.cpp:70:13: error: found ':' in nested-name-specifier, expected '::'
 var i:byte;f:text;
             ^
materom.cpp:70:12: error: 'f' does not name a type
 var i:byte;f:text;
            ^
materom.cpp:71:1: error: 'begin' does not name a type
 begin
 ^
materom.cpp:72:32: error: expected constructor, destructor, or type conversion before '(' token
 assign(f,'materom.out');rewrite(f);
                                ^
materom.cpp:73:1: error: expected unqualified-id before '{' token
 {calculeaza diferenta}
 ^
materom.cpp:75:1: error: expected unqualified-id before '{' token
 {calculeaza suma}
 ^
materom.cpp:76:1: error: 'suma' does not name a type
 suma:=sr+sm;
 ^
materom.cpp:77:1: error: 'diferenta' does not name a type
 diferenta:=abs(sr-sm);
 ^
materom.cpp:78:8: error: expected constructor, destructor, or type conversion before '(' token
 writeln(f, diferenta);
        ^
materom.cpp:79:8: error: expected constructor, destructor, or type conversion before '(' token
 writeln(f, suma);
        ^
materom.cpp:80:6: error: expected constructor, destructor, or type conversion before '(' token
 close(f);
      ^
materom.cpp:81:1: error: 'end' does not name a type
 end;
 ^
materom.cpp:83:1: error: 'BEGIN' does not name a type
 BEGIN
 ^
materom.cpp:85:1: error: 'rezolva' does not name a type
 rezolva;
 ^
materom.cpp:86:1: error: 'scrie' does not name a type
 scrie;
 ^
materom.cpp:87:1: error: 'END' does not name a type
 END.
 ^

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