zoukankan      html  css  js  c++  java
  • CodeForces 705B Spider Man

    水题。

    #pragma comment(linker, "/STACK:1024000000,1024000000")
    #include<cstdio>
    #include<cstring>
    #include<cmath>
    #include<algorithm>
    #include<vector>
    #include<map>
    #include<set>
    #include<queue>
    #include<stack>
    #include<iostream>
    using namespace std;
    typedef long long LL;
    const double pi=acos(-1.0),eps=1e-8;
    void File()
    {
        freopen("D:\in.txt","r",stdin);
        freopen("D:\out.txt","w",stdout);
    }
    inline int read()
    {
        char c = getchar();  while(!isdigit(c)) c = getchar();
        int x = 0;
        while(isdigit(c)) { x = x * 10 + c - '0'; c = getchar(); }
        return x;
    }
    
    int n,sum;
    
    int main()
    {
        scanf("%d",&n);
        for(int i=1;i<=n;i++)
        {
            int x; scanf("%d",&x);
            sum=sum+x-1;
            if(sum%2==0) printf("2
    ");
            else printf("1
    ");
        }
        return 0;
    }
  • 相关阅读:
    js函数对象
    jQuery选择器
    js数组
    js知识点
    正则|数字|Format
    Ajax基础
    MVC 打包压缩
    JS(正则|JSON)
    CLR via C#
    Exists/In/Any/All/Contains操作符
  • 原文地址:https://www.cnblogs.com/zufezzt/p/5767476.html
Copyright © 2011-2022 走看看