• Codeforces Round #355 (Div. 2)C


    啊啊啊啊啊啊啊,真的是智障了。。。

    这种题目,没有必要纠结来源。只要知道它的结果的导致直接原因?反正这句话就我听的懂吧。。。

    “>>”/“&”

    #include<cstdio>
    int main()
    {
        int ans=1;
        for(int i=0;i<=1;i++)
            printf("%d
    ",ans&i);
        ans=0;
        for(int i=0;i<=1;i++)
            printf("%d
    ",ans&i);
        ans=12;
        for(int j=0;j<6;j++)
        {
            printf("%d ",(ans>>j));
        }
    }

    贴份代码跑

    #include <iostream>
    #include <stdio.h>
    #include <string.h>
    #include <stack>
    #include <queue>
    #include <map>
    #include <set>
    #include <vector>
    #include <math.h>
    #include <algorithm>
    using namespace std;
    #define LL long long
    #define INF 0x3f3f3f3f
    const double pi = acos(-1.0);
    const int mod = 1e9+7;
    
    const int N=1e2+10;
    
    int getch(char c)
    {
        if(c>='0'&&c<='9')
            return c-'0';
        if(c>='A'&&c<='Z')
            return c-'A'+10;
        if(c>='a'&&c<='z')
            return c-'a'+36;
        if(c=='-')
            return 62;
        if(c=='_')
            return 63;
    }
    int main()
    {
        string ss;
        cin>>ss;
        LL ans=1;
        LL x;
        for(int i=0;i<ss.size();i++)
        {
            x=getch(ss[i]);
            for(int j=0;j<6;j++)
            {
                if(!((x>>j)&1))
                    ans=ans*3%mod;
            }
        }
        cout<<ans<<endl;
    }
  • 相关阅读:
    web前端之jQuery
    java之awt编程
    java连接数据库的基本操作
    实习生应聘经历2018/3/1
    javaweb学习之建立简单网站
    mysql之视图
    71. Simplify Path
    347. Top K Frequent Elements
    7. Reverse Integer
    26. Remove Duplicates from Sorted Array
  • 原文地址:https://www.cnblogs.com/keyboarder-zsq/p/5934487.html
Copyright © 2020-2023  润新知