#include #include #include #include struct LIS{ char fname[100]; char sname[100]; }; char keep(struct LIS*,int); void sort(struct LIS*,int); void print(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); print(list,count,places); } return 0; } char keep(struct LIS* list,int places){ int num=places; int stop; int count=0; char fn[100]; for(;stop!=EOF;count++,num--){ stop=fscanf(stdin,"%s %s",list[count].sname,list[count].fname); } count--; return count; } void sort(struct LIS* list,int count){ struct LIS ilusion; char *min; int mini; for(int i=0;i0){ min=list[j].sname; mini=j; } } ilusion=list[i]; list[i]=list[mini]; list[mini]=ilusion; } } void print(struct LIS *list,int count,int places){ int j=0; int nado=places; if(places>count){ nado=count; } if(places>0){ puts("Prijati studenti:"); for(;j0) puts("Neprijati studenti:\n"); for(int i=j;i