
Maxsubseq- obs
By:
out_of_theblue10 on
May 15th, 2012 | syntax:
C++ | size: 0.26 KB | hits: 25 | expires: Never
#include <fstream>
#include <iostream>
using namespace std;
int i,x,n;
int main()
{
ifstream fi("max.in");
ofstream fo("max.out");
cin>>n;
for(i=1;i<=n;i++)
{
if(i%2) x=-1; else x=1;
x*=(((i-1)%3)+1);
fo<<x<<" ";
}
return 0;
}