Codeforces Round #355 (Div. 2)C - Vanya and Label
啊啊啊啊啊啊啊,真的是智障了。。。
这种题目,没有必要纠结来源。只要知道它的结果的导致直接原因?反正这句话就我听的懂吧。。。
“>>”/“&”
#include<cstdio>
int main()
{
int ans=1;
for(int i=0;i<=1;i++)
printf("%d\n",ans&i);
ans=0;
for(int i=0;i<=1;i++)
printf("%d\n",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;
}
Codeforces Round #355 (Div. 2)C - Vanya and Label的更多相关文章
- Codeforces Round #355 (Div. 2) C. Vanya and Label 水题
C. Vanya and Label 题目连接: http://www.codeforces.com/contest/677/problem/C Description While walking d ...
- Codeforces Round #355 (Div. 2) D. Vanya and Treasure 分治暴力
D. Vanya and Treasure 题目连接: http://www.codeforces.com/contest/677/problem/D Description Vanya is in ...
- Codeforces Round #355 (Div. 2) B. Vanya and Food Processor 水题
B. Vanya and Food Processor 题目连接: http://www.codeforces.com/contest/677/problem/B Description Vanya ...
- Codeforces Round #355 (Div. 2) A. Vanya and Fence 水题
A. Vanya and Fence 题目连接: http://www.codeforces.com/contest/677/problem/A Description Vanya and his f ...
- Codeforces Round #355 (Div. 2) D. Vanya and Treasure dp+分块
题目链接: http://codeforces.com/contest/677/problem/D 题意: 让你求最短的从start->...->1->...->2->. ...
- Codeforces Round #355 (Div. 2)-B. Vanya and Food Processor,纯考思路~~
B. Vanya and Food Processor time limit per test 1 second memory limit per test 256 megabytes input s ...
- Codeforces Round #355 (Div. 2) D. Vanya and Treasure
题目大意: 给你一个n × m 的图,有p种宝箱, 每个点上有一个种类为a[ i ][ j ]的宝箱,a[ i ][ j ] 的宝箱里有 a[ i ][ j ] + 1的钥匙,第一种宝箱是没有锁的, ...
- Codeforces Round #355 (Div. 2) B. Vanya and Food Processor
菜菜菜!!!这么撒比的模拟题,听厂长在一边比比比了半天,自己想一想,然后纯模拟一下,中间过程检测一下,妥妥的就可以过. 题意:有N个东西要去搞碎,每个东西有一个高度,然后有一台机器支持里面可以达到的最 ...
- 水题 Codeforces Round #308 (Div. 2) A. Vanya and Table
题目传送门 /* 水题:读懂题目就能做 */ #include <cstdio> #include <iostream> #include <algorithm> ...
随机推荐
- 设计模式C++实现——工厂方法模式
模式定义: 工厂方法模式定义了一个创建对象的接口,但由子类决定要实例化的类是哪一个. 工厂方法让类把实例化推迟到子类. 模式结构: Creator是一个类,它实现了全部操纵产品的方法,但不实现工厂方法 ...
- nc和telnet配合使用
nc -l 9932 -c 用nc监听9932端口 telnet 180.150.184.115 29933 telnet 29932 端口
- Effective C++ 43,44
43.明智地使用多继承. 多继承带来了极大的复杂性.最主要的一条就是二义性. 当派生类为多继承时,其多个基类有同名的成员时,就会出现二义性.通常要明白其使用哪个成员的.显式地限制修饰成员不仅非常笨拙, ...
- 光纤与PON基础概念整理
近期有幸接触到通讯这一领域,此文专门用于整理记录. 首先是光纤与光缆 光纤(OpticalFiber,OF)是用来导光的透明介质纤维,一根有用化的光纤是由多层透明介质构成,一般能够分为三部分:折射率 ...
- Linux安装Axis C构建WebService服务
在安装Axis C++之前有两个组件是必须安装的,分别是Apache HTTP Server以及用于处理XML的程序Xerces:为了编译Axis以及Apache HTTPD,你的Linux机器还应该 ...
- 理解OpenStack认证:Keystone PKI
原文链接: https://www.mirantis.com/blog/understanding-openstack-authentication-keystone-pki/ The latest ...
- TypeError: 'module' object is not callable 原因分析
程序代码 class Person: #constructor def __init__(self,name,sex): self.Name = name self.Sex = sex def ToS ...
- Scaling with Microservices and Vertical Decomposition
Scaling with Microservices and Vertical Decomposition – dev.otto.de https://dev.otto.de/2014/07/29/s ...
- 探索C++的底层机制
探索C++的底层机制 在看这篇文章之前,请你先要明白一点:那就是c++为我们所提供的各种存取控制仅仅是在编译阶段给我们的限制,也就是说是编译器确保了你在完成任务之前的正确行为,如果你的行为不正确,那么 ...
- 微信小程序 navigateTo 传对象参数
当微信小程序navigateTo传入参数是个object时,请使用JSON.strtingify将object转化为字符串,代码如下: wx.navigateTo({ url: '../sendChe ...