Detalii evaluare #8773812

Rezumat problemă

În curtea unui atelier de reparaţii auto, sunt n maşini care trebuie sa fie reparate. Deoarece nu sunt suficienţi mecanici, în fiecare moment de timp se poate lucra doar la o singură maşină.

Cunoscând timpul necesar pentru repararea fiecărei maşini, scrieţi un program care calculează numărul maxim de maşini care pot fi reparate într-un interval de timp T.

Detalii

Problema Masini Operații I/O masini.in/masini.out
Limita timp 0.1 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #8773812 Utilizator Franco B (Teodor03)
Fișier masini.cpp Dimensiune 597 B
Data încărcării 12 Martie 2018, 11:16 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

masini.cpp:2:21: warning: extra tokens at end of #include directive [enabled by default]
 #include <algorithm> 

                     ^
masini.cpp:7:1: error: stray '\302' in program
     ifstream fin("masini.in");

 ^
masini.cpp:7:1: error: stray '\240' in program
masini.cpp:7:1: error: stray '\302' in program
masini.cpp:7:1: error: stray '\240' in program
masini.cpp:7:1: error: stray '\302' in program
masini.cpp:7:1: error: stray '\240' in program
masini.cpp:8:1: error: stray '\302' in program
     ofstream fout("masini.out");

 ^
masini.cpp:8:1: error: stray '\240' in program
masini.cpp:8:1: error: stray '\302' in program
masini.cpp:8:1: error: stray '\240' in program
masini.cpp:8:1: error: stray '\302' in program
masini.cpp:8:1: error: stray '\240' in program
masini.cpp:10:1: error: stray '\302' in program
     int n, a[1000], s = 0, cnt = 0, T;

 ^
masini.cpp:10:1: error: stray '\240' in program
masini.cpp:10:1: error: stray '\302' in program
masini.cpp:10:1: error: stray '\240' in program
masini.cpp:10:1: error: stray '\302' in program
masini.cpp:10:1: error: stray '\240' in program
masini.cpp:12:1: error: stray '\302' in program
     fin>>n>>T;

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

 ^
masini.cpp:13:1: error: stray '\240' in program
masini.cpp:13:1: error: stray '\302' in program
masini.cpp:13:1: error: stray '\240' in program
masini.cpp:13:1: error: stray '\302' in program
masini.cpp:13:1: error: stray '\240' in program
masini.cpp:14:1: error: stray '\302' in program
         fin>>a[i];

 ^
masini.cpp:14:1: error: stray '\240' in program
masini.cpp:14:1: error: stray '\302' in program
masini.cpp:14:1: error: stray '\240' in program
masini.cpp:14:1: error: stray '\302' in program
masini.cpp:14:1: error: stray '\240' in program
masini.cpp:14:1: error: stray '\302' in program
masini.cpp:14:1: error: stray '\240' in program
masini.cpp:14:1: error: stray '\302' in program
masini.cpp:14:1: error: stray '\240' in program
masini.cpp:14:1: error: stray '\302' in program
masini.cpp:14:1: error: stray '\240' in program
masini.cpp:14:1: error: stray '\302' in program
masini.cpp:14:1: error: stray '\240' in program
masini.cpp:16:1: error: stray '\302' in program
     sort(a, a + n);

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

 ^
masini.cpp:17:1: error: stray '\240' in program
masini.cpp:17:1: error: stray '\302' in program
masini.cpp:17:1: error: stray '\240' in program
masini.cpp:17:1: error: stray '\302' in program
masini.cpp:17:1: error: stray '\240' in program
masini.cpp:18:1: error: stray '\302' in program
         {

 ^
masini.cpp:18:1: error: stray '\240' in program
masini.cpp:18:1: error: stray '\302' in program
masini.cpp:18:1: error: stray '\240' in program
masini.cpp:18:1: error: stray '\302' in program
masini.cpp:18:1: error: stray '\240' in program
masini.cpp:18:1: error: stray '\302' in program
masini.cpp:18:1: error: stray '\240' in program
masini.cpp:18:1: error: stray '\302' in program
masini.cpp:18:1: error: stray '\240' in program
masini.cpp:18:1: error: stray '\302' in program
masini.cpp:18:1: error: stray '\240' in program
masini.cpp:18:1: error: stray '\302' in program
masini.cpp:18:1: error: stray '\240' in program
masini.cpp:19:1: error: stray '\302' in program
             s += a[i];

 ^
masini.cpp:19:1: error: stray '\240' in program
masini.cpp:19:1: error: stray '\302' in program
masini.cpp:19:1: error: stray '\240' in program
masini.cpp:19:1: error: stray '\302' in program
masini.cpp:19:1: error: stray '\240' in program
masini.cpp:19:1: error: stray '\302' in program
masini.cpp:19:1: error: stray '\240' in program
masini.cpp:19:1: error: stray '\302' in program
masini.cpp:19:1: error: stray '\240' in program
masini.cpp:19:1: error: stray '\302' in program
masini.cpp:19:1: error: stray '\240' in program
masini.cpp:19:1: error: stray '\302' in program
masini.cpp:19:1: error: stray '\240' in program
masini.cpp:19:1: error: stray '\302' in program
masini.cpp:19:1: error: stray '\240' in program
masini.cpp:19:1: error: stray '\302' in program
masini.cpp:19:1: error: stray '\240' in program
masini.cpp:19:1: error: stray '\302' in program
masini.cpp:19:1: error: stray '\240' in program
masini.cpp:19:1: error: stray '\302' in program
masini.cpp:19:1: error: stray '\240' in program
masini.cpp:20:1: error: stray '\302' in program
             if(s <= T)

 ^
masini.cpp:20:1: error: stray '\240' in program
masini.cpp:20:1: error: stray '\302' in program
masini.cpp:20:1: error: stray '\240' in program
masini.cpp:20:1: error: stray '\302' in program
masini.cpp:20:1: error: stray '\240' in program
masini.cpp:20:1: error: stray '\302' in program
masini.cpp:20:1: error: stray '\240' in program
masini.cpp:20:1: error: stray '\302' in program
masini.cpp:20:1: error: stray '\240' in program
masini.cpp:20:1: error: stray '\302' in program
masini.cpp:20:1: error: stray '\240' in program
masini.cpp:20:1: error: stray '\302' in program
masini.cpp:20:1: error: stray '\240' in program
masini.cpp:20:1: error: stray '\302' in program
masini.cpp:20:1: error: stray '\240' in program
masini.cpp:20:1: error: stray '\302' in program
masini.cpp:20:1: error: stray '\240' in program
masini.cpp:20:1: error: stray '\302' in program
masini.cpp:20:1: error: stray '\240' in program
masini.cpp:20:1: error: stray '\302' in program
masini.cpp:20:1: error: stray '\240' in program
masini.cpp:21:1: error: stray '\302' in program
                 cnt++;

 ^
masini.cpp:21:1: error: stray '\240' in program
masini.cpp:21:1: error: stray '\302' in program
masini.cpp:21:1: error: stray '\240' in program
masini.cpp:21:1: error: stray '\302' in program
masini.cpp:21:1: error: stray '\240' in program
masini.cpp:21:1: error: stray '\302' in program
masini.cpp:21:1: error: stray '\240' in program
masini.cpp:21:1: error: stray '\302' in program
masini.cpp:21:1: error: stray '\240' in program
masini.cpp:21:1: error: stray '\302' in program
masini.cpp:21:1: error: stray '\240' in program
masini.cpp:21:1: error: stray '\302' in program
masini.cpp:21:1: error: stray '\240' in program
masini.cpp:21:1: error: stray '\302' in program
masini.cpp:21:1: error: stray '\240' in program
masini.cpp:21:1: error: stray '\302' in program
masini.cpp:21:1: error: stray '\240' in program
masini.cpp:21:1: error: stray '\302' in program
masini.cpp:21:1: error: stray '\240' in program
masini.cpp:21:1: error: stray '\302' in program
masini.cpp:21:1: error: stray '\240' in program
masini.cpp:21:1: error: stray '\302' in program
masini.cpp:21:1: error: stray '\240' in program
masini.cpp:21:1: error: stray '\302' in program
masini.cpp:21:1: error: stray '\240' in program
masini.cpp:21:1: error: stray '\302' in program
masini.cpp:21:1: error: stray '\240' in program
masini.cpp:21:1: error: stray '\302' in program
masini.cpp:21:1: error: stray '\240' in program
masini.cpp:22:1: error: stray '\302' in program
             else

 ^
masini.cpp:22:1: error: stray '\240' in program
masini.cpp:22:1: error: stray '\302' in program
masini.cpp:22:1: error: stray '\240' in program
masini.cpp:22:1: error: stray '\302' in program
masini.cpp:22:1: error: stray '\240' in program
masini.cpp:22:1: error: stray '\302' in program
masini.cpp:22:1: error: stray '\240' in program
masini.cpp:22:1: error: stray '\302' in program
masini.cpp:22:1: error: stray '\240' in program
masini.cpp:22:1: error: stray '\302' in program
masini.cpp:22:1: error: stray '\240' in program
masini.cpp:22:1: error: stray '\302' in program
masini.cpp:22:1: error: stray '\240' in program
masini.cpp:22:1: error: stray '\302' in program
masini.cpp:22:1: error: stray '\240' in program
masini.cpp:22:1: error: stray '\302' in program
masini.cpp:22:1: error: stray '\240' in program
masini.cpp:22:1: error: stray '\302' in program
masini.cpp:22:1: error: stray '\240' in program
masini.cpp:22:1: error: stray '\302' in program
masini.cpp:22:1: error: stray '\240' in program
masini.cpp:23:1: error: stray '\302' in program
                 break;

 ^
masini.cpp:23:1: error: stray '\240' in program
masini.cpp:23:1: error: stray '\302' in program
masini.cpp:23:1: error: stray '\240' in program
masini.cpp:23:1: error: stray '\302' in program
masini.cpp:23:1: error: stray '\240' in program
masini.cpp:23:1: error: stray '\302' in program
masini.cpp:23:1: error: stray '\240' in program
masini.cpp:23:1: error: stray '\302' in program
masini.cpp:23:1: error: stray '\240' in program
masini.cpp:23:1: error: stray '\302' in program
masini.cpp:23:1: error: stray '\240' in program
masini.cpp:23:1: error: stray '\302' in program
masini.cpp:23:1: error: stray '\240' in program
masini.cpp:23:1: error: stray '\302' in program
masini.cpp:23:1: error: stray '\240' in program
masini.cpp:23:1: error: stray '\302' in program
masini.cpp:23:1: error: stray '\240' in program
masini.cpp:23:1: error: stray '\302' in program
masini.cpp:23:1: error: stray '\240' in program
masini.cpp:23:1: error: stray '\302' in program
masini.cpp:23:1: error: stray '\240' in program
masini.cpp:23:1: error: stray '\302' in program
masini.cpp:23:1: error: stray '\240' in program
masini.cpp:23:1: error: stray '\302' in program
masini.cpp:23:1: error: stray '\240' in program
masini.cpp:23:1: error: stray '\302' in program
masini.cpp:23:1: error: stray '\240' in program
masini.cpp:23:1: error: stray '\302' in program
masini.cpp:23:1: error: stray '\240' in program
masini.cpp:24:1: error: stray '\302' in program
         }

 ^
masini.cpp:24:1: error: stray '\240' in program
masini.cpp:24:1: error: stray '\302' in program
masini.cpp:24:1: error: stray '\240' in program
masini.cpp:24:1: error: stray '\302' in program
masini.cpp:24:1: error: stray '\240' in program
masini.cpp:24:1: error: stray '\302' in program
masini.cpp:24:1: error: stray '\240' in program
masini.cpp:24:1: error: stray '\302' in program
masini.cpp:24:1: error: stray '\240' in program
masini.cpp:24:1: error: stray '\302' in program
masini.cpp:24:1: error: stray '\240' in program
masini.cpp:24:1: error: stray '\302' in program
masini.cpp:24:1: error: stray '\240' in program
masini.cpp:25:1: error: stray '\302' in program
     fout<<cnt;

 ^
masini.cpp:25:1: error: stray '\240' in program
masini.cpp:25:1: error: stray '\302' in program
masini.cpp:25:1: error: stray '\240' in program
masini.cpp:25:1: error: stray '\302' in program
masini.cpp:25:1: error: stray '\240' in program
masini.cpp:26:1: error: stray '\302' in program
     return 0;

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