题意:已知,求A(m, n).

分析:根据样例模拟一下过程就可以找出递推关系。

  1. #include<cstdio>
  2. #include<cstring>
  3. #include<cstdlib>
  4. #include<cctype>
  5. #include<cmath>
  6. #include<iostream>
  7. #include<sstream>
  8. #include<iterator>
  9. #include<algorithm>
  10. #include<string>
  11. #include<vector>
  12. #include<set>
  13. #include<map>
  14. #include<stack>
  15. #include<deque>
  16. #include<queue>
  17. #include<list>
  18. #define Min(a, b) a < b ? a : b
  19. #define Max(a, b) a < b ? b : a
  20. typedef long long ll;
  21. typedef unsigned long long llu;
  22. const int INT_INF = 0x3f3f3f3f;
  23. const int INT_M_INF = 0x7f7f7f7f;
  24. const ll LL_INF = 0x3f3f3f3f3f3f3f3f;
  25. const ll LL_M_INF = 0x7f7f7f7f7f7f7f7f;
  26. const int dr[] = {, , -, };
  27. const int dc[] = {-, , , };
  28. const double pi = acos(-1.0);
  29. const double eps = 1e-;
  30. const int MAXN = + ;
  31. const int MAXT = + ;
  32. using namespace std;
  33. ll a[][MAXN];
  34. int main(){
  35. for(int i = ; i <= ; ++i){
  36. a[][i] = ll() + ll(i);
  37. }
  38. for(int j = ; j <= ; ++j){
  39. a[][j] = a[][ * j + ];
  40. }
  41. a[][] = ll();
  42. for(int i = ; i <= ; ++i){
  43. a[][i] = a[][i - ] * + ll();
  44. }
  45. int m, n;
  46. while(scanf("%d%d", &m, &n) != EOF){
  47. printf("%lld\n", a[m][n]);
  48. }
  49. return ;
  50. }

HDU 1165 Eddy's research II的更多相关文章

  1. HDU 1165 Eddy's research II(给出递归公式,然后找规律)

    - Eddy's research II Time Limit:2000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64 ...

  2. HDU 1165 Eddy's research II (找规律)

    题意:给定一个表达式,然后让你求表达式的值. 析:多写几个就会发现规律. 代码如下: #pragma comment(linker, "/STACK:1024000000,102400000 ...

  3. hdu 1164:Eddy's research I(水题,数学题,筛法)

    Eddy's research I Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others ...

  4. hdu 1165 Eddy&#39;s research II(数学题,递推)

    // Eddy 继续 Problem Description As is known, Ackermann function plays an important role in the sphere ...

  5. HDU1165: Eddy's research II(递推)

    题目:http://acm.hdu.edu.cn/showproblem.php?pid=1165 果断不擅长找规律啊,做这种题静不下心来. Ackermann function can be def ...

  6. hdu 1164 Eddy's research I

    http://acm.hdu.edu.cn/showproblem.php?pid=1164 题意很简单,只是写代码的时候需要注意几个问题 一.筛选素数的时候记得用埃式筛选法,要是直接找可能会WA. ...

  7. HDU 1164 Eddy's research I

    题目链接 题意 : 给你一个数,让你用它的素数质因子表示出来. 思路 : 先打一下表,因为会有重复的质因子,所以从大到小开始找,并且找到一个之后不能就接着往下找,要再找一遍这个数. #include ...

  8. 动态规划入门——Eddy's research II

    转载请注明出处:http://blog.csdn.net/a1dark 分析:找规律 #include<stdio.h> int main(){ int m,n; while(scanf( ...

  9. HDU 1164 Eddy's research I( 试除法 & 筛法改造试除法 分解整数 )

    链接:传送门 题意:给出一个整数 n ,输出整数 n 的分解成若干个素因子的方案 思路:经典的整数分解题目,这里采用试除法 和 用筛法改造后的试除法 对正整数 n 进行分解 方法一:试除法对正整数 n ...

随机推荐

  1. cocos2dx 读取json及解析

    ball.json 数据例如以下: { "entities": [ { "entity": { "TapOpposite": 0, &quo ...

  2. Ubuntu下VSFTPD(六)(常见FTP命令及其功能) (

    常见FTP命令及其功能  FTP 命令 功能  FTP 命令 功能  ls 显示服务器上的目录 ls [remote-dir][local-file] 显示远程目录remote-dir,并存入本地文件 ...

  3. 5个基于css3超炫的鼠标滑动按钮动画

    今天给大家分享5个基于css3超炫的鼠标滑动按钮动画.这5个按钮鼠标经过的时候有超炫的动画效果.这5个按钮适用浏览器:360.FireFox.Chrome.Safari.Opera.傲游.搜狗.世界之 ...

  4. 为什么Wireshark无法解密HTTPS数据

    为什么Wireshark无法解密HTTPS数据 导读 由于需要定位一个问题,在服务器上tcpdump抓取https数据包,然后下载到本地打开wireshark分析.然后我们下载域名私钥配置到wires ...

  5. git 修改commit信息

    可以使用 git commit --amend 修改上一次的提交信息. 操作示例 如下: git commit --amend 后会出现编辑界面,如下 可以在最上面红框的地方,修改要提交的信息,然后按 ...

  6. Foxit Reader 插件下载

    http://www.foxitsoftware.com/Secure_PDF_Reader/addons.php#install 百度云:http://pan.baidu.com/s/1i3DSlv ...

  7. LeetCode5 Longest Palindromic Substring

    题意: Given a string S, find the longest palindromic substring in S. You may assume that the maximum l ...

  8. [WinForm] TableLayoutPanel和FlowLayoutPanel的使用

    这篇文章主要跟大家分享下,在配餐系统的开发中,对tableLayoutPanel 和 flowLayoutPanel 控件的使用方法和技巧 ——后附上 测试demo, 相信需要的朋友下载看后能很快的知 ...

  9. [经典算法] Eratosthenes筛选求质数

    题目说明: 除了自身之外,无法被其它整数整除的数称之为质数,要求质数很简单,但如何快速的求出质数则一直是程式设计人员与数学家努力的课题,在这边介绍一个著名的 Eratosthenes求质数方法. 题目 ...

  10. Java Script基础(八) Array数组对象

    一.Array数组 JavaScript中的数组也是具有相同数据类型的一个或者多个值得集合.用法和Java中的数组类似. Array对象的常用属性和方法: 属性: length:获取数组的长度: 方法 ...