水题

#include <iostream>
#include <vector>
#include <algorithm> using namespace std; int main(){
vector<int> a(4);
cin >> a[0] >> a[1]>>a[2]>>a[3];
string str;
cin >> str;
int res = 0;
for(int i = 0 ; i < str.length(); ++ i) res+=a[str[i]-'0'-1];
cout<<res<<endl; }

  

Codeforces Round #249 (Div. 2) A. Black Square的更多相关文章

  1. 模拟 Codeforces Round #249 (Div. 2) C. Cardiogram

    题目地址:http://codeforces.com/contest/435/problem/C /* 题意:给一组公式,一组数据,计算得到一系列的坐标点,画出折线图:) 模拟题:蛮恶心的,不过也简单 ...

  2. Codeforces Round #249 (Div. 2) D. Special Grid 枚举

    题目链接: http://codeforces.com/contest/435/problem/D D. Special Grid time limit per test:4 secondsmemor ...

  3. Codeforces Round #249 (Div. 2) C题,模拟画图 ----未解决!

    http://codeforces.com/contest/435/problem/C

  4. Codeforces Round #249 (Div. 2)B(贪心法)

    B. Pasha Maximizes time limit per test 1 second memory limit per test 256 megabytes input standard i ...

  5. Codeforces Round #249 (Div. 2) A题

    链接:http://codeforces.com/contest/435/problem/A   A. Queue on Bus Stop time limit per test 1 second m ...

  6. [Codeforces Round #247 (Div. 2)] A. Black Square

    A. Black Square time limit per test 1 second memory limit per test 256 megabytes input standard inpu ...

  7. Codeforces Round #249 (Div. 2) 总结

    D.E还是很难的.....C不想多说什么... A:提意:给出每一组人的个数,以及一次车载容量,求出最少需要多少次才能载走所有的人. water: http://codeforces.com/cont ...

  8. Codeforces Round #249 (Div. 2) (模拟)

    C. Cardiogram time limit per test 1 second memory limit per test 256 megabytes input standard input ...

  9. Codeforces Round #599 (Div. 2) A. Maximum Square 水题

    A. Maximum Square Ujan decided to make a new wooden roof for the house. He has

随机推荐

  1. AXURE在原型设计中的应用

    转: http://uedc.163.com/2248.html 前言 什么是原型呢? 产品原型简单的说就是产品设计成形之前的一个简单框架,对网站来讲,就是将页面模块.元素进行粗放式的排版和布局,深入 ...

  2. <转>ORA-06413 连接未打开错误

    ORA-06413 Connection not open.Cause: Unable to establish connection.Action: Use diagnostic procedure ...

  3. CI登录验证

    预先加载数据库操作类和Session类 即在autoload.php中,$autoload['libraries'] = array('database', 'session'); a. 注: 使用s ...

  4. VisualStudio一打开工程就崩溃-重打开output显示We were unable to automatically populate your Visual Studio Online accounts.

    and this method exactly effected on me

  5. JAVA Day6

    1.对象:用来描述客观事物的一个实体,由一组属性和方法组成 2.属性--对象具有的各种特征    *每个对象的每个属性都拥有特定值    *例如:张浩和李明的年龄.姓名不一样 3.方法--对象执行的操 ...

  6. 重写ViewPager方法,防止滑动广告尾页的时候,Fragment也改变! (如果广告设置为轮播的话,不需要重写ViewPager)

    public class MyViewPager extends ViewPager{ public MyViewPager(Context context) { this(context, null ...

  7. jquery replace用法汇总

    //只替换匹配到的第一个目标 var str="Visit Microsoft! Microsoft"document.write(str.replace(/Microsoft/, ...

  8. 分数try catch

    要求:编写一个程序,此程序在运行时要求用户输入一个 整数,代表某门课的考试成绩,程序接着给出“不及格”.“及格”.“中”.“良”.“优”的结论.要求程序必须具备足够的健壮性,不管用户输入什 么样的内容 ...

  9. 手机页面的meta标签

    <meta charset="utf-8"/><meta name="viewport" content="width=device ...

  10. poj2184 01背包变形,价值为可为负数

    题目链接:http://poj.org/problem?id=2184 题意:每行给出si和fi,代表牛的两个属性,然后要求选出几头牛,满足S与F都不能为负数的条件下,使S与F的和最大. tips:动 ...