Detalii evaluare #14148101

Rezumat problemă

Se dau n numere naturale. Să se afișeze al k-lea cel mai mic element din șir.

Detalii

Problema StatisticiOrdine Operații I/O statisticiordine.in/statisticiordine.out
Limita timp 1.5 secunde Limita memorie Total: 16 MB / Stivă 1 MB
Id soluție #14148101 Utilizator Dimișcă Vlad (VDINFO)
Fișier statisticiordine.c Dimensiune 1.18 KB
Data încărcării 22 Februarie 2019, 18:51 Scor / rezultat 0 puncte

Evaluare


Mesaj compilare

statisticiordine.c: In function 'pivot':
statisticiordine.c:16:5: warning: passing argument 1 of 'swap' makes pointer from integer without a cast [enabled by default]
     swap(v[piv],v[dr]);

     ^
statisticiordine.c:4:6: note: expected 'int *' but argument is of type 'unsigned int'
 void swap(int *a,int *b)

      ^
statisticiordine.c:16:5: warning: passing argument 2 of 'swap' makes pointer from integer without a cast [enabled by default]
     swap(v[piv],v[dr]);

     ^
statisticiordine.c:4:6: note: expected 'int *' but argument is of type 'unsigned int'
 void swap(int *a,int *b)

      ^
statisticiordine.c:23:14: warning: pointer targets in passing argument 1 of 'swap' differ in signedness [-Wpointer-sign]
              else swap(&v[p],&v[q]);

              ^
statisticiordine.c:4:6: note: expected 'int *' but argument is of type 'unsigned int *'
 void swap(int *a,int *b)

      ^
statisticiordine.c:23:14: warning: pointer targets in passing argument 2 of 'swap' differ in signedness [-Wpointer-sign]
              else swap(&v[p],&v[q]);

              ^
statisticiordine.c:4:6: note: expected 'int *' but argument is of type 'unsigned int *'
 void swap(int *a,int *b)

      ^
statisticiordine.c:25:5: warning: pointer targets in passing argument 1 of 'swap' differ in signedness [-Wpointer-sign]
     swap(&v[q+1],&v[dr]);

     ^
statisticiordine.c:4:6: note: expected 'int *' but argument is of type 'unsigned int *'
 void swap(int *a,int *b)

      ^
statisticiordine.c:25:5: warning: pointer targets in passing argument 2 of 'swap' differ in signedness [-Wpointer-sign]
     swap(&v[q+1],&v[dr]);

     ^
statisticiordine.c:4:6: note: expected 'int *' but argument is of type 'unsigned int *'
 void swap(int *a,int *b)

      ^
statisticiordine.c: In function 'quick':
statisticiordine.c:38:1: warning: control reaches end of non-void function [-Wreturn-type]
 }

 ^
statisticiordine.c: In function 'main':
statisticiordine.c:46:11: warning: ignoring return value of 'fscanf', declared with attribute warn_unused_result [-Wunused-result]
     fscanf(fin,"%u%u",&n,&k);

           ^
statisticiordine.c:49:15: warning: ignoring return value of 'fscanf', declared with attribute warn_unused_result [-Wunused-result]
         fscanf(fin,"%u",v+i);

               ^

Rezultat evaluare

Test Timp Mesaj evaluare Scor posibil Scor obținut
1 0 secunde Caught fatal signal 11 5 0 Exemplu
2 0 secunde Caught fatal signal 11 5 0
3 0 secunde Caught fatal signal 11 5 0
4 0.004 secunde Caught fatal signal 11 5 0
5 0.004 secunde Caught fatal signal 11 5 0
6 0.008 secunde Caught fatal signal 11 5 0
7 0 secunde Caught fatal signal 11 5 0
8 0.004 secunde Caught fatal signal 11 5 0
9 0.532 secunde Caught fatal signal 11 20 0
10 0.332 secunde Caught fatal signal 11 20 0
11 0.532 secunde Caught fatal signal 11 20 0
Punctaj total 0

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