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;
}
原文地址:https://www.cnblogs.com/keyboarder-zsq/p/5934487.html