Detalii evaluare #9982698

Rezumat problemă

#1468 relativ

Fiind dat un şir de numere naturale, să se câte numere sunt mai mari sau egale cu numerele situate înaintea lor în şir, precum şi suma maximă a unei secvenţe dintre două asemenea numere consecutive din şir.

Detalii

Problema relativ Operații I/O relativ.in/relativ.out
Limita timp 0.3 secunde Limita memorie Total: 0.1 MB / Stivă 0 MB
Id soluție #9982698 Utilizator Escariu Vladut Gabriel (VladutGabrielEscariu)
Fișier relativ.c Dimensiune 664 B
Data încărcării 06 Iulie 2018, 14:59 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

relativ.c:1:9: error: #include expects "FILENAME" or <FILENAME>
 #include <bits/stdc++.h>

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

 ^
relativ.c:3:1: error: stray '\240' in program
relativ.c:3:1: error: unknown type name 'using'
relativ.c:3:1: error: stray '\302' in program
relativ.c:3:1: error: stray '\240' in program
relativ.c:3:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
 using namespace std;

                   ^
relativ.c:5:1: error: stray '\302' in program
 ifstream fin("relativ.in");

 ^
relativ.c:5:1: error: stray '\240' in program
relativ.c:5:1: error: unknown type name 'ifstream'
relativ.c:5:15: error: expected declaration specifiers or '...' before string constant
 ifstream fin("relativ.in");

               ^
relativ.c:6:1: error: stray '\302' in program
 ofstream fout("relativ.out");

 ^
relativ.c:6:1: error: stray '\240' in program
relativ.c:6:1: error: unknown type name 'ofstream'
relativ.c:6:16: error: expected declaration specifiers or '...' before string constant
 ofstream fout("relativ.out");

                ^
relativ.c:8:1: error: stray '\302' in program
 long long int n,x;

 ^
relativ.c:8:1: error: stray '\240' in program
relativ.c:8:1: error: stray '\302' in program
relativ.c:8:1: error: stray '\240' in program
relativ.c:8:1: error: stray '\302' in program
relativ.c:8:1: error: stray '\240' in program
relativ.c:9:1: error: stray '\302' in program
 long long int k=1,z,s,summax;

 ^
relativ.c:9:1: error: stray '\240' in program
relativ.c:9:1: error: stray '\302' in program
relativ.c:9:1: error: stray '\240' in program
relativ.c:9:1: error: stray '\302' in program
relativ.c:9:1: error: stray '\240' in program
relativ.c:11:1: error: stray '\302' in program
 int main()

 ^
relativ.c:11:1: error: stray '\240' in program
relativ.c: In function 'main':
relativ.c:14:1: error: stray '\302' in program
     fin >> n;

 ^
relativ.c:14:1: error: stray '\240' in program
relativ.c:14:1: error: stray '\302' in program
relativ.c:14:1: error: stray '\240' in program
relativ.c:14:1: error: stray '\302' in program
relativ.c:14:1: error: stray '\240' in program
relativ.c:14:1: error: stray '\302' in program
relativ.c:14:1: error: stray '\240' in program
relativ.c:14:1: error: stray '\302' in program
relativ.c:14:1: error: stray '\240' in program
relativ.c:14:9: error: 'fin' undeclared (first use in this function)
     fin >> n;

         ^
relativ.c:14:9: note: each undeclared identifier is reported only once for each function it appears in
relativ.c:14:1: error: stray '\302' in program
     fin >> n;

 ^
relativ.c:14:1: error: stray '\240' in program
relativ.c:15:1: error: stray '\302' in program
     fin >> x;

 ^
relativ.c:15:1: error: stray '\240' in program
relativ.c:15:1: error: stray '\302' in program
relativ.c:15:1: error: stray '\240' in program
relativ.c:15:1: error: stray '\302' in program
relativ.c:15:1: error: stray '\240' in program
relativ.c:15:1: error: stray '\302' in program
relativ.c:15:1: error: stray '\240' in program
relativ.c:15:1: error: stray '\302' in program
relativ.c:15:1: error: stray '\240' in program
relativ.c:15:1: error: stray '\302' in program
relativ.c:15:1: error: stray '\240' in program
relativ.c:17:1: error: stray '\302' in program
     s=summax=z=x;

 ^
relativ.c:17:1: error: stray '\240' in program
relativ.c:17:1: error: stray '\302' in program
relativ.c:17:1: error: stray '\240' in program
relativ.c:17:1: error: stray '\302' in program
relativ.c:17:1: error: stray '\240' in program
relativ.c:17:1: error: stray '\302' in program
relativ.c:17:1: error: stray '\240' in program
relativ.c:19:1: error: stray '\302' in program
     for(long long int i=1;i<n;i++)

 ^
relativ.c:19:1: error: stray '\240' in program
relativ.c:19:1: error: stray '\302' in program
relativ.c:19:1: error: stray '\240' in program
relativ.c:19:1: error: stray '\302' in program
relativ.c:19:1: error: stray '\240' in program
relativ.c:19:1: error: stray '\302' in program
relativ.c:19:1: error: stray '\240' in program
relativ.c:19:1: error: stray '\302' in program
relativ.c:19:1: error: stray '\240' in program
relativ.c:19:1: error: stray '\302' in program
relativ.c:19:1: error: stray '\240' in program
relativ.c:19:1: error: stray '\302' in program
relativ.c:19:1: error: stray '\240' in program
relativ.c:19:9: error: 'for' loop initial declarations are only allowed in C99 mode
     for(long long int i=1;i<n;i++)

         ^
relativ.c:19:9: note: use option -std=c99 or -std=gnu99 to compile your code
relativ.c:20:1: error: stray '\302' in program
     {

 ^
relativ.c:20:1: error: stray '\240' in program
relativ.c:20:1: error: stray '\302' in program
relativ.c:20:1: error: stray '\240' in program
relativ.c:20:1: error: stray '\302' in program
relativ.c:20:1: error: stray '\240' in program
relativ.c:20:1: error: stray '\302' in program
relativ.c:20:1: error: stray '\240' in program
relativ.c:21:1: error: stray '\302' in program
         fin >> x;

 ^
relativ.c:21:1: error: stray '\240' in program
relativ.c:21:1: error: stray '\302' in program
relativ.c:21:1: error: stray '\240' in program
relativ.c:21:1: error: stray '\302' in program
relativ.c:21:1: error: stray '\240' in program
relativ.c:21:1: error: stray '\302' in program
relativ.c:21:1: error: stray '\240' in program
relativ.c:21:1: error: stray '\302' in program
relativ.c:21:1: error: stray '\240' in program
relativ.c:21:1: error: stray '\302' in program
relativ.c:21:1: error: stray '\240' in program
relativ.c:21:1: error: stray '\302' in program
relativ.c:21:1: error: stray '\240' in program
relativ.c:21:1: error: stray '\302' in program
relativ.c:21:1: error: stray '\240' in program
relativ.c:21:1: error: stray '\302' in program
relativ.c:21:1: error: stray '\240' in program
relativ.c:21:1: error: stray '\302' in program
relativ.c:21:1: error: stray '\240' in program
relativ.c:22:1: error: stray '\302' in program
         s+=x;

 ^
relativ.c:22:1: error: stray '\240' in program
relativ.c:22:1: error: stray '\302' in program
relativ.c:22:1: error: stray '\240' in program
relativ.c:22:1: error: stray '\302' in program
relativ.c:22:1: error: stray '\240' in program
relativ.c:22:1: error: stray '\302' in program
relativ.c:22:1: error: stray '\240' in program
relativ.c:22:1: error: stray '\302' in program
relativ.c:22:1: error: stray '\240' in program
relativ.c:22:1: error: stray '\302' in program
relativ.c:22:1: error: stray '\240' in program
relativ.c:22:1: error: stray '\302' in program
relativ.c:22:1: error: stray '\240' in program
relativ.c:22:1: error: stray '\302' in program
relativ.c:22:1: error: stray '\240' in program
relativ.c:23:1: error: stray '\302' in program
         if(x<=z)

 ^
relativ.c:23:1: error: stray '\240' in program
relativ.c:23:1: error: stray '\302' in program
relativ.c:23:1: error: stray '\240' in program
relativ.c:23:1: error: stray '\302' in program
relativ.c:23:1: error: stray '\240' in program
relativ.c:23:1: error: stray '\302' in program
relativ.c:23:1: error: stray '\240' in program
relativ.c:23:1: error: stray '\302' in program
relativ.c:23:1: error: stray '\240' in program
relativ.c:23:1: error: stray '\302' in program
relativ.c:23:1: error: stray '\240' in program
relativ.c:23:1: error: stray '\302' in program
relativ.c:23:1: error: stray '\240' in program
relativ.c:23:1: error: stray '\302' in program
relativ.c:23:1: error: stray '\240' in program
relativ.c:24:1: error: stray '\302' in program
         {

 ^
relativ.c:24:1: error: stray '\240' in program
relativ.c:24:1: error: stray '\302' in program
relativ.c:24:1: error: stray '\240' in program
relativ.c:24:1: error: stray '\302' in program
relativ.c:24:1: error: stray '\240' in program
relativ.c:24:1: error: stray '\302' in program
relativ.c:24:1: error: stray '\240' in program
relativ.c:24:1: error: stray '\302' in program
relativ.c:24:1: error: stray '\240' in program
relativ.c:24:1: error: stray '\302' in program
relativ.c:24:1: error: stray '\240' in program
relativ.c:24:1: error: stray '\302' in program
relativ.c:24:1: error: stray '\240' in program
relativ.c:24:1: error: stray '\302' in program
relativ.c:24:1: error: stray '\240' in program
relativ.c:25:1: error: stray '\302' in program
             z=x;

 ^
relativ.c:25:1: error: stray '\240' in program
relativ.c:25:1: error: stray '\302' in program
relativ.c:25:1: error: stray '\240' in program
relativ.c:25:1: error: stray '\302' in program
relativ.c:25:1: error: stray '\240' in program
relativ.c:25:1: error: stray '\302' in program
relativ.c:25:1: error: stray '\240' in program
relativ.c:25:1: error: stray '\302' in program
relativ.c:25:1: error: stray '\240' in program
relativ.c:25:1: error: stray '\302' in program
relativ.c:25:1: error: stray '\240' in program
relativ.c:25:1: error: stray '\302' in program
relativ.c:25:1: error: stray '\240' in program
relativ.c:25:1: error: stray '\302' in program
relativ.c:25:1: error: stray '\240' in program
relativ.c:25:1: error: stray '\302' in program
relativ.c:25:1: error: stray '\240' in program
relativ.c:25:1: error: stray '\302' in program
relativ.c:25:1: error: stray '\240' in program
relativ.c:25:1: error: stray '\302' in program
relativ.c:25:1: error: stray '\240' in program
relativ.c:25:1: error: stray '\302' in program
relativ.c:25:1: error: stray '\240' in program
relativ.c:26:1: error: stray '\302' in program
             k++;

 ^
relativ.c:26:1: error: stray '\240' in program
relativ.c:26:1: error: stray '\302' in program
relativ.c:26:1: error: stray '\240' in program
relativ.c:26:1: error: stray '\302' in program
relativ.c:26:1: error: stray '\240' in program
relativ.c:26:1: error: stray '\302' in program
relativ.c:26:1: error: stray '\240' in program
relativ.c:26:1: error: stray '\302' in program
relativ.c:26:1: error: stray '\240' in program
relativ.c:26:1: error: stray '\302' in program
relativ.c:26:1: error: stray '\240' in program
relativ.c:26:1: error: stray '\302' in program
relativ.c:26:1: error: stray '\240' in program
relativ.c:26:1: error: stray '\302' in program
relativ.c:26:1: error: stray '\240' in program
relativ.c:26:1: error: stray '\302' in program
relativ.c:26:1: error: stray '\240' in program
relativ.c:26:1: error: stray '\302' in program
relativ.c:26:1: error: stray '\240' in program
relativ.c:26:1: error: stray '\302' in program
relativ.c:26:1: error: stray '\240' in program
relativ.c:26:1: error: stray '\302' in program
relativ.c:26:1: error: stray '\240' in program
relativ.c:27:1: error: stray '\302' in program
             if(s>summax) summax = s;

 ^
relativ.c:27:1: error: stray '\240' in program
relativ.c:27:1: error: stray '\302' in program
relativ.c:27:1: error: stray '\240' in program
relativ.c:27:1: error: stray '\302' in program
relativ.c:27:1: error: stray '\240' in program
relativ.c:27:1: error: stray '\302' in program
relativ.c:27:1: error: stray '\240' in program
relativ.c:27:1: error: stray '\302' in program
relativ.c:27:1: error: stray '\240' in program
relativ.c:27:1: error: stray '\302' in program
relativ.c:27:1: error: stray '\240' in program
relativ.c:27:1: error: stray '\302' in program
relativ.c:27:1: error: stray '\240' in program
relativ.c:27:1: error: stray '\302' in program
relativ.c:27:1: error: stray '\240' in program
relativ.c:27:1: error: stray '\302' in program
relativ.c:27:1: error: stray '\240' in program
relativ.c:27:1: error: stray '\302' in program
relativ.c:27:1: error: stray '\240' in program
relativ.c:27:1: error: stray '\302' in program
relativ.c:27:1: error: stray '\240' in program
relativ.c:27:1: error: stray '\302' in program
relativ.c:27:1: error: stray '\240' in program
relativ.c:27:1: error: stray '\302' in program
relativ.c:27:1: error: stray '\240' in program
relativ.c:27:1: error: stray '\302' in program
relativ.c:27:1: error: stray '\240' in program
relativ.c:27:1: error: stray '\302' in program
relativ.c:27:1: error: stray '\240' in program
relativ.c:28:1: error: stray '\302' in program
             s = x;

 ^
relativ.c:28:1: error: stray '\240' in program
relativ.c:28:1: error: stray '\302' in program
relativ.c:28:1: error: stray '\240' in program
relativ.c:28:1: error: stray '\302' in program
relativ.c:28:1: error: stray '\240' in program
relativ.c:28:1: error: stray '\302' in program
relativ.c:28:1: error: stray '\240' in program
relativ.c:28:1: error: stray '\302' in program
relativ.c:28:1: error: stray '\240' in program
relativ.c:28:1: error: stray '\302' in program
relativ.c:28:1: error: stray '\240' in program
relativ.c:28:1: error: stray '\302' in program
relativ.c:28:1: error: stray '\240' in program
relativ.c:28:1: error: stray '\302' in program
relativ.c:28:1: error: stray '\240' in program
relativ.c:28:1: error: stray '\302' in program
relativ.c:28:1: error: stray '\240' in program
relativ.c:28:1: error: stray '\302' in program
relativ.c:28:1: error: stray '\240' in program
relativ.c:28:1: error: stray '\302' in program
relativ.c:28:1: error: stray '\240' in program
relativ.c:28:1: error: stray '\302' in program
relativ.c:28:1: error: stray '\240' in program
relativ.c:28:1: error: stray '\302' in program
relativ.c:28:1: error: stray '\240' in program
relativ.c:28:1: error: stray '\302' in program
relativ.c:28:1: error: stray '\240' in program
relativ.c:29:1: error: stray '\302' in program
         }

 ^
relativ.c:29:1: error: stray '\240' in program
relativ.c:29:1: error: stray '\302' in program
relativ.c:29:1: error: stray '\240' in program
relativ.c:29:1: error: stray '\302' in program
relativ.c:29:1: error: stray '\240' in program
relativ.c:29:1: error: stray '\302' in program
relativ.c:29:1: error: stray '\240' in program
relativ.c:29:1: error: stray '\302' in program
relativ.c:29:1: error: stray '\240' in program
relativ.c:29:1: error: stray '\302' in program
relativ.c:29:1: error: stray '\240' in program
relativ.c:29:1: error: stray '\302' in program
relativ.c:29:1: error: stray '\240' in program
relativ.c:29:1: error: stray '\302' in program
relativ.c:29:1: error: stray '\240' in program
relativ.c:30:1: error: stray '\302' in program
     }

 ^
relativ.c:30:1: error: stray '\240' in program
relativ.c:30:1: error: stray '\302' in program
relativ.c:30:1: error: stray '\240' in program
relativ.c:30:1: error: stray '\302' in program
relativ.c:30:1: error: stray '\240' in program
relativ.c:30:1: error: stray '\302' in program
relativ.c:30:1: error: stray '\240' in program
relativ.c:32:1: error: stray '\302' in program
     fout << k << endl << summax;

 ^
relativ.c:32:1: error: stray '\240' in program
relativ.c:32:1: error: stray '\302' in program
relativ.c:32:1: error: stray '\240' in program
relativ.c:32:1: error: stray '\302' in program
relativ.c:32:1: error: stray '\240' in program
relativ.c:32:1: error: stray '\302' in program
relativ.c:32:1: error: stray '\240' in program
relativ.c:32:1: error: stray '\302' in program
relativ.c:32:1: error: stray '\240' in program
relativ.c:32:9: error: 'fout' undeclared (first use in this function)
     fout << k << endl << summax;

         ^
relativ.c:32:1: error: stray '\302' in program
     fout << k << endl << summax;

 ^
relativ.c:32:1: error: stray '\240' in program
relativ.c:32:1: error: stray '\302' in program
relativ.c:32:1: error: stray '\240' in program
relativ.c:32:1: error: stray '\302' in program
relativ.c:32:1: error: stray '\240' in program
relativ.c:32:1: error: stray '\302' in program
relativ.c:32:1: error: stray '\240' in program
relativ.c:32:26: error: 'endl' undeclared (first use in this function)
     fout << k << endl << summax;

                          ^
relativ.c:32:1: error: stray '\302' in program
     fout << k << endl << summax;

 ^
relativ.c:32:1: error: stray '\240' in program
relativ.c:34:1: error: stray '\302' in program
     return 0;

 ^
relativ.c:34:1: error: stray '\240' in program
relativ.c:34:1: error: stray '\302' in program
relativ.c:34:1: error: stray '\240' in program
relativ.c:34:1: error: stray '\302' in program
relativ.c:34:1: error: stray '\240' in program
relativ.c:34:1: error: stray '\302' in program
relativ.c:34:1: error: stray '\240' in program
relativ.c:34:1: error: stray '\302' in program
relativ.c:34:1: error: stray '\240' in program

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