简单判断。

分别判断每个单词是几面体,加起来就是答案。

#include <cstdio>
#include <cmath>
#include <cstring>
#include <map>
#include <algorithm>
using namespace std; int n;
char s[1000];
int sum; int main()
{
scanf("%d",&n);
for(int i=1;i<=n;i++)
{
scanf("%s",s);
if(s[0]=='T') sum+=4;
if(s[0]=='C') sum+=6;
if(s[0]=='O') sum+=8;
if(s[0]=='D') sum+=12;
if(s[0]=='I') sum+=20; }
printf("%d\n",sum);
return 0;
}

CodeForces 785A Anton and Polyhedrons的更多相关文章

  1. Codeforces Round #404 (Div. 2) A - Anton and Polyhedrons 水题

    A - Anton and Polyhedrons 题目连接: http://codeforces.com/contest/785/problem/A Description Anton's favo ...

  2. 【codeforces 785A】Anton and Polyhedrons

    [题目链接]:http://codeforces.com/contest/785 [题意] 给你各种形状的物体; 然后让你计算总的面数; [题解] 用map来记录各种物体本该有的面数; 读入各种物体; ...

  3. Codeforces 734E. Anton and Tree 搜索

    E. Anton and Tree time limit per test: 3 seconds memory limit per test :256 megabytes input:standard ...

  4. Codeforces 593B Anton and Lines

    LINK time limit per test 1 second memory limit per test 256 megabytes input standard input output st ...

  5. Codeforces 734F Anton and School(位运算)

    [题目链接] http://codeforces.com/problemset/problem/734/F [题目大意] 给出数列b和数列c,求数列a,如果不存在则输出-1 [题解] 我们发现: bi ...

  6. [刷题]Codeforces 785D - Anton and School - 2

    Description As you probably know, Anton goes to school. One of the school subjects that Anton studie ...

  7. Codeforces 785D - Anton and School - 2 - [范德蒙德恒等式][快速幂+逆元]

    题目链接:https://codeforces.com/problemset/problem/785/D 题解: 首先很好想的,如果我们预处理出每个 "(" 的左边还有 $x$ 个 ...

  8. Codeforces 584E - Anton and Ira - [贪心]

    题目链接:https://codeforces.com/contest/584/problem/E 题意: 给两个 $1 \sim n$ 的排列 $p,s$,交换 $p_i,p_j$ 两个元素需要花费 ...

  9. Codeforces 785E. Anton and Permutation

    题目链接:http://codeforces.com/problemset/problem/785/E 其实可以CDQ分治... 我们只要用一个数据结构支持单点修改,区间查询比一个数大(小)的数字有多 ...

随机推荐

  1. Ubuntu 火狐浏览器中,鼠标选择文字被删除的解决办法

    copy from :http://blog.csdn.net/shadow066/article/details/50628019 在终端中输入命令:ibus-setup 将 “在应用程序窗口中启用 ...

  2. JS函数表达的几种写法

    arguments数组形式的  用于函数  比如不知道参数有多少个或者不固定那么用到arguments function show(){ //alert(arguments.;length); ale ...

  3. ZOJ 3774 Fibonacci的K次方和

    In mathematics, Fibonacci numbers or Fibonacci series or Fibonacci sequence are the numbers of the f ...

  4. C++类四个默认函数&深复制&浅复制

    学习C++语言的同学都知道,C++中类是有默认的几个函数的,主要是有四个函数: 四个函数 默认构造函数:A(void),无参构造函数 拷贝(复制)构造函数:A(const A&a).用一个对象 ...

  5. Web中的宽和高

    不同的宽高定义 //网页可见区域宽 document.body.clientWidth //网页可见区域高 document.body.clientHeight //网页可见区域宽(包括边线和滚动条的 ...

  6. asp.net中模拟测试smtp发邮件

    最近在编程人生里要测试一个会员邮件的功能,就写了下面的代码. 在asp.net 中,有时要测试发信SMTP,但如果在单元测试中,如果没方便好用的 smtp怎么办,其实还是有办法模拟的,下面讲解下: 在 ...

  7. 【洛谷 P2512】 [HAOI2008]糖果传递(贪心)

    题目链接 环形均分纸牌. 设平均数为\(ave\),\(g[i]=a[i]-ave\),\(s[i]=\sum_{j=1}^ig[i]\). 设\(s\)的中位数为\(s[k]\),则答案为\(\su ...

  8. CAD启动提示"是否关闭命令行"不管点击什么,都会闪退的解决办法

    AutoCAD splash screen starts up and then closes   AutoCAD splash screen starts up and then closes (S ...

  9. filezilla显示隐藏文件

    我们在习惯使用flashfxp等工具,但是随着主机商限制较多,这些老的FTP工具不怎么好用了,比如主机商会推荐使用到Filezilla等工具.但是比如息壤主机,我们在管理linux环境下htacess ...

  10. Ice Cream Tower Gym - 101194D (贪心 + 二分 )

    题目链接 : https://cn.vjudge.net/problem/Gym-101194D 题目大意 : 给你n个冰激凌球,让你用这些冰激凌球去垒冰激凌,要求是下面的这一个必须是他上面一个的两倍 ...