解法:

  1.先将对应的字符串存入map。

  2.然后将输入的串的second置为空。

  3.输出6-n,输出map中的非空串。

代码:

#include <bits/stdc++.h>
using namespace std;
typedef long long ll; map <string,string> m;
int main(){
m["purple"] = "Power";
m["green"] = "Time";
m["blue"] = "Space";
m["orange"] = "Soul";
m["red"] = "Reality";
m["yellow"] = "Mind";
int n;
cin >> n;
int t = n;
while(n--){
string s;
cin >> s;
m[s] = "";
}
cout << -t << endl;
for(auto t:m){
if(t.second != ""){
cout << t.second << endl;
}
}
return ;
}

Codeforces 987A. Infinity Gauntlet(手速题,map存一下输出即可)的更多相关文章

  1. ACM: FZU 2102 Solve equation - 手速题

     FZU 2102   Solve equation Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & ...

  2. 河南省acm第九届省赛--《表达式求值》--栈和后缀表达式的变形--手速题

    表达式求值 时间限制:1000 ms | 内存限制:65535 KB 难度:3   描述 假设表达式定义为:1. 一个十进制的正整数 X 是一个表达式.2. 如果 X 和 Y 是 表达式,则 X+Y, ...

  3. ACM: Gym 101047B Renzo and the palindromic decoration - 手速题

     Gym 101047B  Renzo and the palindromic decoration Time Limit:2000MS     Memory Limit:65536KB     64 ...

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

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

  5. Contest - 2014 SWJTU ACM 手速测试赛(2014.10.31)

    题目列表: 2146 Problem A [手速]阔绰的Dim 2147 Problem B [手速]颓废的Dim 2148 Problem C [手速]我的滑板鞋 2149 Problem D [手 ...

  6. Codeforces Round #378 (Div. 2) D题(data structure)解题报告

    题目地址 先简单的总结一下这次CF,前两道题非常的水,可是第一题又是因为自己想的不够周到而被Hack了一次(或许也应该感谢这个hack我的人,使我没有最后在赛后测试中WA).做到C题时看到题目情况非常 ...

  7. 手速太慢QAQ

    显然D是个细节题,但是还剩1h时看眼榜还没人过EF,只好冷静写D,大概思路是任何时候如果min(n,m)<=2,max(n,m)<=4暴搜,否则直接贪心是很对的,即第一步让S.T长度平均化 ...

  8. http://codeforces.com/gym/100623/attachments E题

    http://codeforces.com/gym/100623/attachments E题第一个优化它虽然是镜像对称,但它毕竟是一一对称的,所以可以匹配串和模式串都从头到尾颠倒一下第二个优化,与次 ...

  9. CF987A Infinity Gauntlet 模拟

    You took a peek on Thanos wearing Infinity Gauntlet. In the Gauntlet there is a place for six Infini ...

随机推荐

  1. POJ 2536 匈牙利算法

    思路:最大匹配 (很裸) // by SiriusRen #include <cmath> #include <cstdio> #include <cstring> ...

  2. POJ 3020 Hungary

    一道建图题-- // by SiriusRen #include <cstdio> #include <cstring> using namespace std; #defin ...

  3. 用endnote导入bib

    首先一般时候需要把IEEE的style包导入. https://endnote.com/downloads/styles/ 具体方法可参考http://muchong.com/html/201006/ ...

  4. sql:String格式转换为时间进行比较

    字符串的格式为 yyyy-MM-dd HH:mm:ss str_to_date(a.time, '%Y-%m-%d %k:%i') < str_to_date(b.time, '%Y-%m-%d ...

  5. Android PullTorefreshScrollview回到顶部

    列表滑动下面显示按钮,点击按钮回到顶部的功能,一般scrollview会有滑动监听的事件,通过setOnScrollChangeListener()滑动监听滑动的距离来判断是否显示按钮就好了,但是Pu ...

  6. Hibernate框架学习(九)——Criteria语法

    一.语法 1.基本查询 2.条件查询 3.分页查询 4.排序查询 5.统计查询 二.离线查询 1.非离线的Criteria 2.离线的Criteria 3.演示 public class Demo2 ...

  7. windows 2008 中IIS7.0以上如何设置404错误页面

    404错误页面的设置,不仅仅可以提高用户体验度,从SEO方面考虑,也是非常重要的.今天,笔者在这里介绍一下在windows 2008下如何设置404错误页面. 注意:设置404有我这里介绍2种方式,推 ...

  8. struct和class两个关键字的区别

    1. <C++ Primer> 用class和struct关键字定义类的唯一差别在于默认访问级别:默认情况下,struct的成员为public,而class的成员为private. 2. ...

  9. 苹果操作系统名称演变史 新名称macOS

    历史回顾 发布年代 名称 序号 1994-1999 Classic Mac OS 1-9 2001-2011 Mac OS X 10.0-Lion 2012-2015 OS X Mountain Li ...

  10. 关于css3背景图片渐变的规则

    1. Webkit引擎的CSS3径向渐变语法        Webkit引擎下的老版本语法:-webkit-gradient([<type>],[<position> || & ...