Gym
来源:互联网 发布:湖北襄阳农村淘宝招募 编辑:程序博客网 时间:2024/05/22 17:28
手动打表
#include<iostream>#include<algorithm>#include<cstdio>#include<cstdlib>#include<cstring>#include<string>#include<cmath>#include<set>#include<queue>#include<stack>#include<map>#define PI acos(-1.0)#define in freopen("in.txt", "r", stdin)#define out freopen("out.txt", "w", stdout)using namespace std;typedef long long ll;typedef unsigned long long ull;const int maxn = 1000 + 7, maxd = (1<<18)-1, mod = 1e9 + 7;const int INF = 0x7f7f7f7f;char a[30] = {2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 };char b[30] = {0, 1, 0, 1, 0, 0, 0, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0 };int main() {char s[maxn]; while(~scanf("%s", s)) { int n = strlen(s); int ans1 = 0, ans2 = 0; for(int i = 0; i < n; ++i) { if(s[i] >= 'A' && s[i] <= 'Z') { ans1 += (a[s[i]-'A']); ans2 += (b[s[i]-'A']); } else { ans1 += (a[s[i]-'a']); ans2 += (b[s[i]-'a']); } } if(ans1 > ans2) { puts("Kangaroos"); } else if(ans1 == ans2) { puts("Feud continues"); } else puts("Kiwis"); } return 0;}
阅读全文
1 0
- Gym
- Gym
- Gym
- Gym
- Gym
- Gym
- Gym
- Gym
- Gym
- Gym
- Gym
- Gym
- Gym
- Gym
- Gym
- Gym
- Gym
- Gym
- git基本原理详解
- 如何录制/回放使用工具--入门教学
- conda install 速度慢的解决
- web 工程添加日志管理
- Nodejs实现模糊查询
- Gym
- day21笔记
- 5.4年利率1
- 【poj3368 】Frequent values
- 类的加载过程
- Dialog ParentWindow android.view.WindowManager$BadTokenException源码剖析
- day22笔记
- 自己开发中常用的东西
- 运算符之:1、赋值运算(6个):