Codeforces Round #249 (Div. 2) A. Black Square
水题
#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的更多相关文章
- 模拟 Codeforces Round #249 (Div. 2) C. Cardiogram
题目地址:http://codeforces.com/contest/435/problem/C /* 题意:给一组公式,一组数据,计算得到一系列的坐标点,画出折线图:) 模拟题:蛮恶心的,不过也简单 ...
- Codeforces Round #249 (Div. 2) D. Special Grid 枚举
题目链接: http://codeforces.com/contest/435/problem/D D. Special Grid time limit per test:4 secondsmemor ...
- Codeforces Round #249 (Div. 2) C题,模拟画图 ----未解决!
http://codeforces.com/contest/435/problem/C
- Codeforces Round #249 (Div. 2)B(贪心法)
B. Pasha Maximizes time limit per test 1 second memory limit per test 256 megabytes input standard i ...
- 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 ...
- [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 ...
- Codeforces Round #249 (Div. 2) 总结
D.E还是很难的.....C不想多说什么... A:提意:给出每一组人的个数,以及一次车载容量,求出最少需要多少次才能载走所有的人. water: http://codeforces.com/cont ...
- Codeforces Round #249 (Div. 2) (模拟)
C. Cardiogram time limit per test 1 second memory limit per test 256 megabytes input standard input ...
- Codeforces Round #599 (Div. 2) A. Maximum Square 水题
A. Maximum Square Ujan decided to make a new wooden roof for the house. He has
随机推荐
- php 用户登录验证
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- ArchLinux 安装笔记 --zz
为何安装 ArchLinux 为了更深层次的理解 Linux (其实只是闲的蛋疼 准备安装介质 U盘首选,没有之一.自己的本子是 MBR 的,UEFI 神马的我才不知道呢哼! 制作 U 盘启动: Li ...
- pyinstaller打包pyqt文件
打包pyqt文件 如何将pyqt生成exe的二进制文件呢,pyinstaller就是这样的工具 可以将脚本文件.py 文件转换为编辑后的二进制文件,在进行发布 下面说下,如果打包 一. 安装: 下载地 ...
- 获取Windows下某进程监听的TCP/UDP端口
1.在Windows下用CMD netstat命令可以获得当前进程监听端口号的信息,如netstat -ano可以看到IP.port.状态和监听的PID. 那么可以执行CMD这个进程得到监听的端口号信 ...
- PostgreSQL简单介绍
自从MySQL被Oracle收购以后,PostgreSQL逐渐成为开源关系型数据库的首选. 本文介绍PostgreSQL的安装和基本用法,供初次使用者上手.以下内容基于Debian操作系统,其他操作系 ...
- jquery获取radio和select选中值
//jquery 获取radio选中值 <input type="radio" name="c_type" value="a" > ...
- ARM伪指令,王明学learn
ARM伪指令 在ARM汇编语言程序中里,有一些特殊指令助记符与指令系统的助记符不同,没有相对应的操作码,通常称这些特殊指令助记符为伪指令,他们所完成的操作称为伪操作.伪指令在元程序中的作用是为完成汇编 ...
- iOS沙盒机制的基本操作总结
每个ios程序都有自己的沙盒(sandBox),ios8之后提供沙盒部分开放 我们可以访问沙盒下的文件夹 文件夹包括: 1,documents:保存应用运行时生成的需要持久化的数据 2.tem:保存临 ...
- python学习第二天
dict字典 把数据放入dict:直接赋值.初始化时指定 pop删除key set集合 add添加元素 remove删除元素 字符串str是不可变对象,对字符串的操作都会返回新的字符串 pass 什么 ...
- 【MySQL 安装过程1】顺利安装MySQL完整过程
一.MySQL Sever的安装 1.开始安装: 2.这里就要开始注意,端口号我们的my SQL端口号为3306 3.下面要输入用户名和用户密码.注意,帐号密码 都是 root. 4.下面的最后一页 ...