Detalii evaluare #53769266

Rezumat problemă

#3170 Plata3

Se consideră n tipuri de bancnote, cu valorile v[1] v[2] ... v[n], ordonate strict crescător. Se cere să se determine o modalitate de a plăti integral o sumă dată S cu bancnotele disponibile, știind că se pot folosi oricâte bancnote de orice tip.

Detalii

Problema Plata3 Operații I/O tastatură/ecran
Limita timp 1 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #53769266 Utilizator Pușcașu Alessia Maria (Puscasu_Alessia_Maria)
Fișier plata3.cpp Dimensiune 1.05 KB
Data încărcării 11 Noiembrie 2024, 12:06 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

plata3.cpp:12:1: error: stray '\302' in program
     int i,j,aux;

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

 ^
plata3.cpp:13:1: error: stray '\240' in program
plata3.cpp:13:1: error: stray '\302' in program
plata3.cpp:13:1: error: stray '\240' in program
plata3.cpp:14:1: error: stray '\302' in program
         for(j=i+1;j<=n;j++)

 ^
plata3.cpp:14:1: error: stray '\240' in program
plata3.cpp:14:1: error: stray '\302' in program
plata3.cpp:14:1: error: stray '\240' in program
plata3.cpp:14:1: error: stray '\302' in program
plata3.cpp:14:1: error: stray '\240' in program
plata3.cpp:14:1: error: stray '\302' in program
plata3.cpp:14:1: error: stray '\240' in program
plata3.cpp:15:1: error: stray '\302' in program
             if(v[i]<v[j])

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

 ^
plata3.cpp:16:1: error: stray '\240' in program
plata3.cpp:16:1: error: stray '\302' in program
plata3.cpp:16:1: error: stray '\240' in program
plata3.cpp:16:1: error: stray '\302' in program
plata3.cpp:16:1: error: stray '\240' in program
plata3.cpp:16:1: error: stray '\302' in program
plata3.cpp:16:1: error: stray '\240' in program
plata3.cpp:16:1: error: stray '\302' in program
plata3.cpp:16:1: error: stray '\240' in program
plata3.cpp:16:1: error: stray '\302' in program
plata3.cpp:16:1: error: stray '\240' in program
plata3.cpp:17:1: error: stray '\302' in program
                 aux=v[i];

 ^
plata3.cpp:17:1: error: stray '\240' in program
plata3.cpp:17:1: error: stray '\302' in program
plata3.cpp:17:1: error: stray '\240' in program
plata3.cpp:17:1: error: stray '\302' in program
plata3.cpp:17:1: error: stray '\240' in program
plata3.cpp:17:1: error: stray '\302' in program
plata3.cpp:17:1: error: stray '\240' in program
plata3.cpp:17:1: error: stray '\302' in program
plata3.cpp:17:1: error: stray '\240' in program
plata3.cpp:17:1: error: stray '\302' in program
plata3.cpp:17:1: error: stray '\240' in program
plata3.cpp:17:1: error: stray '\302' in program
plata3.cpp:17:1: error: stray '\240' in program
plata3.cpp:17:1: error: stray '\302' in program
plata3.cpp:17:1: error: stray '\240' in program
plata3.cpp:18:1: error: stray '\302' in program
                 v[i]=v[j];

 ^
plata3.cpp:18:1: error: stray '\240' in program
plata3.cpp:18:1: error: stray '\302' in program
plata3.cpp:18:1: error: stray '\240' in program
plata3.cpp:18:1: error: stray '\302' in program
plata3.cpp:18:1: error: stray '\240' in program
plata3.cpp:18:1: error: stray '\302' in program
plata3.cpp:18:1: error: stray '\240' in program
plata3.cpp:18:1: error: stray '\302' in program
plata3.cpp:18:1: error: stray '\240' in program
plata3.cpp:18:1: error: stray '\302' in program
plata3.cpp:18:1: error: stray '\240' in program
plata3.cpp:18:1: error: stray '\302' in program
plata3.cpp:18:1: error: stray '\240' in program
plata3.cpp:18:1: error: stray '\302' in program
plata3.cpp:18:1: error: stray '\240' in program
plata3.cpp:19:1: error: stray '\302' in program
                 v[j]=aux;

 ^
plata3.cpp:19:1: error: stray '\240' in program
plata3.cpp:19:1: error: stray '\302' in program
plata3.cpp:19:1: error: stray '\240' in program
plata3.cpp:19:1: error: stray '\302' in program
plata3.cpp:19:1: error: stray '\240' in program
plata3.cpp:19:1: error: stray '\302' in program
plata3.cpp:19:1: error: stray '\240' in program
plata3.cpp:19:1: error: stray '\302' in program
plata3.cpp:19:1: error: stray '\240' in program
plata3.cpp:19:1: error: stray '\302' in program
plata3.cpp:19:1: error: stray '\240' in program
plata3.cpp:19:1: error: stray '\302' in program
plata3.cpp:19:1: error: stray '\240' in program
plata3.cpp:19:1: error: stray '\302' in program
plata3.cpp:19:1: error: stray '\240' in program
plata3.cpp:20:1: error: stray '\302' in program
             }

 ^
plata3.cpp:20:1: error: stray '\240' in program
plata3.cpp:20:1: error: stray '\302' in program
plata3.cpp:20:1: error: stray '\240' in program
plata3.cpp:20:1: error: stray '\302' in program
plata3.cpp:20:1: error: stray '\240' in program
plata3.cpp:20:1: error: stray '\302' in program
plata3.cpp:20:1: error: stray '\240' in program
plata3.cpp:20:1: error: stray '\302' in program
plata3.cpp:20:1: error: stray '\240' in program
plata3.cpp:20:1: error: stray '\302' in program
plata3.cpp:20:1: error: stray '\240' in program
plata3.cpp:25:1: error: stray '\302' in program
     int i;

 ^
plata3.cpp:25:1: error: stray '\240' in program
plata3.cpp:25:1: error: stray '\302' in program
plata3.cpp:25:1: error: stray '\240' in program
plata3.cpp:26:1: error: stray '\302' in program
     ok=1;

 ^
plata3.cpp:26:1: error: stray '\240' in program
plata3.cpp:26:1: error: stray '\302' in program
plata3.cpp:26:1: error: stray '\240' in program
plata3.cpp:27:1: error: stray '\302' in program
     g<<nr<<'\n';

 ^
plata3.cpp:27:1: error: stray '\240' in program
plata3.cpp:27:1: error: stray '\302' in program
plata3.cpp:27:1: error: stray '\240' in program
plata3.cpp:28:1: error: stray '\302' in program
     for(i=1;i<=k;i++) g<<x[i]<<" "<<v[i]<<'\n';

 ^
plata3.cpp:28:1: error: stray '\240' in program
plata3.cpp:28:1: error: stray '\302' in program
plata3.cpp:28:1: error: stray '\240' in program
plata3.cpp:29:1: error: stray '\302' in program
     exit(0);

 ^
plata3.cpp:29:1: error: stray '\240' in program
plata3.cpp:29:1: error: stray '\302' in program
plata3.cpp:29:1: error: stray '\240' in program
plata3.cpp:34:1: error: stray '\302' in program
     int i;

 ^
plata3.cpp:34:1: error: stray '\240' in program
plata3.cpp:34:1: error: stray '\302' in program
plata3.cpp:34:1: error: stray '\240' in program
plata3.cpp:35:1: error: stray '\302' in program
     for(i=s/v[k];i>=0;i--)

 ^
plata3.cpp:35:1: error: stray '\240' in program
plata3.cpp:35:1: error: stray '\302' in program
plata3.cpp:35:1: error: stray '\240' in program
plata3.cpp:36:1: error: stray '\302' in program
     {

 ^
plata3.cpp:36:1: error: stray '\240' in program
plata3.cpp:36:1: error: stray '\302' in program
plata3.cpp:36:1: error: stray '\240' in program
plata3.cpp:37:1: error: stray '\302' in program
         x[k]=i;

 ^
plata3.cpp:37:1: error: stray '\240' in program
plata3.cpp:37:1: error: stray '\302' in program
plata3.cpp:37:1: error: stray '\240' in program
plata3.cpp:37:1: error: stray '\302' in program
plata3.cpp:37:1: error: stray '\240' in program
plata3.cpp:37:1: error: stray '\302' in program
plata3.cpp:37:1: error: stray '\240' in program
plata3.cpp:38:1: error: stray '\302' in program
         s0+=x[k]*v[k];

 ^
plata3.cpp:38:1: error: stray '\240' in program
plata3.cpp:38:1: error: stray '\302' in program
plata3.cpp:38:1: error: stray '\240' in program
plata3.cpp:38:1: error: stray '\302' in program
plata3.cpp:38:1: error: stray '\240' in program
plata3.cpp:38:1: error: stray '\302' in program
plata3.cpp:38:1: error: stray '\240' in program
plata3.cpp:39:1: error: stray '\302' in program
         nr+=x[k];

 ^
plata3.cpp:39:1: error: stray '\240' in program
plata3.cpp:39:1: error: stray '\302' in program
plata3.cpp:39:1: error: stray '\240' in program
plata3.cpp:39:1: error: stray '\302' in program
plata3.cpp:39:1: error: stray '\240' in program
plata3.cpp:39:1: error: stray '\302' in program
plata3.cpp:39:1: error: stray '\240' in program
plata3.cpp:40:1: error: stray '\302' in program
         if(s0<=s)

 ^
plata3.cpp:40:1: error: stray '\240' in program
plata3.cpp:40:1: error: stray '\302' in program
plata3.cpp:40:1: error: stray '\240' in program
plata3.cpp:40:1: error: stray '\302' in program
plata3.cpp:40:1: error: stray '\240' in program
plata3.cpp:40:1: error: stray '\302' in program
plata3.cpp:40:1: error: stray '\240' in program
plata3.cpp:41:1: error: stray '\302' in program
             if(s0==s && k==n) afis(k);

 ^
plata3.cpp:41:1: error: stray '\240' in program
plata3.cpp:41:1: error: stray '\302' in program
plata3.cpp:41:1: error: stray '\240' in program
plata3.cpp:41:1: error: stray '\302' in program
plata3.cpp:41:1: error: stray '\240' in program
plata3.cpp:41:1: error: stray '\302' in program
plata3.cpp:41:1: error: stray '\240' in program
plata3.cpp:41:1: error: stray '\302' in program
plata3.cpp:41:1: error: stray '\240' in program
plata3.cpp:41:1: error: stray '\302' in program
plata3.cpp:41:1: error: stray '\240' in program
plata3.cpp:42:1: error: stray '\302' in program
             else if(k<n) bkt(k+1);

 ^
plata3.cpp:42:1: error: stray '\240' in program
plata3.cpp:42:1: error: stray '\302' in program
plata3.cpp:42:1: error: stray '\240' in program
plata3.cpp:42:1: error: stray '\302' in program
plata3.cpp:42:1: error: stray '\240' in program
plata3.cpp:42:1: error: stray '\302' in program
plata3.cpp:42:1: error: stray '\240' in program
plata3.cpp:42:1: error: stray '\302' in program
plata3.cpp:42:1: error: stray '\240' in program
plata3.cpp:42:1: error: stray '\302' in program
plata3.cpp:42:1: error: stray '\240' in program
plata3.cpp:43:1: error: stray '\302' in program
         s0-=x[k]*v[k];

 ^
plata3.cpp:43:1: error: stray '\240' in program
plata3.cpp:43:1: error: stray '\302' in program
plata3.cpp:43:1: error: stray '\240' in program
plata3.cpp:43:1: error: stray '\302' in program
plata3.cpp:43:1: error: stray '\240' in program
plata3.cpp:43:1: error: stray '\302' in program
plata3.cpp:43:1: error: stray '\240' in program
plata3.cpp:44:1: error: stray '\302' in program
         nr-=x[k];

 ^
plata3.cpp:44:1: error: stray '\240' in program
plata3.cpp:44:1: error: stray '\302' in program
plata3.cpp:44:1: error: stray '\240' in program
plata3.cpp:44:1: error: stray '\302' in program
plata3.cpp:44:1: error: stray '\240' in program
plata3.cpp:44:1: error: stray '\302' in program
plata3.cpp:44:1: error: stray '\240' in program
plata3.cpp:45:1: error: stray '\302' in program
     }

 ^
plata3.cpp:45:1: error: stray '\240' in program
plata3.cpp:45:1: error: stray '\302' in program
plata3.cpp:45:1: error: stray '\240' in program
plata3.cpp:50:1: error: stray '\302' in program
     f>>n>>s;

 ^
plata3.cpp:50:1: error: stray '\240' in program
plata3.cpp:50:1: error: stray '\302' in program
plata3.cpp:50:1: error: stray '\240' in program
plata3.cpp:51:1: error: stray '\302' in program
     for(i=1;i<=n;i++) f>>v[i];

 ^
plata3.cpp:51:1: error: stray '\240' in program
plata3.cpp:51:1: error: stray '\302' in program
plata3.cpp:51:1: error: stray '\240' in program
plata3.cpp:52:1: error: stray '\302' in program
     

 ^
plata3.cpp:52:1: error: stray '\240' in program
plata3.cpp:52:1: error: stray '\302' in program
plata3.cpp:52:1: error: stray '\240' in program
plata3.cpp:53:1: error: stray '\302' in program
     sortare();

 ^
plata3.cpp:53:1: error: stray '\240' in program
plata3.cpp:53:1: error: stray '\302' in program
plata3.cpp:53:1: error: stray '\240' in program
plata3.cpp:54:1: error: stray '\302' in program
     

 ^
plata3.cpp:54:1: error: stray '\240' in program
plata3.cpp:54:1: error: stray '\302' in program
plata3.cpp:54:1: error: stray '\240' in program
plata3.cpp:55:1: error: stray '\302' in program
     bkt(1);

 ^
plata3.cpp:55:1: error: stray '\240' in program
plata3.cpp:55:1: error: stray '\302' in program
plata3.cpp:55:1: error: stray '\240' in program
plata3.cpp:56:1: error: stray '\302' in program
     if(!ok) g<<"Nu exista solutie";

 ^
plata3.cpp:56:1: error: stray '\240' in program
plata3.cpp:56:1: error: stray '\302' in program
plata3.cpp:56:1: error: stray '\240' in program
plata3.cpp:58:1: error: stray '\302' in program
     return 0;

 ^
plata3.cpp:58:1: error: stray '\240' in program
plata3.cpp:58:1: error: stray '\302' in program
plata3.cpp:58:1: error: stray '\240' in program
plata3.cpp: In function 'void bkt(int)':
plata3.cpp:40:15: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]
         if(s0<=s)

               ^

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