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> ...
随机推荐
- Gas Station,转化为求最大序列的解法,和更简单简单的Jump解法。——贪心、转化
Gas Station There are N gas stations along a circular route, where the amount of gas at station i is ...
- Python正則表達式:怎样使用正則表達式
正則表達式(简称RE)本质上能够看作一个小的.高度专业化的编程语言,在Python中能够通过re模块使用它.使用正則表達式,你须要为想要匹配的字符串集合指定一套规则,字符串集合能够包括英文句子.e-m ...
- Intel HEX文件解析
近期有一个需求就是为Arduino开发板做一个基于蓝牙的无线烧录程序.眼下的Arduino程序都是通过USB线连接到电脑的主机上,实际的传输过程是基于USB协议的,这个过程还是比較麻烦的.由于每次的编 ...
- Javascript中没有引用传递,只有按值传递
很多人,包括我,受书本知识消化不彻底的影响,认为 JS 中参数有两种传递方式:数字.字符串等按值传递:数组.对象等按地址(引用)传递.对此种观点,我们要谨慎. var v1 = [] var v2 = ...
- directdraw 显示yuv
http://www.cnblogs.com/lidan/archive/2012/03/23/2413772.html http://www.yirendai.com/msd/
- xcode4中build Settings常见参数解析
本文转载至 http://shiminghua234.blog.163.com/blog/static/263912422012411103526386/ 1.Installation Dir ...
- CentOS笔记-目录结构(转载了菜鸟教程里的)
在linux系统中,有几个目录是比较重要的,平时需要注意不要误删除或者随意更改内部文件. /etc: 上边也提到了,这个是系统中的配置文件,如果你更改了该目录下的某个文件可能会导致系统不能启动. /b ...
- 【bzoj4240】有趣的家庭菜园
只要统计每一个左右分别有多少比他高的去min,然后求和 #include<algorithm> #include<iostream> #include<cstdlib&g ...
- 【POJ3740】Easy Finding DLX(Dancing Links)精确覆盖问题
题意:多组数据,每组数据给你几行数,要求选出当中几行.使得每一列都有且仅有一个1.询问是可不可行,或者说能不能找出来. 题解:1.暴搜.2.DLX(Dancing links). 本文写的是DLX. ...
- virtualbox创建centos7虚拟机
安装Virtualbox 下载安装: 直接到官网上下载,https://www.virtualbox.org/wiki/Downloads 然后一键傻瓜式的安装即可. 设置默认虚拟电脑位置: 管理=& ...