the next palindrome

`my code is correct,but it’s showing wrong answer please point out where i went wrong.

#include <iostream>
#include <vector>
using namespace std;

bool palindrome(long long x){
	vector<long long> myvec;
	while(x>0){
		myvec.push_back(x%10);
		x=x/10;
	}
	unsigned short j=myvec.size();
	for(long long i=0;i<j/2;i++){
		if(myvec[i]==myvec[j-1-i]){
			continue;
		}
		else return false;
	}
	return true;
}

int main(){
	
	long long  nooftimes,j=0;
	cin >> nooftimes;
	while(j<nooftimes){
		long long x;
		cin >> x;
		x++;
		while(!palindrome(x)){
			x++;
		}
		cout << x << endl;
		j++;
	}
	return 0;
}

I think your logic is correct.

(Although it may has some issues with time limit according to the constraints of the problem)

There may be an error with the precision of (cout) in case of large numbers.

You can try to add this line to the beginning of your main function

cout.precision(x);/* where x is the maximum number of digits in the largest test case*/