Detalii evaluare #14562221

Rezumat problemă

Să se scrie un program care citește mai multe propoziții și determină propoziția de lungime maximă.

Detalii

Problema LungimeMaxima Operații I/O lgmax.in/lgmax.out
Limita timp 0.1 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #14562221 Utilizator Danila Cosmin (danilacosmin516)
Fișier lungimemaxima.cpp Dimensiune 457 B
Data încărcării 07 Martie 2019, 21:41 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

lungimemaxima.cpp:1:9: error: #include expects "FILENAME" or <FILENAME>
 #include <fstream>

         ^
lungimemaxima.cpp:2:9: error: #include expects "FILENAME" or <FILENAME>
 #include <cstring>

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

 ^
lungimemaxima.cpp:3:1: error: stray '\240' in program
lungimemaxima.cpp:3:1: error: stray '\302' in program
lungimemaxima.cpp:3:1: error: stray '\240' in program
lungimemaxima.cpp:4:1: error: stray '\302' in program
 int n,i,j,l,nr,maxx;

 ^
lungimemaxima.cpp:4:1: error: stray '\240' in program
lungimemaxima.cpp:5:1: error: stray '\302' in program
 char s[255],t[255];

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

 ^
lungimemaxima.cpp:6:1: error: stray '\240' in program
lungimemaxima.cpp:8:1: error: stray '\302' in program
 ifstream f("vocmax.in");

 ^
lungimemaxima.cpp:8:1: error: stray '\240' in program
lungimemaxima.cpp:9:1: error: stray '\302' in program
 ofstream g("vocmax.out");

 ^
lungimemaxima.cpp:9:1: error: stray '\240' in program
lungimemaxima.cpp:14:1: error: stray '\302' in program
     f.getline(s,255);

 ^
lungimemaxima.cpp:14:1: error: stray '\240' in program
lungimemaxima.cpp:14:1: error: stray '\302' in program
lungimemaxima.cpp:14:1: error: stray '\240' in program
lungimemaxima.cpp:14:1: error: stray '\302' in program
lungimemaxima.cpp:14:1: error: stray '\240' in program
lungimemaxima.cpp:14:1: error: stray '\302' in program
lungimemaxima.cpp:14:1: error: stray '\240' in program
lungimemaxima.cpp:15:1: error: stray '\302' in program
     nr=0;

 ^
lungimemaxima.cpp:15:1: error: stray '\240' in program
lungimemaxima.cpp:15:1: error: stray '\302' in program
lungimemaxima.cpp:15:1: error: stray '\240' in program
lungimemaxima.cpp:15:1: error: stray '\302' in program
lungimemaxima.cpp:15:1: error: stray '\240' in program
lungimemaxima.cpp:15:1: error: stray '\302' in program
lungimemaxima.cpp:15:1: error: stray '\240' in program
lungimemaxima.cpp:16:1: error: stray '\302' in program
     l=strlen(s);

 ^
lungimemaxima.cpp:16:1: error: stray '\240' in program
lungimemaxima.cpp:16:1: error: stray '\302' in program
lungimemaxima.cpp:16:1: error: stray '\240' in program
lungimemaxima.cpp:16:1: error: stray '\302' in program
lungimemaxima.cpp:16:1: error: stray '\240' in program
lungimemaxima.cpp:16:1: error: stray '\302' in program
lungimemaxima.cpp:16:1: error: stray '\240' in program
lungimemaxima.cpp:17:1: error: stray '\302' in program
     for(i=0; i<l; ++i)

 ^
lungimemaxima.cpp:17:1: error: stray '\240' in program
lungimemaxima.cpp:17:1: error: stray '\302' in program
lungimemaxima.cpp:17:1: error: stray '\240' in program
lungimemaxima.cpp:17:1: error: stray '\302' in program
lungimemaxima.cpp:17:1: error: stray '\240' in program
lungimemaxima.cpp:17:1: error: stray '\302' in program
lungimemaxima.cpp:17:1: error: stray '\240' in program
lungimemaxima.cpp:17:1: error: stray '\302' in program
lungimemaxima.cpp:17:1: error: stray '\240' in program
lungimemaxima.cpp:17:1: error: stray '\302' in program
lungimemaxima.cpp:17:1: error: stray '\240' in program
lungimemaxima.cpp:18:1: error: stray '\302' in program
  if(strchr("aeiou",s[i])) nr++;

 ^
lungimemaxima.cpp:18:1: error: stray '\240' in program
lungimemaxima.cpp:18:1: error: stray '\302' in program
lungimemaxima.cpp:18:1: error: stray '\240' in program
lungimemaxima.cpp:19:1: error: stray '\302' in program
         if(nr>maxx) maxx=nr,strcpy(t,s);

 ^
lungimemaxima.cpp:19:1: error: stray '\240' in program
lungimemaxima.cpp:19:1: error: stray '\302' in program
lungimemaxima.cpp:19:1: error: stray '\240' in program
lungimemaxima.cpp:19:1: error: stray '\302' in program
lungimemaxima.cpp:19:1: error: stray '\240' in program
lungimemaxima.cpp:19:1: error: stray '\302' in program
lungimemaxima.cpp:19:1: error: stray '\240' in program
lungimemaxima.cpp:19:1: error: stray '\302' in program
lungimemaxima.cpp:19:1: error: stray '\240' in program
lungimemaxima.cpp:19:1: error: stray '\302' in program
lungimemaxima.cpp:19:1: error: stray '\240' in program
lungimemaxima.cpp:19:1: error: stray '\302' in program
lungimemaxima.cpp:19:1: error: stray '\240' in program
lungimemaxima.cpp:19:1: error: stray '\302' in program
lungimemaxima.cpp:19:1: error: stray '\240' in program
lungimemaxima.cpp:19:1: error: stray '\302' in program
lungimemaxima.cpp:19:1: error: stray '\240' in program
lungimemaxima.cpp:24:1: error: stray '\302' in program
 return 0;

 ^
lungimemaxima.cpp:24:1: error: stray '\240' in program
lungimemaxima.cpp: In function 'int main()':
lungimemaxima.cpp:8:1: error: 'ifstream' was not declared in this scope
 ifstream f("vocmax.in");

 ^
lungimemaxima.cpp:8:11: error: expected ';' before 'f'
 ifstream f("vocmax.in");

           ^
lungimemaxima.cpp:9:1: error: 'ofstream' was not declared in this scope
 ofstream g("vocmax.out");

 ^
lungimemaxima.cpp:9:11: error: expected ';' before 'g'
 ofstream g("vocmax.out");

           ^
lungimemaxima.cpp:10:1: error: 'f' was not declared in this scope
 f>>n;

 ^
lungimemaxima.cpp:16:19: error: 'strlen' was not declared in this scope
     l=strlen(s);

                   ^
lungimemaxima.cpp:18:25: error: 'strchr' was not declared in this scope
  if(strchr("aeiou",s[i])) nr++;

                         ^
lungimemaxima.cpp:19:48: error: 'strcpy' was not declared in this scope
         if(nr>maxx) maxx=nr,strcpy(t,s);

                                                ^
lungimemaxima.cpp:21:1: error: 'g' was not declared in this scope
 g<<t;

 ^

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