#include <iostream>
#include <string> using namespace std; int main(){
int n;
cin >> n;
string str;
cin >> str;
long long cnt = , x = ;
for(int i = ; i < n ; ++ i){
if(str[i] == 'B') cnt+=(x << i);
}
cout<<cnt<<endl;
}
 
Codeforces Round #233 (Div. 2)

Codeforces Round #233 (Div. 2) B. Red and Blue Balls的更多相关文章

  1. Codeforces Round #233 (Div. 2) A、Pages

    #include <iostream> using namespace std; int main(){ int n,p,k; cin >> n >> p > ...

  2. Codeforces Round #233 (Div. 2)D. Painting The Wall 概率DP

                                                                                   D. Painting The Wall ...

  3. Codeforces Round #309 (Div. 2) C. Kyoya and Colored Balls 排列组合

    C. Kyoya and Colored Balls Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contes ...

  4. Codeforces Round #309 (Div. 2) C. Kyoya and Colored Balls

    Kyoya Ootori has a bag with n colored balls that are colored with k different colors. The colors are ...

  5. Codeforces Round #446 (Div. 2)

    Codeforces Round #446 (Div. 2) 总体:rating涨了好多,虽然有部分是靠和一些大佬(例如redbag和ShichengXiao)交流的--希望下次能自己做出来2333 ...

  6. Codeforces Round #485 (Div. 2)

    Codeforces Round #485 (Div. 2) https://codeforces.com/contest/987 A #include<bits/stdc++.h> us ...

  7. Codeforces Round #485 (Div. 2) A. Infinity Gauntlet

    Codeforces Round #485 (Div. 2) A. Infinity Gauntlet 题目连接: http://codeforces.com/contest/987/problem/ ...

  8. Codeforces Round #545 (Div. 1) 简要题解

    这里没有翻译 Codeforces Round #545 (Div. 1) T1 对于每行每列分别离散化,求出大于这个位置的数字的个数即可. # include <bits/stdc++.h&g ...

  9. Codeforces Round 536 (Div. 2) (E)

    layout: post title: Codeforces Round 536 (Div. 2) author: "luowentaoaa" catalog: true tags ...

随机推荐

  1. EF – 7.一对多关联

    5.6.8 <一对多关联(上)> 5.6.9 <一对多关联(下)> 一对多的关联,可以说是整个数据库应用程序中最常见的一种关联类型了,因此,必须高度重视这种关联类型CRUD的实 ...

  2. RTP、RTCP及媒体流同步

    转自:http://blog.163.com/liu_nongfu/blog/static/19079414220139169225333/ 一.流媒体简介 流媒体是指在internet中使用流媒体技 ...

  3. Unity3D项目开发一点经验

    我们主要使用3dsmax2010进行制作,输出FBX的类型导入Unity3D中.默认情况下,3dsmax8可以和U3D软件直接融合,自动转换为FBX物体. 注意事项如下: 1.面数控制 在MAX软件中 ...

  4. APP交互

    交互设计基本功!5个值得学习的APP交互方式http://www.uisdc.com/5-interactive-design-worth-learning 移动App交互设计10大趋势–你用到了吗? ...

  5. POJ 1840 Eqs 二分+map/hash

    Description Consider equations having the following form: a1x13+ a2x23+ a3x33+ a4x43+ a5x53=0 The co ...

  6. hdu 3001(状压dp, 3进制)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3001 由于本题中一个点最多能够访问2次,由此可以联想到3进制; visited[i][j]表示在状态i ...

  7. loj 1044(dp+记忆化搜索)

    题目链接:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=26764 思路:dp[pos]表示0-pos这段字符串最少分割的回文 ...

  8. python web编程-CGI帮助web服务器处理客户端编程

    这几篇博客均来自python核心编程 如果你有任何疑问,欢迎联系我或者仔细查看这本书的地20章 另外推荐下这本书,希望对学习python的同学有所帮助 概念预热 eb客户端通过url请求web服务器里 ...

  9. 关于html中的设置body宽高的理解

    有时候看到别人的代码中经常出现在body中设置的宽高,不是很理解,于是自己测试了下,瞬间懂了,废话不多说,直接上代码: 首先创建好一个基本的html文件,设body的背景色为red: 相信大家都知道效 ...

  10. Android学习笔记(一)——安卓开发环境搭建

    安装教程以及资源(2015.11.8最新版):链接:http://pan.baidu.com/s/1kTnOsMr 密码:0ogf