先找规律,发现是斐波那契数列...然后..水题..

#include<cstdio>
#include<cstring>
#include<cmath>
#include<iostream>
#include<algorithm>
using namespace std; int f[];
char s[];
void init()
{
f[]=,f[]=;
for(int i=;i<;i++)
f[i]=(f[i-]+f[i-])%;
} int main()
{
init();
while(gets(s))
{
int tot=;
int len=strlen(s);
for(int i=;i<len;i++)
{
if(s[i]>='A'&&s[i]<='Z')
{
printf("%c",(s[i]-'A'+f[tot])%+'A');
tot++;
}
else printf("%c",s[i]);
}
printf("\n");
}
return ;
}

HDU 2672 god is a girl的更多相关文章

  1. HDU 2672 god is a girl (字符串处理,找规律,简单)

    题目 //1,1,2,3,5,8,13,21,34,55…… //斐波纳契数列 #include<math.h> #include<stdio.h> #include<s ...

  2. hdu 2669 Romantic (乘法逆元)

    Romantic Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Su ...

  3. 【转载】图论 500题——主要为hdu/poj/zoj

    转自——http://blog.csdn.net/qwe20060514/article/details/8112550 =============================以下是最小生成树+并 ...

  4. HDU 5643 King's Game 打表

    King's Game 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5643 Description In order to remember hi ...

  5. HDU 2669 Romantic(裸的拓展欧几里得)

    Romantic Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Su ...

  6. hdu图论题目分类

    =============================以下是最小生成树+并查集====================================== [HDU] 1213 How Many ...

  7. HDU图论题单

    =============================以下是最小生成树+并查集====================================== [HDU] 1213 How Many ...

  8. HDOJ 2111. Saving HDU 贪心 结构体排序

    Saving HDU Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total ...

  9. 【HDU 3037】Saving Beans Lucas定理模板

    http://acm.hdu.edu.cn/showproblem.php?pid=3037 Lucas定理模板. 现在才写,noip滚粗前兆QAQ #include<cstdio> #i ...

随机推荐

  1. javascript 值传递

    在js中 简单类型是值传递 复杂类型是引用传递 简单类型:String Number Boolean undefined Null 复杂类型:Object 下面的代码演示这个 var simpleNa ...

  2. tableviewcell 中使用autolayout自适应高度

    - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { [ce ...

  3. 请问如何查询一个APP的Android和iOS下载量?

    作者:Jasmine Jiang链接:http://www.zhihu.com/question/28533067/answer/87871598来源:知乎著作权归作者所有,转载请联系作者获得授权. ...

  4. 哈密顿圈~Lingo程序

    sets: c/1..15/:u; link(c,c):w,x; endsets data: w=@ole('第二题第一组.xls','d'); enddata n=@size(c); min=@su ...

  5. Git Bash 简单操作

    在Windows下使用Git Bash,用的是Linux命令,常用几个文件操作命令如下: Windows命令 Linux命令 意义 cd e:\xxx cd /e/xxx 切换到xxx目录 cd pw ...

  6. 用http-server 创建node.js 静态服务器

    今天做一本书上的例子,结果代码不能正常运行,查询了一下,是语法过时了,书其实是新买的,出版不久. 过时代码如下 var connect=require('connect'); connect.crea ...

  7. Android闪光灯操作

    flashMode=Camera.Parameters.FLASH_MODE_TORCH;----常亮效果 Camera.Parameters.FLASH_MODE_ON----一闪一闪的效果

  8. PAT (Top Level) Practise 1005 Programming Pattern (35)

    后缀数组.排序之后得到height数组,然后从上到下将height>=len的都分为一组,然后找到第一组个数最多的输出即可. #pragma comment(linker, "/STA ...

  9. ZOJ 1967 POJ 2570 Fiber Network

    枚举起点和公司,每次用DFS跑一遍图,预处理出所有的答案.询问的时候很快就能得到答案. #include<cstdio> #include<cmath> #include< ...

  10. pig、hive以及hbase的作用

    Pig Pig是一种数据流语言,用来快速轻松的处理巨大的数据.Pig包含两个部分:Pig Interface,Pig Latin.Pig可以非常方便的处理HDFS和HBase的数据,和Hive一样,P ...