Monday, August 8, 2016

Codeforces 705B Spider Man Solution

Unknown
#include<cstdio>
#include<cmath>
using namespace std;

int main()
{
    int n;
    while (scanf("%d",&n)!=EOF)
    {
        int a,temp=0;
        while (n--)
        {
            scanf("%d",&a);
            temp=(temp+a-1)%2;
            if (temp) printf("1\n");
            else printf("2\n");
        }
    }
    return 0;
}

Unknown

Studying at Shahjalal University of Science and Technology, Sylhet.

0 comments:

Post a Comment

Coprights @ 2016,