Record Detail

Accepted

prepare (1/3): 
finished

make (2/3): 
cc -std=gnu11 -O2 -Wall -o main main.c UF.c UF.h MST.c MST.h
main.c: In function 'main':
main.c:36:36: warning: passing argument 4 of 'qsort' from incompatible pointer type [-Wincompatible-pointer-types]
     qsort(graph,eSize,sizeof(edge),edge_cmp);
                                    ^~~~~~~~
In file included from main.c:2:0:
/usr/include/stdlib.h:827:13: note: expected '__compar_fn_t {aka int (*)(const void *, const void *)}' but argument is of type 'int (*)(edge *, edge *) {aka int (*)(struct _edge *, struct _edge *)}'
 extern void qsort (void *__base, size_t __nmemb, size_t __size,
             ^~~~~
main.c:39:33: warning: passing argument 4 of 'qsort' from incompatible pointer type [-Wincompatible-pointer-types]
     qsort(MST,prim,sizeof(edge),weight_cmp);
                                 ^~~~~~~~~~
In file included from main.c:2:0:
/usr/include/stdlib.h:827:13: note: expected '__compar_fn_t {aka int (*)(const void *, const void *)}' but argument is of type 'int (*)(edge *, edge *) {aka int (*)(struct _edge *, struct _edge *)}'
 extern void qsort (void *__base, size_t __nmemb, size_t __size,
             ^~~~~
main.c:37:9: warning: unused variable 'kruskal' [-Wunused-variable]
     int kruskal = alg_kruskal(eSize);
         ^~~~~~~
main.c:20:5: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&eSize);
     ^~~~~~~~~~~~~~~~~~
main.c:21:5: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&vSize);
     ^~~~~~~~~~~~~~~~~~
main.c:30:9: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d %d %d", &v1, &v2, &w);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main successfully constructed
finished

clean (3/3): 
finished

all task finished, build successfully
# Status Time Cost Memory Cost
#1 Accepted Detail 1ms 216.0 KiB
#2 Accepted Detail 2ms 332.0 KiB
#3 Accepted Detail 2ms 376.0 KiB
#4 Accepted Detail 2ms 356.0 KiB
#5 Accepted Detail 2ms 376.0 KiB

Information

Submit By
Type
Submission
Homework
Lab 2
Language
GNU Make
Submit At
2020-09-26 23:39:07
Judged At
2021-08-19 01:23:30
Judged By
Score
100
Total Time
11ms
Peak Memory
376.0 KiB