两层while循环不要只用一个break哦 while(l1if(ans==(n+m-1)/2){flag=1;answ=a[l1];break;}ans++; l1++;}while(l2=b[l2]){if(ans==(n+m-1)/2){flag=1;answ=b[l2];break;}ans++;l2++;}if(flag==1)break; Other 2024-05-13 40 点赞 0 评论 60 浏览