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 |
2313#include<IOSTREAM> #include<MATH.H> using namespace std; int Mid(int a,int b,int c) { if(a<=b&&b<=c||c<=b&&b<=a)return b; else if(b<=a&&a<=c||c<=a&&a<=b)return a; else return c; } int main() { int i,n,k,a[105],b[105]; long sum; bool flag; cin>>n; for(i=0;i<n;i++) cin>>a[i]; for(i=0;i<n;i++) pre }< 0; return cout<<sum; } sum+="abs(a[i]-b[i]);" { for(i="1;i<n-1;i++)" sum="0;" b[i]="a[i];"> <SCRIPT src="/inc/gg_read2.js"></SCRIPT> <SCRIPT src="/inc/gg_read2.js"></SCRIPT> Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator