scanf and printf

/* i dont know anything about scanf and printf pls tell me why i m wrong??*/

#include<stdio.h>
#include

using namespace std;

int main()
{
long n,i,j;
scanf("%l",&n);
long long sum=0;
vector s(n);

 for(i=0;i<n;i++)
      scanf("%ll",&s[i]);

 for(i=0;i<n;i++)
 {
      for(j=i+1;j<n;j++)
      {
           if(s[i]>s[j])
                sum+=s[i]-s[j];
           else
                sum+=s[j]-s[i];
      }

 }
 printf("%ll",sum);

}

You know vector but you know know basic I/O methods? Also, if you dont know, why not go and actually google search about it once? It will help you a lot.