HDU 1165 Eddy's research II
题意:已知,求A(m, n).
分析:根据样例模拟一下过程就可以找出递推关系。
- #include<cstdio>
- #include<cstring>
- #include<cstdlib>
- #include<cctype>
- #include<cmath>
- #include<iostream>
- #include<sstream>
- #include<iterator>
- #include<algorithm>
- #include<string>
- #include<vector>
- #include<set>
- #include<map>
- #include<stack>
- #include<deque>
- #include<queue>
- #include<list>
- #define Min(a, b) a < b ? a : b
- #define Max(a, b) a < b ? b : a
- typedef long long ll;
- typedef unsigned long long llu;
- const int INT_INF = 0x3f3f3f3f;
- const int INT_M_INF = 0x7f7f7f7f;
- const ll LL_INF = 0x3f3f3f3f3f3f3f3f;
- const ll LL_M_INF = 0x7f7f7f7f7f7f7f7f;
- const int dr[] = {, , -, };
- const int dc[] = {-, , , };
- const double pi = acos(-1.0);
- const double eps = 1e-;
- const int MAXN = + ;
- const int MAXT = + ;
- using namespace std;
- ll a[][MAXN];
- int main(){
- for(int i = ; i <= ; ++i){
- a[][i] = ll() + ll(i);
- }
- for(int j = ; j <= ; ++j){
- a[][j] = a[][ * j + ];
- }
- a[][] = ll();
- for(int i = ; i <= ; ++i){
- a[][i] = a[][i - ] * + ll();
- }
- int m, n;
- while(scanf("%d%d", &m, &n) != EOF){
- printf("%lld\n", a[m][n]);
- }
- return ;
- }
HDU 1165 Eddy's research II的更多相关文章
- HDU 1165 Eddy's research II(给出递归公式,然后找规律)
- Eddy's research II Time Limit:2000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64 ...
- HDU 1165 Eddy's research II (找规律)
题意:给定一个表达式,然后让你求表达式的值. 析:多写几个就会发现规律. 代码如下: #pragma comment(linker, "/STACK:1024000000,102400000 ...
- hdu 1164:Eddy's research I(水题,数学题,筛法)
Eddy's research I Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others ...
- hdu 1165 Eddy's research II(数学题,递推)
// Eddy 继续 Problem Description As is known, Ackermann function plays an important role in the sphere ...
- HDU1165: Eddy's research II(递推)
题目:http://acm.hdu.edu.cn/showproblem.php?pid=1165 果断不擅长找规律啊,做这种题静不下心来. Ackermann function can be def ...
- hdu 1164 Eddy's research I
http://acm.hdu.edu.cn/showproblem.php?pid=1164 题意很简单,只是写代码的时候需要注意几个问题 一.筛选素数的时候记得用埃式筛选法,要是直接找可能会WA. ...
- HDU 1164 Eddy's research I
题目链接 题意 : 给你一个数,让你用它的素数质因子表示出来. 思路 : 先打一下表,因为会有重复的质因子,所以从大到小开始找,并且找到一个之后不能就接着往下找,要再找一遍这个数. #include ...
- 动态规划入门——Eddy's research II
转载请注明出处:http://blog.csdn.net/a1dark 分析:找规律 #include<stdio.h> int main(){ int m,n; while(scanf( ...
- HDU 1164 Eddy's research I( 试除法 & 筛法改造试除法 分解整数 )
链接:传送门 题意:给出一个整数 n ,输出整数 n 的分解成若干个素因子的方案 思路:经典的整数分解题目,这里采用试除法 和 用筛法改造后的试除法 对正整数 n 进行分解 方法一:试除法对正整数 n ...
随机推荐
- cocos2dx 读取json及解析
ball.json 数据例如以下: { "entities": [ { "entity": { "TapOpposite": 0, &quo ...
- Ubuntu下VSFTPD(六)(常见FTP命令及其功能) (
常见FTP命令及其功能 FTP 命令 功能 FTP 命令 功能 ls 显示服务器上的目录 ls [remote-dir][local-file] 显示远程目录remote-dir,并存入本地文件 ...
- 5个基于css3超炫的鼠标滑动按钮动画
今天给大家分享5个基于css3超炫的鼠标滑动按钮动画.这5个按钮鼠标经过的时候有超炫的动画效果.这5个按钮适用浏览器:360.FireFox.Chrome.Safari.Opera.傲游.搜狗.世界之 ...
- 为什么Wireshark无法解密HTTPS数据
为什么Wireshark无法解密HTTPS数据 导读 由于需要定位一个问题,在服务器上tcpdump抓取https数据包,然后下载到本地打开wireshark分析.然后我们下载域名私钥配置到wires ...
- git 修改commit信息
可以使用 git commit --amend 修改上一次的提交信息. 操作示例 如下: git commit --amend 后会出现编辑界面,如下 可以在最上面红框的地方,修改要提交的信息,然后按 ...
- Foxit Reader 插件下载
http://www.foxitsoftware.com/Secure_PDF_Reader/addons.php#install 百度云:http://pan.baidu.com/s/1i3DSlv ...
- LeetCode5 Longest Palindromic Substring
题意: Given a string S, find the longest palindromic substring in S. You may assume that the maximum l ...
- [WinForm] TableLayoutPanel和FlowLayoutPanel的使用
这篇文章主要跟大家分享下,在配餐系统的开发中,对tableLayoutPanel 和 flowLayoutPanel 控件的使用方法和技巧 ——后附上 测试demo, 相信需要的朋友下载看后能很快的知 ...
- [经典算法] Eratosthenes筛选求质数
题目说明: 除了自身之外,无法被其它整数整除的数称之为质数,要求质数很简单,但如何快速的求出质数则一直是程式设计人员与数学家努力的课题,在这边介绍一个著名的 Eratosthenes求质数方法. 题目 ...
- Java Script基础(八) Array数组对象
一.Array数组 JavaScript中的数组也是具有相同数据类型的一个或者多个值得集合.用法和Java中的数组类似. Array对象的常用属性和方法: 属性: length:获取数组的长度: 方法 ...