Codeforces 987A. Infinity Gauntlet(手速题,map存一下输出即可)
解法:
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存一下输出即可)的更多相关文章
- ACM: FZU 2102 Solve equation - 手速题
FZU 2102 Solve equation Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & ...
- 河南省acm第九届省赛--《表达式求值》--栈和后缀表达式的变形--手速题
表达式求值 时间限制:1000 ms | 内存限制:65535 KB 难度:3 描述 假设表达式定义为:1. 一个十进制的正整数 X 是一个表达式.2. 如果 X 和 Y 是 表达式,则 X+Y, ...
- ACM: Gym 101047B Renzo and the palindromic decoration - 手速题
Gym 101047B Renzo and the palindromic decoration Time Limit:2000MS Memory Limit:65536KB 64 ...
- Codeforces Round #485 (Div. 2) A. Infinity Gauntlet
Codeforces Round #485 (Div. 2) A. Infinity Gauntlet 题目连接: http://codeforces.com/contest/987/problem/ ...
- Contest - 2014 SWJTU ACM 手速测试赛(2014.10.31)
题目列表: 2146 Problem A [手速]阔绰的Dim 2147 Problem B [手速]颓废的Dim 2148 Problem C [手速]我的滑板鞋 2149 Problem D [手 ...
- Codeforces Round #378 (Div. 2) D题(data structure)解题报告
题目地址 先简单的总结一下这次CF,前两道题非常的水,可是第一题又是因为自己想的不够周到而被Hack了一次(或许也应该感谢这个hack我的人,使我没有最后在赛后测试中WA).做到C题时看到题目情况非常 ...
- 手速太慢QAQ
显然D是个细节题,但是还剩1h时看眼榜还没人过EF,只好冷静写D,大概思路是任何时候如果min(n,m)<=2,max(n,m)<=4暴搜,否则直接贪心是很对的,即第一步让S.T长度平均化 ...
- http://codeforces.com/gym/100623/attachments E题
http://codeforces.com/gym/100623/attachments E题第一个优化它虽然是镜像对称,但它毕竟是一一对称的,所以可以匹配串和模式串都从头到尾颠倒一下第二个优化,与次 ...
- CF987A Infinity Gauntlet 模拟
You took a peek on Thanos wearing Infinity Gauntlet. In the Gauntlet there is a place for six Infini ...
随机推荐
- DateTime? 定义的日期变量如何format
DateTime? dateTime; dateTime.Value.ToString("yy-MM-dd")
- Linux部署之NFS方式安装系统
1. 让客户端从网络启动并且选择第二项 2. 选择语言 3. 选择键盘布局 4. 选择安装方式为NFS 5. ...
- iproute2+tc notes
iproute2+tc notes The iproute2+tc package allows access to the variety of neat new networking featur ...
- 字符串时间转Date格式
/** * 字符串时间格式转 Date 格式 * @param strDate * @return */ public static Date getDateTimeByStringTime(Stri ...
- AIM Tech Round 5 1028cf(A-E)
AIM Tech Round 5 (codeforces上题目编号是1028)(A-E) ---完全被这次比赛打击,自己真的很渣--- 战况 依旧3题选手 被构造题坑得好惨 稍稍涨了rating,希望 ...
- Django路由中的include
include(module,namespace = None,app_name = None)[source] include(pattern_list) include((pattern_list ...
- JavaFX 的 UI 控件集 ControlsFX
出处:http://www.oschina.net/p/controlsfx JavaFX 的 UI 控件集 ControlsFX ControlsFX 开源项目旨在为 JavaFX 开发提供更多的 ...
- c 最简单的链表
#include <stdio.h> struct node { int data; struct node *next; //指向本身的指针 }; // main() { struct ...
- 封装HttpClient进行http请求与https请求
一.https忽略证书 /** * 用于进行Https请求的HttpClient * * @author joey * */ public class SSLClient { public stati ...
- WinServer-IIS初始安装及发布网站
\aspnet_regiis.exe –i 还有非常重要的一步就是给发布文件夹设置权限,到底设置那一个用户的权限我也没有弄清楚,大概是IIS_IUSERS或者IUSR用户就可以了,我设置完了之后没有反 ...