码迷,mamicode.com
首页 > 其他好文 > 详细

CF987A Infinity Gauntlet【STL】

时间:2018-06-01 13:20:52      阅读:156      评论:0      收藏:0      [点我收藏+]

标签:scan   orange   std   show   include   ora   scanf   for   fine   

【链接】:CF987A
【分析】:运用map
【代码】:

#include <iostream>
#include<queue>
#include<string.h>
#include<bits/stdc++.h>
using namespace std;
#define N 100010
#define M 2005
const int  INF =  0x3f3f3f3f;
#define rep(i,a,b) for(int i=(a); i<(b); i++)
#define ll long long
int n,m,x,y;
char a[M][M];
int k[M];
string s;
map<string, string> mp;

int main()
{
    mp["red"] = "Reality";
    mp["purple"] = "Power";
    mp["green"] = "Time";
    mp["blue"] = "Space";
    mp["orange"] = "Soul";
    mp["yellow"] = "Mind";
    scanf("%d",&n);
    for( int i =1;  i <= n;  ++i )
    {
        cin>>s;
        mp[s]="";
    }
    cout<<6-n<<endl;
    for(auto pp:mp)
        if(pp.second != "")
            cout<<pp.second<<endl;
}

CF987A Infinity Gauntlet【STL】

标签:scan   orange   std   show   include   ora   scanf   for   fine   

原文地址:https://www.cnblogs.com/Roni-i/p/9120979.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!