Detalii evaluare #42430591

Rezumat problemă

#2789 cb3

Se consideră un șir de numere naturale nenule a[1], a[2], ..., a[n]. Asupra șirului se efectuează Q interogări de forma: care este numărul maxim de elemente ale șirului a căror sumă nu depășește valoarea S ?

Cerință

Trebuie să răspundeți la cele Q interogări.

Detalii

Problema cb3 Operații I/O cb3.in/cb3.out
Limita timp 0.1 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #42430591 Utilizator Cacior Marius (Cacior_Marius)
Fișier cb3.cpp Dimensiune 899 B
Data încărcării 06 Martie 2023, 10:35 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

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

 ^
cb3.cpp:3:1: error: stray '\240' in program
cb3.cpp:5:1: error: stray '\302' in program
 ofstream cout("cb3.out"); 

 ^
cb3.cpp:5:1: error: stray '\240' in program
cb3.cpp:6:1: error: stray '\302' in program
 int n,v[10001],q; 

 ^
cb3.cpp:6:1: error: stray '\240' in program
cb3.cpp:9:1: error: stray '\302' in program
     cin >> n >> q;

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

 ^
cb3.cpp:10:1: error: stray '\240' in program
cb3.cpp:10:1: error: stray '\302' in program
cb3.cpp:10:1: error: stray '\240' in program
cb3.cpp:10:1: error: stray '\302' in program
cb3.cpp:10:1: error: stray '\240' in program
cb3.cpp:11:1: error: stray '\302' in program
         cin >> v[i];

 ^
cb3.cpp:11:1: error: stray '\240' in program
cb3.cpp:11:1: error: stray '\302' in program
cb3.cpp:11:1: error: stray '\240' in program
cb3.cpp:11:1: error: stray '\302' in program
cb3.cpp:11:1: error: stray '\240' in program
cb3.cpp:11:1: error: stray '\302' in program
cb3.cpp:11:1: error: stray '\240' in program
cb3.cpp:11:1: error: stray '\302' in program
cb3.cpp:11:1: error: stray '\240' in program
cb3.cpp:11:1: error: stray '\302' in program
cb3.cpp:11:1: error: stray '\240' in program
cb3.cpp:11:1: error: stray '\302' in program
cb3.cpp:11:1: error: stray '\240' in program
cb3.cpp:12:1: error: stray '\302' in program
     sort(v+1,v+n+1);

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

 ^
cb3.cpp:13:1: error: stray '\240' in program
cb3.cpp:13:1: error: stray '\302' in program
cb3.cpp:13:1: error: stray '\240' in program
cb3.cpp:13:1: error: stray '\302' in program
cb3.cpp:13:1: error: stray '\240' in program
cb3.cpp:14:1: error: stray '\302' in program
         v[i]+=v[i-1];

 ^
cb3.cpp:14:1: error: stray '\240' in program
cb3.cpp:14:1: error: stray '\302' in program
cb3.cpp:14:1: error: stray '\240' in program
cb3.cpp:14:1: error: stray '\302' in program
cb3.cpp:14:1: error: stray '\240' in program
cb3.cpp:14:1: error: stray '\302' in program
cb3.cpp:14:1: error: stray '\240' in program
cb3.cpp:14:1: error: stray '\302' in program
cb3.cpp:14:1: error: stray '\240' in program
cb3.cpp:14:1: error: stray '\302' in program
cb3.cpp:14:1: error: stray '\240' in program
cb3.cpp:14:1: error: stray '\302' in program
cb3.cpp:14:1: error: stray '\240' in program
cb3.cpp:15:1: error: stray '\302' in program
     for(int i=1;i<=q;i++)

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

 ^
cb3.cpp:16:1: error: stray '\240' in program
cb3.cpp:16:1: error: stray '\302' in program
cb3.cpp:16:1: error: stray '\240' in program
cb3.cpp:16:1: error: stray '\302' in program
cb3.cpp:16:1: error: stray '\240' in program
cb3.cpp:17:1: error: stray '\302' in program
         int x,st,dr,mij;

 ^
cb3.cpp:17:1: error: stray '\240' in program
cb3.cpp:17:1: error: stray '\302' in program
cb3.cpp:17:1: error: stray '\240' in program
cb3.cpp:17:1: error: stray '\302' in program
cb3.cpp:17:1: error: stray '\240' in program
cb3.cpp:17:1: error: stray '\302' in program
cb3.cpp:17:1: error: stray '\240' in program
cb3.cpp:17:1: error: stray '\302' in program
cb3.cpp:17:1: error: stray '\240' in program
cb3.cpp:17:1: error: stray '\302' in program
cb3.cpp:17:1: error: stray '\240' in program
cb3.cpp:17:1: error: stray '\302' in program
cb3.cpp:17:1: error: stray '\240' in program
cb3.cpp:18:1: error: stray '\302' in program
         cin >> x;

 ^
cb3.cpp:18:1: error: stray '\240' in program
cb3.cpp:18:1: error: stray '\302' in program
cb3.cpp:18:1: error: stray '\240' in program
cb3.cpp:18:1: error: stray '\302' in program
cb3.cpp:18:1: error: stray '\240' in program
cb3.cpp:18:1: error: stray '\302' in program
cb3.cpp:18:1: error: stray '\240' in program
cb3.cpp:18:1: error: stray '\302' in program
cb3.cpp:18:1: error: stray '\240' in program
cb3.cpp:18:1: error: stray '\302' in program
cb3.cpp:18:1: error: stray '\240' in program
cb3.cpp:18:1: error: stray '\302' in program
cb3.cpp:18:1: error: stray '\240' in program
cb3.cpp:19:1: error: stray '\302' in program
         st=1,dr=n;

 ^
cb3.cpp:19:1: error: stray '\240' in program
cb3.cpp:19:1: error: stray '\302' in program
cb3.cpp:19:1: error: stray '\240' in program
cb3.cpp:19:1: error: stray '\302' in program
cb3.cpp:19:1: error: stray '\240' in program
cb3.cpp:19:1: error: stray '\302' in program
cb3.cpp:19:1: error: stray '\240' in program
cb3.cpp:19:1: error: stray '\302' in program
cb3.cpp:19:1: error: stray '\240' in program
cb3.cpp:19:1: error: stray '\302' in program
cb3.cpp:19:1: error: stray '\240' in program
cb3.cpp:19:1: error: stray '\302' in program
cb3.cpp:19:1: error: stray '\240' in program
cb3.cpp:20:1: error: stray '\302' in program
         while(st<=dr)

 ^
cb3.cpp:20:1: error: stray '\240' in program
cb3.cpp:20:1: error: stray '\302' in program
cb3.cpp:20:1: error: stray '\240' in program
cb3.cpp:20:1: error: stray '\302' in program
cb3.cpp:20:1: error: stray '\240' in program
cb3.cpp:20:1: error: stray '\302' in program
cb3.cpp:20:1: error: stray '\240' in program
cb3.cpp:20:1: error: stray '\302' in program
cb3.cpp:20:1: error: stray '\240' in program
cb3.cpp:20:1: error: stray '\302' in program
cb3.cpp:20:1: error: stray '\240' in program
cb3.cpp:20:1: error: stray '\302' in program
cb3.cpp:20:1: error: stray '\240' in program
cb3.cpp:21:1: error: stray '\302' in program
         {

 ^
cb3.cpp:21:1: error: stray '\240' in program
cb3.cpp:21:1: error: stray '\302' in program
cb3.cpp:21:1: error: stray '\240' in program
cb3.cpp:21:1: error: stray '\302' in program
cb3.cpp:21:1: error: stray '\240' in program
cb3.cpp:21:1: error: stray '\302' in program
cb3.cpp:21:1: error: stray '\240' in program
cb3.cpp:21:1: error: stray '\302' in program
cb3.cpp:21:1: error: stray '\240' in program
cb3.cpp:21:1: error: stray '\302' in program
cb3.cpp:21:1: error: stray '\240' in program
cb3.cpp:21:1: error: stray '\302' in program
cb3.cpp:21:1: error: stray '\240' in program
cb3.cpp:22:1: error: stray '\302' in program
             mij=(st+dr)/2;

 ^
cb3.cpp:22:1: error: stray '\240' in program
cb3.cpp:22:1: error: stray '\302' in program
cb3.cpp:22:1: error: stray '\240' in program
cb3.cpp:22:1: error: stray '\302' in program
cb3.cpp:22:1: error: stray '\240' in program
cb3.cpp:22:1: error: stray '\302' in program
cb3.cpp:22:1: error: stray '\240' in program
cb3.cpp:22:1: error: stray '\302' in program
cb3.cpp:22:1: error: stray '\240' in program
cb3.cpp:22:1: error: stray '\302' in program
cb3.cpp:22:1: error: stray '\240' in program
cb3.cpp:22:1: error: stray '\302' in program
cb3.cpp:22:1: error: stray '\240' in program
cb3.cpp:22:1: error: stray '\302' in program
cb3.cpp:22:1: error: stray '\240' in program
cb3.cpp:22:1: error: stray '\302' in program
cb3.cpp:22:1: error: stray '\240' in program
cb3.cpp:22:1: error: stray '\302' in program
cb3.cpp:22:1: error: stray '\240' in program
cb3.cpp:22:1: error: stray '\302' in program
cb3.cpp:22:1: error: stray '\240' in program
cb3.cpp:23:1: error: stray '\302' in program
             if(v[mij]==x)

 ^
cb3.cpp:23:1: error: stray '\240' in program
cb3.cpp:23:1: error: stray '\302' in program
cb3.cpp:23:1: error: stray '\240' in program
cb3.cpp:23:1: error: stray '\302' in program
cb3.cpp:23:1: error: stray '\240' in program
cb3.cpp:23:1: error: stray '\302' in program
cb3.cpp:23:1: error: stray '\240' in program
cb3.cpp:23:1: error: stray '\302' in program
cb3.cpp:23:1: error: stray '\240' in program
cb3.cpp:23:1: error: stray '\302' in program
cb3.cpp:23:1: error: stray '\240' in program
cb3.cpp:23:1: error: stray '\302' in program
cb3.cpp:23:1: error: stray '\240' in program
cb3.cpp:23:1: error: stray '\302' in program
cb3.cpp:23:1: error: stray '\240' in program
cb3.cpp:23:1: error: stray '\302' in program
cb3.cpp:23:1: error: stray '\240' in program
cb3.cpp:23:1: error: stray '\302' in program
cb3.cpp:23:1: error: stray '\240' in program
cb3.cpp:23:1: error: stray '\302' in program
cb3.cpp:23:1: error: stray '\240' in program
cb3.cpp:24:1: error: stray '\302' in program
             {

 ^
cb3.cpp:24:1: error: stray '\240' in program
cb3.cpp:24:1: error: stray '\302' in program
cb3.cpp:24:1: error: stray '\240' in program
cb3.cpp:24:1: error: stray '\302' in program
cb3.cpp:24:1: error: stray '\240' in program
cb3.cpp:24:1: error: stray '\302' in program
cb3.cpp:24:1: error: stray '\240' in program
cb3.cpp:24:1: error: stray '\302' in program
cb3.cpp:24:1: error: stray '\240' in program
cb3.cpp:24:1: error: stray '\302' in program
cb3.cpp:24:1: error: stray '\240' in program
cb3.cpp:24:1: error: stray '\302' in program
cb3.cpp:24:1: error: stray '\240' in program
cb3.cpp:24:1: error: stray '\302' in program
cb3.cpp:24:1: error: stray '\240' in program
cb3.cpp:24:1: error: stray '\302' in program
cb3.cpp:24:1: error: stray '\240' in program
cb3.cpp:24:1: error: stray '\302' in program
cb3.cpp:24:1: error: stray '\240' in program
cb3.cpp:24:1: error: stray '\302' in program
cb3.cpp:24:1: error: stray '\240' in program
cb3.cpp:25:1: error: stray '\302' in program
                 cout << mij << '\n';

 ^
cb3.cpp:25:1: error: stray '\240' in program
cb3.cpp:25:1: error: stray '\302' in program
cb3.cpp:25:1: error: stray '\240' in program
cb3.cpp:25:1: error: stray '\302' in program
cb3.cpp:25:1: error: stray '\240' in program
cb3.cpp:25:1: error: stray '\302' in program
cb3.cpp:25:1: error: stray '\240' in program
cb3.cpp:25:1: error: stray '\302' in program
cb3.cpp:25:1: error: stray '\240' in program
cb3.cpp:25:1: error: stray '\302' in program
cb3.cpp:25:1: error: stray '\240' in program
cb3.cpp:25:1: error: stray '\302' in program
cb3.cpp:25:1: error: stray '\240' in program
cb3.cpp:25:1: error: stray '\302' in program
cb3.cpp:25:1: error: stray '\240' in program
cb3.cpp:25:1: error: stray '\302' in program
cb3.cpp:25:1: error: stray '\240' in program
cb3.cpp:25:1: error: stray '\302' in program
cb3.cpp:25:1: error: stray '\240' in program
cb3.cpp:25:1: error: stray '\302' in program
cb3.cpp:25:1: error: stray '\240' in program
cb3.cpp:25:1: error: stray '\302' in program
cb3.cpp:25:1: error: stray '\240' in program
cb3.cpp:25:1: error: stray '\302' in program
cb3.cpp:25:1: error: stray '\240' in program
cb3.cpp:25:1: error: stray '\302' in program
cb3.cpp:25:1: error: stray '\240' in program
cb3.cpp:25:1: error: stray '\302' in program
cb3.cpp:25:1: error: stray '\240' in program
cb3.cpp:26:1: error: stray '\302' in program
                 break;

 ^
cb3.cpp:26:1: error: stray '\240' in program
cb3.cpp:26:1: error: stray '\302' in program
cb3.cpp:26:1: error: stray '\240' in program
cb3.cpp:26:1: error: stray '\302' in program
cb3.cpp:26:1: error: stray '\240' in program
cb3.cpp:26:1: error: stray '\302' in program
cb3.cpp:26:1: error: stray '\240' in program
cb3.cpp:26:1: error: stray '\302' in program
cb3.cpp:26:1: error: stray '\240' in program
cb3.cpp:26:1: error: stray '\302' in program
cb3.cpp:26:1: error: stray '\240' in program
cb3.cpp:26:1: error: stray '\302' in program
cb3.cpp:26:1: error: stray '\240' in program
cb3.cpp:26:1: error: stray '\302' in program
cb3.cpp:26:1: error: stray '\240' in program
cb3.cpp:26:1: error: stray '\302' in program
cb3.cpp:26:1: error: stray '\240' in program
cb3.cpp:26:1: error: stray '\302' in program
cb3.cpp:26:1: error: stray '\240' in program
cb3.cpp:26:1: error: stray '\302' in program
cb3.cpp:26:1: error: stray '\240' in program
cb3.cpp:26:1: error: stray '\302' in program
cb3.cpp:26:1: error: stray '\240' in program
cb3.cpp:26:1: error: stray '\302' in program
cb3.cpp:26:1: error: stray '\240' in program
cb3.cpp:26:1: error: stray '\302' in program
cb3.cpp:26:1: error: stray '\240' in program
cb3.cpp:26:1: error: stray '\302' in program
cb3.cpp:26:1: error: stray '\240' in program
cb3.cpp:27:1: error: stray '\302' in program
             }

 ^
cb3.cpp:27:1: error: stray '\240' in program
cb3.cpp:27:1: error: stray '\302' in program
cb3.cpp:27:1: error: stray '\240' in program
cb3.cpp:27:1: error: stray '\302' in program
cb3.cpp:27:1: error: stray '\240' in program
cb3.cpp:27:1: error: stray '\302' in program
cb3.cpp:27:1: error: stray '\240' in program
cb3.cpp:27:1: error: stray '\302' in program
cb3.cpp:27:1: error: stray '\240' in program
cb3.cpp:27:1: error: stray '\302' in program
cb3.cpp:27:1: error: stray '\240' in program
cb3.cpp:27:1: error: stray '\302' in program
cb3.cpp:27:1: error: stray '\240' in program
cb3.cpp:27:1: error: stray '\302' in program
cb3.cpp:27:1: error: stray '\240' in program
cb3.cpp:27:1: error: stray '\302' in program
cb3.cpp:27:1: error: stray '\240' in program
cb3.cpp:27:1: error: stray '\302' in program
cb3.cpp:27:1: error: stray '\240' in program
cb3.cpp:27:1: error: stray '\302' in program
cb3.cpp:27:1: error: stray '\240' in program
cb3.cpp:28:1: error: stray '\302' in program
             if(x<v[mij]) dr=mij-1;

 ^
cb3.cpp:28:1: error: stray '\240' in program
cb3.cpp:28:1: error: stray '\302' in program
cb3.cpp:28:1: error: stray '\240' in program
cb3.cpp:28:1: error: stray '\302' in program
cb3.cpp:28:1: error: stray '\240' in program
cb3.cpp:28:1: error: stray '\302' in program
cb3.cpp:28:1: error: stray '\240' in program
cb3.cpp:28:1: error: stray '\302' in program
cb3.cpp:28:1: error: stray '\240' in program
cb3.cpp:28:1: error: stray '\302' in program
cb3.cpp:28:1: error: stray '\240' in program
cb3.cpp:28:1: error: stray '\302' in program
cb3.cpp:28:1: error: stray '\240' in program
cb3.cpp:28:1: error: stray '\302' in program
cb3.cpp:28:1: error: stray '\240' in program
cb3.cpp:28:1: error: stray '\302' in program
cb3.cpp:28:1: error: stray '\240' in program
cb3.cpp:28:1: error: stray '\302' in program
cb3.cpp:28:1: error: stray '\240' in program
cb3.cpp:28:1: error: stray '\302' in program
cb3.cpp:28:1: error: stray '\240' in program
cb3.cpp:29:1: error: stray '\302' in program
             else st=mij+1;

 ^
cb3.cpp:29:1: error: stray '\240' in program
cb3.cpp:29:1: error: stray '\302' in program
cb3.cpp:29:1: error: stray '\240' in program
cb3.cpp:29:1: error: stray '\302' in program
cb3.cpp:29:1: error: stray '\240' in program
cb3.cpp:29:1: error: stray '\302' in program
cb3.cpp:29:1: error: stray '\240' in program
cb3.cpp:29:1: error: stray '\302' in program
cb3.cpp:29:1: error: stray '\240' in program
cb3.cpp:29:1: error: stray '\302' in program
cb3.cpp:29:1: error: stray '\240' in program
cb3.cpp:29:1: error: stray '\302' in program
cb3.cpp:29:1: error: stray '\240' in program
cb3.cpp:29:1: error: stray '\302' in program
cb3.cpp:29:1: error: stray '\240' in program
cb3.cpp:29:1: error: stray '\302' in program
cb3.cpp:29:1: error: stray '\240' in program
cb3.cpp:29:1: error: stray '\302' in program
cb3.cpp:29:1: error: stray '\240' in program
cb3.cpp:29:1: error: stray '\302' in program
cb3.cpp:29:1: error: stray '\240' in program
cb3.cpp:30:1: error: stray '\302' in program
         }

 ^
cb3.cpp:30:1: error: stray '\240' in program
cb3.cpp:30:1: error: stray '\302' in program
cb3.cpp:30:1: error: stray '\240' in program
cb3.cpp:30:1: error: stray '\302' in program
cb3.cpp:30:1: error: stray '\240' in program
cb3.cpp:30:1: error: stray '\302' in program
cb3.cpp:30:1: error: stray '\240' in program
cb3.cpp:30:1: error: stray '\302' in program
cb3.cpp:30:1: error: stray '\240' in program
cb3.cpp:30:1: error: stray '\302' in program
cb3.cpp:30:1: error: stray '\240' in program
cb3.cpp:30:1: error: stray '\302' in program
cb3.cpp:30:1: error: stray '\240' in program
cb3.cpp:31:1: error: stray '\302' in program
         if(st>dr) cout << dr << '\n';

 ^
cb3.cpp:31:1: error: stray '\240' in program
cb3.cpp:31:1: error: stray '\302' in program
cb3.cpp:31:1: error: stray '\240' in program
cb3.cpp:31:1: error: stray '\302' in program
cb3.cpp:31:1: error: stray '\240' in program
cb3.cpp:31:1: error: stray '\302' in program
cb3.cpp:31:1: error: stray '\240' in program
cb3.cpp:31:1: error: stray '\302' in program
cb3.cpp:31:1: error: stray '\240' in program
cb3.cpp:31:1: error: stray '\302' in program
cb3.cpp:31:1: error: stray '\240' in program
cb3.cpp:31:1: error: stray '\302' in program
cb3.cpp:31:1: error: stray '\240' in program
cb3.cpp:32:1: error: stray '\302' in program
     }

 ^
cb3.cpp:32:1: error: stray '\240' in program
cb3.cpp:32:1: error: stray '\302' in program
cb3.cpp:32:1: error: stray '\240' in program
cb3.cpp:32:1: error: stray '\302' in program
cb3.cpp:32:1: error: stray '\240' in program
cb3.cpp:33:1: error: stray '\302' in program
     return 0;

 ^
cb3.cpp:33:1: error: stray '\240' in program
cb3.cpp:33:1: error: stray '\302' in program
cb3.cpp:33:1: error: stray '\240' in program
cb3.cpp:33:1: error: stray '\302' in program
cb3.cpp:33: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 cb3 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ă.