ACM-ICPC 2018 焦作赛区网络预赛 A Magic Mirror(签到)
https://nanti.jisuanke.com/t/31710
题意
若输入的是Jessie或jessie,输出Good guy!,否则输出Dare you say that again?
分析
水题,学习一下string直接转小写的操作,方便。
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 1e5 + ; int main(){
int t;
cin>>t;
string s;
while(t--){
cin>>s;
transform(s.begin(),s.end(),s.begin(),::tolower);
if(s=="jessie") puts("Good guy!");
else puts("Dare you say that again?");
}
return ;
}
ACM-ICPC 2018 焦作赛区网络预赛 A Magic Mirror(签到)的更多相关文章
- ACM-ICPC 2018 焦作赛区网络预赛- G:Give Candies(费马小定理,快速幂)
There are N children in kindergarten. Miss Li bought them NNN candies. To make the process more inte ...
- ACM-ICPC 2018 焦作赛区网络预赛- L:Poor God Water(BM模板/矩阵快速幂)
God Water likes to eat meat, fish and chocolate very much, but unfortunately, the doctor tells him t ...
- ACM-ICPC 2018 焦作赛区网络预赛
这场打得还是比较爽的,但是队友差一点就再过一题,还是难受啊. 每天都有新的难过 A. Magic Mirror Jessie has a magic mirror. Every morning she ...
- ACM-ICPC 2018 焦作赛区网络预赛J题 Participate in E-sports
Jessie and Justin want to participate in e-sports. E-sports contain many games, but they don't know ...
- ACM-ICPC 2018 焦作赛区网络预赛 K题 Transport Ship
There are NN different kinds of transport ships on the port. The i^{th}ith kind of ship can carry th ...
- ACM-ICPC 2018 焦作赛区网络预赛 L 题 Poor God Water
God Water likes to eat meat, fish and chocolate very much, but unfortunately, the doctor tells him t ...
- ACM-ICPC 2018 焦作赛区网络预赛 I题 Save the Room
Bob is a sorcerer. He lives in a cuboid room which has a length of AA, a width of BB and a height of ...
- ACM-ICPC 2018 焦作赛区网络预赛 H题 String and Times(SAM)
Now you have a string consists of uppercase letters, two integers AA and BB. We call a substring won ...
- ACM-ICPC 2018 焦作赛区网络预赛 G题 Give Candies
There are NN children in kindergarten. Miss Li bought them NN candies. To make the process more inte ...
随机推荐
- Android 简单天气预报
IDE: Android studio3.1.2 界面: activity_main.xml
- 聊聊openjdk的BufferPoolMXBean
本文主要研究一下openjdk的BufferPoolMXBean PlatformManagedObjectjava.management/java/lang/management/PlatformM ...
- 部署KVM
1.安装前准备1)服务器或者PC的CPU能支持VT技术2)虚拟机中安装KVM要勾选:处理器:虚拟化Intel VT-x/EPT或AMD-V/RVI(V)[root@localhost ~]# cat ...
- luogu4602 混合果汁 (主席树)
按照美味值从大到小排序,对于每个询问,我想二分找到一个前缀来满足条件 那么以单价为下标建主席树,维护区间的最大体积和 以及满足这个最大体积需要的价钱 然后二分答案,再在主席树上二分,找到恰好满足的那个 ...
- luogu3242 接水果 (整体二分+树状数组)
考虑整体二分,问题就变成了每个(水果)路径有多少个满足条件(权值)的(盘子)子路径 考虑一个盘子(a,b)表示两端点(不妨设dfn[a]<dfn[b]),那么他能接到的水果(u,v)一定满足(不 ...
- hdu 1024 Max Sum Plus Plus(m段最大和)
Problem Description Now I think you have got an AC in Ignatius.L's "Max Sum" problem. To b ...
- A1043. Is It a Binary Search Tree
A Binary Search Tree (BST) is recursively defined as a binary tree which has the following propertie ...
- 斯坦福大学公开课机器学习: neural networks learning - autonomous driving example(通过神经网络实现自动驾驶实例)
使用神经网络来实现自动驾驶,也就是说使汽车通过学习来自己驾驶. 下图是通过神经网络学习实现自动驾驶的图例讲解: 左下角是汽车所看到的前方的路况图像.左上图,可以看到一条水平的菜单栏(数字4所指示方向) ...
- ubuntu vim01
不小心按了ctrl+s(停止向终端输入),解决办法ctrl+q(恢复向终端输入)
- JS引用类型
a,b都是引用类型,它们实际上指向同一个内存空间,同呼吸共命运