uva 620 Cellular Structure
来源:互联网 发布:windows清理助手3 编辑:程序博客网 时间:2024/04/29 08:35
#include <stdio.h>#include <string.h>char buf[2000];void func(int &res){int len;len=strlen(buf);if(0 == len%2)return;if(1 == len && buf[0]=='A'){res = 1;return;}if(len>=2 && buf[len-1]=='B' && buf[len-2]=='A'){res = 2;return;}if(len>=2 && buf[0]=='B' && buf[len-1]=='A'){res = 3;return;}}int main(void){int n, result;//freopen("input.dat", "r", stdin);scanf("%d", &n);while(n--){scanf("%s", buf);result = 4;func(result);switch(result){case 1:printf("SIMPLE\n");break;case 2:printf("FULLY-GROWN\n");break;case 3:printf("MUTAGENIC\n");break;case 4:printf("MUTANT\n");break;}}return 0;}
0 0
- uva 620 Cellular Structure
- UVA 620 Cellular Structure
- UVa 620 - Cellular Structure
- uva 620 - Cellular Structure
- UVa 620 - Cellular Structure
- Uva-620-Cellular Structure
- uva 620 Cellular Structure
- uva 620 - Cellular Structure
- UVA - 620 Cellular Structure
- UVa:620 Cellular Structure
- uva 620 Cellular Structure
- UVA - 620 Cellular Structure
- UVA 620 Cellular Structure
- UVA 620 - Cellular Structure
- UVA - 620 Cellular Structure
- UVa 620 Cellular Structure
- UVA 620 Cellular Structure
- UVa 620 - Cellular Structure
- common-lang的StringUtils使用
- GNU ARM汇编--(一)开篇
- 用正则表达式对网页进行有效内容抽取
- 怎样快速学习一门新技术
- GNU ARM汇编--(二)汇编编译链接与运行
- uva 620 Cellular Structure
- Cocos2d-x多场景切换生命周期
- 杭电1375 字数统计
- c#正则表达式
- cocos2dx android back键关闭游戏的方法
- 1248 - Every derived table must have its own alias (MYSQL错误)
- GNU ARM汇编--(三)ARM处理器的基本原则
- GNU ARM汇编--(四)中断汇编之非嵌套中断处理
- 编程中无穷大常量的设定技巧