#1156
InaltimiQ
Se dau înălțimile a n
copii, numerotați de la 1
la n
, exprimate prin numere naturale. Afișați numerele de ordine ale copiilor în ordinea crescătoare a înălțimii lor.
Pentru sortare se va folosit metoda QuickSort sau MergeSort.
Problema | InaltimiQ | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #43227726 | Utilizator | |
Fișier | inaltimiq.c | Dimensiune | 916 B |
Data încărcării | 08 Aprilie 2023, 17:48 | Scor / rezultat | 0 puncte |
inaltimiq.c: In function 'partionare': inaltimiq.c:21:9: warning: passing argument 1 of 'swap' makes pointer from integer without a cast [enabled by default] swap(v[i],v[j]); ^ inaltimiq.c:8:5: note: expected 'int *' but argument is of type 'int' int swap(int *a, int *b) ^ inaltimiq.c:21:9: warning: passing argument 2 of 'swap' makes pointer from integer without a cast [enabled by default] swap(v[i],v[j]); ^ inaltimiq.c:8:5: note: expected 'int *' but argument is of type 'int' int swap(int *a, int *b) ^ inaltimiq.c:23:5: warning: passing argument 1 of 'swap' makes pointer from integer without a cast [enabled by default] swap(v[i+1], v[dr]); ^ inaltimiq.c:8:5: note: expected 'int *' but argument is of type 'int' int swap(int *a, int *b) ^ inaltimiq.c:23:5: warning: passing argument 2 of 'swap' makes pointer from integer without a cast [enabled by default] swap(v[i+1], v[dr]); ^ inaltimiq.c:8:5: note: expected 'int *' but argument is of type 'int' int swap(int *a, int *b) ^ inaltimiq.c: In function 'citire': inaltimiq.c:6:14: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &v[i]); ^ inaltimiq.c: In function 'swap': inaltimiq.c:13:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ inaltimiq.c: In function 'main': inaltimiq.c:43:10: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result] scanf("%d",&n); ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | Caught fatal signal 11 | 20 | 0 | Exemplu | |
2 | 0 secunde | Caught fatal signal 11 | 40 | 0 | ||
3 | 0 secunde | Caught fatal signal 11 | 40 | 0 | ||
Punctaj total | 0 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema InaltimiQ face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
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ă.