bool isPalindrome(struct ListNode* head)
{
struct ListNode*temp;
int count1=0,count2;
temp=head;
while(temp!=NULL)
{
count1++;//算出长度
temp=temp->next;
}
do
{
if(temp->val!=head->val)return false;
temp=temp->next;
head=head->next;
count2++;
}while(temp->val==head->val||temp!=head);
if(count1%2==0)
{if(count1==count2/2)return true;}
else if(count1%2!=0)
{if((count1+1/2)==count2)return true;}
return false;
}