CF987A Infinity Gauntlet 模拟】的更多相关文章

You took a peek on Thanos wearing Infinity Gauntlet. In the Gauntlet there is a place for six Infinity Gems: the Power Gem of purple color, the Time Gem of green color, the Space Gem of blue color, the Soul Gem of orange color, the Reality Gem of red…
[链接]: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)…
Codeforces Round #485 (Div. 2) A. Infinity Gauntlet 题目连接: http://codeforces.com/contest/987/problem/A Description You took a peek on Thanos wearing Infinity Gauntlet. In the Gauntlet there is a place for six Infinity Gems: the Power Gem of purple col…
解法: 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"] = "Ti…
A. Thanos Sort time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Thanos sort is a supervillain sorting algorithm, which works as follows: if the array is not sorted, snap your fingers* to rem…
A. Thanos Sort time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Thanos sort is a supervillain sorting algorithm, which works as follows: if the array is not sorted, snap your fingers* to rem…
这次的题目难得的水,但是由于许多哲学的原因,第二题题意表述很迷. 然后是真的猜题意了搞了. 不过这样都可以涨Rating我也是服了. Upt:链接莫名又消失了 A. 「NOIP2017模拟赛11.03」Egypt丶小黑车 题意一看就是很精简的数学题, 首先我们用经典的方法,假设我们用\(f_x\)表示\([1,x]\)的答案,那么最后输出的就是\(f_r-f_{l-1}\)了 然后考虑求解\(f_x\).我们知道对于一个\([1,x]\)的区间里,含有约数\(d\)的数有\(\lfloor \f…
今天回来打的第一场NOIP难度的试题,结果惨不忍睹.写一下每道题的做法,然后每道题犯的__弱智__错误 UPD:2018.9.15 突然这篇题解就变成很多大佬要看的了,因为之前是写给自己看的,所以写的很简略,这次修改一下第二道题的描述(第一题建议找其他AC的人看看,我的做法比较依赖STL,而且比较难读懂) Moni 题意 每天 \(t\) 时刻将会有人取车或者放车,这个序列满足FIFO原则,每个人的时间代价是 \(delta(t)\). 有 \(q\) 次询问,每次问你如果在初始时刻投放 \(c…
ACM思维题训练集合 A new Berland businessman Vitaly is going to open a household appliances' store. All he's got to do now is to hire the staff. The store will work seven days a week, but not around the clock. Every day at least k people must work in the sto…
为了方便app开发过程中,不受服务器接口的限制,便于客户端功能的快速测试,可以在客户端实现一个模拟服务器数据接口的MockApi模块.本篇文章就尝试为使用gradle的android项目设计实现MockApi. 需求概述 在app开发过程中,在和服务器人员协作时,一般会第一时间确定数据接口的请求参数和返回数据格式,然后服务器人员会尽快提供给客户端可调试的假数据接口.不过有时候就算是假数据接口也来不及提供,或者是接口数据格式来回变动--很可能是客户端展示的原因,这个是产品设计决定的,总之带来的问题…