/Given an array, only rotation operation is allowed on array. We can rotate the array as many times as we want. Return the maximum possible of summation of iarr[i].*/
#include
using namespace std;
void rotation(int *arr,int n)
{
int temp=arr[0],i;
for(i=0;i<n-1;i++)
{
arr[i]=arr[i+1];
}
temp = arr[i];
}
void ans(int arr,int n,int answer)
{
for(int i=0;i<n;i++)
{
int answer=0;
answer=answer+iarr[i];
//sum = sum + answer;
}
int maxsum=0;
if(answer>maxsum)
{
maxsum=answer;
rotation(arr,n);
ans(arr,n-1,answer);
}
else
cout<<maxsum;
}
int main()
{
int n,answer;
cin>>n;
int *arr=new int[n];
for(int i=0;i<n;i++)
{
arr[i]=i+1;
}
ans(arr,n,answer);
}