#include #include #include #include struct LIS{ char fname[100]; int num; }; int spase=0; char keep(struct LIS*,int); void sort(struct LIS*,int); void print(struct LIS*,int,int); void AAAAA(struct LIS*, int,int); int main(){ struct LIS list[100]; int places=0; int k; k=scanf("%d",&places); if(k!=1 || places<=0){ puts("Nespravny vstup"); } else{ int count=keep(list,places); sort(list,count); AAAAA(list,count,places); print(list,count,places); } return 0; } char keep(struct LIS* list,int places){ int count=0; for(;fgets(list[count].fname,100,stdin);){ if(list[count].fname[0]=='\n'){ spase++; list[count].num=-1; } if(list[count].fname[0]!='\n'){ list[count].num=0; count++; } } return count; } void sort(struct LIS* list,int count){ struct LIS ilusion; char *min; char *mickro; int mini; for(int i=0;i0){ min=list[j].fname; mini=j; } } ilusion=list[i]; list[i]=list[mini]; list[mini]=ilusion; } } void print(struct LIS *list,int count,int places){ if(count>0){ if(places>0){ printf("Prijati studenti:\n"); for(int i=0;i0){ fputs(list[i].fname,stdout); } } } if(count-places>0){ printf("Neprijati studenti:\n"); for(int i=0;i