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 ...
随机推荐
- 【XSY2754】求和 莫比乌斯反演 杜教筛
题目描述 给你\(n,p\),求 \[ \sum_{i=1}^n\sum_{j=1}^i\sum_{k=1}^i\gcd(i,j,k)\mod p \] \(n\leq {10}^9\) 题解 \[ ...
- Codeforces Round #545 (Div. 2) D
链接:http://codeforces.com/contest/1138/problem/D 啊啊啊啊啊啊,自闭啊,比赛的时候判断条件 if(s1[i-1]=='0') aa++;写成了 if(s1 ...
- C#常用的命名规则汇总
C#常用的命名规则汇总 来源 https://www.cnblogs.com/pengyouqiang88/p/5021128.html 本文转载自脚本之家 本文详细汇总了C#常用的命名规则.分享给大 ...
- 09 Zabbix4.0系统clone、mass update使用
点击返回:自学Zabbix之路 点击返回:自学Zabbix4.0之路 点击返回:自学zabbix集锦 09 Zabbix4.0系统clone.mass update使用 1. clone使用: clo ...
- 环境变量PS1,修改命令行提示符样式
推荐模板 export PS1="\[\e[37;40m\][\[\e[31;40m\]\u\[\e[0m@\[\e[33;40m\]\H \[\e[36;40m\]\w\[\e[0m\] ...
- 【HDU3595】GG and MM(博弈论)
[HDU3595]GG and MM(博弈论) 题面 HDU 一个游戏由多个游戏组成,每次每个操作者必须操作所有可以操作的游戏,操作集合为空者输. 每个游戏由两堆石子组成,每次可以从较多的那一堆中取走 ...
- 【CF809D】Hitchhiking in the Baltic States(Splay,动态规划)
[CF809D]Hitchhiking in the Baltic States(Splay,动态规划) 题面 CF 洛谷 题解 朴素\(dp\):设\(f[i][j]\)表示当前考虑到第\(i\)个 ...
- HR_Jumping on the Clouds
1.没有考虑i+2越界的问题 2.没有考虑结尾三个零导致 -5 3.没有考虑len(c)<2 导致 -5 #!/bin/python3 import math import os import ...
- Vagrant 遇到的问题
Vagrant was unable to mount VirtualBox shared folders. This is usuallybecause the filesystem "v ...
- 洛谷P1072 Hankson的趣味题
这是个NOIP原题... 题意: 给定 a b c d 求 gcd(a, x) = b && lcm(c, x) = d 的x的个数. 可以发现一个朴素算法是从b到d枚举,期望得分50 ...