1. #include<bits/stdc++.h>
  2. using namespace std;
  3. char s[];
  4. int dp[];
  5. const int MOD = 1e9+;
  6. int main() {
  7. dp[] = ;
  8. scanf("%s", s+);
  9. int N = strlen(s+);
  10. for(int i=; i<=N; ++i) {
  11.  
  12. if(s[i] == 'm' || s[i] == 'w') {
  13. puts("");
  14. return ;
  15. }
  16.  
  17. dp[i] = dp[i-];
  18. if(i!=&&(s[i] == 'n'&&s[i-]=='n' || s[i]=='u'&&s[i-]=='u'))
  19. dp[i] = (dp[i-]+dp[i-])%MOD;
  20. }
  21. printf("%d\n", dp[N]);
  22. }
  23. //斐波拉契数列应用

codeforces Codeforces Round #597 (Div. 2) Constanze's Machine 斐波拉契数列的应用的更多相关文章

  1. Codeforces Round #382 (Div. 2) C. Tennis Championship 斐波那契

    C. Tennis Championship time limit per test 2 seconds memory limit per test 256 megabytes input stand ...

  2. [Codeforces 316E3]Summer Homework(线段树+斐波那契数列)

    [Codeforces 316E3]Summer Homework(线段树+斐波那契数列) 顺便安利一下这个博客,给了我很大启发(https://gaisaiyuno.github.io/) 题面 有 ...

  3. Codeforces 446C - DZY Loves Fibonacci Numbers(斐波那契数列+线段树)

    Codeforces 题目传送门 & 洛谷题目传送门 你可能会疑惑我为什么要写 *2400 的题的题解 首先一个很明显的想法是,看到斐波那契数列和 \(10^9+9\) 就想到通项公式,\(F ...

  4. BestCoder Round #71 (div.2) (hdu 5620 菲波那切数列变形)

    KK's Steel Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total ...

  5. Codeforces 446-C DZY Loves Fibonacci Numbers 同余 线段树 斐波那契数列

    C. DZY Loves Fibonacci Numbers time limit per test 4 seconds memory limit per test 256 megabytes inp ...

  6. codeforces gym #101161G - Binary Strings(矩阵快速幂,前缀斐波那契)

    题目链接: http://codeforces.com/gym/101161/attachments 题意: $T$组数据 每组数据包含$L,R,K$ 计算$\sum_{k|n}^{}F(n)$ 定义 ...

  7. Codeforces Beta Round #80 (Div. 2 Only)【ABCD】

    Codeforces Beta Round #80 (Div. 2 Only) A Blackjack1 题意 一共52张扑克,A代表1或者11,2-10表示自己的数字,其他都表示10 现在你已经有一 ...

  8. Codeforces Beta Round #83 (Div. 1 Only)题解【ABCD】

    Codeforces Beta Round #83 (Div. 1 Only) A. Dorm Water Supply 题意 给你一个n点m边的图,保证每个点的入度和出度最多为1 如果这个点入度为0 ...

  9. Codeforces Beta Round #79 (Div. 2 Only)

    Codeforces Beta Round #79 (Div. 2 Only) http://codeforces.com/contest/102 A #include<bits/stdc++. ...

随机推荐

  1. Jquery实现挂号平台首页源码

    带二级导航.轮播海报.二级联动.搜索功能.Tab选项卡 按照国际惯例先放图 index.html <!DOCTYPE html> <html lang="zh-cn&quo ...

  2. 带你快速了解Linux文件系统

    http://www.embeddedlinux.org.cn/emb-linux/file-system/201807/03-8197.html 这篇教程将帮你快速了解 Linux 文件系统. 早在 ...

  3. equals 为什么要把常量写在前面?

    看例子 使用str1.equals("abc"); 如果str1是null,空是没有equals方法的,会抛出空指针异常 如果"abc".equals(str1 ...

  4. Android View框架的draw机制

    概述 Android中View框架的工作机制中,主要有三个过程: 1.View树的测量(measure) Android View框架的measure机制 2.View树的布局(layout)Andr ...

  5. qsort 与sort 对结构体排序实例

    qsort 与sort 对结构体排序实例 #include<bits/stdc++.h> using namespace std; typedef struct { string book ...

  6. PDF体检报告

    //Title: 个人健康管理分析报告 using System; using System.Collections.Generic; using System.Linq; using System. ...

  7. 自定义Redux

    实现mini版redux 1. 理解redux模块 1). redux模块整体是一个对象模块 2). 内部包含几个函数 createStore(reducers) // reducers: funct ...

  8. vue常用插件之图片预览

    v-viewer(1.4.2) 非常实用的图片预览插件,支持旋转.缩放.翻转等操作 一.npm安装 npm i v-viewer -S 二.全局引入(main.js中) import 'viewerj ...

  9. python语言基础3

    一:python函数 是组织好的,可重复使用的,用来实现单一,或相关联功能的代码块.以前使用过的一些Python提供的内建函数,如print().max(4,18).min(100,50).当然我们自 ...

  10. 假期学习【六】Python网络爬虫2020.2.4

    今天通过Python网络爬虫视频复习了一下以前初学的网络爬虫,了解了网络爬虫的相关规范. 案例:京东的Robots协议 https://www.jd.com/robots.txt 说明可以爬虫的范围 ...