Please correct this code.This is giving an error which i am unable to understand.Please correct it and notify me what was wrong.The link of my solution is given

Link:https://ide.codingblocks.com/s/312142

You have done many major mistakes

Mistakes

  1. taking input for vector of vector is completely wrong
    correct way is
int  x;
    for(int i=0;i<k;i++){
		vector<int>temp;
		for(int j=0;j<n;j++){
			cin>>x;
			temp.push_back(x);
		}
		arr.push_back(temp);
	}
  1. you can’t pass greater to priority queue
    because it doesn’t exist greater exist only of premitive data types not for user define data types
    for your own classes you have to make comparators

  2. in main first you have to take k and then N

you can see all the mistakes in modified Code below

if you want to ask something about this feel free to ask
i hope this helps
if yes show your response with :heart: and don’t forgot to mark doubt as resolved