Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
判断数组是否满足条件的函数aint filter(int p[],int n) { int i,point=0,temp=p[0]; for(i=1;i<n;i++) { if(p[i]!=temp) {temp=p[i];point++;} } if(point<=2) return 1; else return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator