Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

2313

Posted by 8246887 at 2011-03-02 13:49:00 on Problem 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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator