题目传送门

 /*
模拟递推水题
*/
#include <cstdio>
#include <iostream>
#include <cmath>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
using namespace std; const int MAXN = + ;
const int INF = 0x3f3f3f3f;
int a[MAXN][MAXN]; int main(void)
{
#ifndef ONLINE_JUDGE
freopen ("A.in", "r", stdin);
#endif int n;
while (~scanf ("%d", &n))
{
for (int i=; i<=n; ++i)
{
a[][i] = ;
a[i][] = ;
} for (int i=; i<=n; ++i)
{
for (int j=; j<=n; ++j)
{
a[i][j] = a[i-][j] + a[i][j-];
}
} printf ("%d\n", a[n][n]);
} return ;
}

递推水题 Codeforces Round #289 (Div. 2, ACM ICPC Rules) A. Maximum in Table的更多相关文章

  1. codeforces水题100道 第十八题 Codeforces Round #289 (Div. 2, ACM ICPC Rules) A. Maximum in Table (brute force)

    题目链接:http://www.codeforces.com/problemset/problem/509/A题意:f[i][1]=f[1][i]=1,f[i][j]=f[i-1][j]+f[i][j ...

  2. Codeforces Round #289 (Div. 2, ACM ICPC Rules) A. Maximum in Table【递推】

    A. Maximum in Table time limit per test 2 seconds memory limit per test 256 megabytes input standard ...

  3. Codeforces Round #289 (Div. 2, ACM ICPC Rules) E. Pretty Song 算贡献+前缀和

    E. Pretty Song time limit per test 1 second memory limit per test 256 megabytes input standard input ...

  4. 贪心 Codeforces Round #289 (Div. 2, ACM ICPC Rules) B. Painting Pebbles

    题目传送门 /* 题意:有 n 个piles,第 i 个 piles有 ai 个pebbles,用 k 种颜色去填充所有存在的pebbles, 使得任意两个piles,用颜色c填充的pebbles数量 ...

  5. Codeforces Round #622 (Div. 2) B. Different Rules(数学)

    Codeforces Round #622 (Div. 2) B. Different Rules 题意: 你在参加一个比赛,最终按两场分赛的排名之和排名,每场分赛中不存在名次并列,给出参赛人数 n ...

  6. 水题 Codeforces Round #302 (Div. 2) A Set of Strings

    题目传送门 /* 题意:一个字符串分割成k段,每段开头字母不相同 水题:记录每个字母出现的次数,每一次分割把首字母的次数降为0,最后一段直接全部输出 */ #include <cstdio> ...

  7. 水题 Codeforces Round #299 (Div. 2) A. Tavas and Nafas

    题目传送门 /* 很简单的水题,晚上累了,刷刷水题开心一下:) */ #include <bits/stdc++.h> using namespace std; ][] = {" ...

  8. 水题 Codeforces Round #304 (Div. 2) A. Soldier and Bananas

    题目传送门 /* 水题:ans = (1+2+3+...+n) * k - n,开long long */ #include <cstdio> #include <algorithm ...

  9. 水题 Codeforces Round #303 (Div. 2) A. Toy Cars

    题目传送门 /* 题意:5种情况对应对应第i或j辆车翻了没 水题:其实就看对角线的上半边就可以了,vis判断,可惜WA了一次 3: if both cars turned over during th ...

随机推荐

  1. 解决Eclipse里的Maven工程pom.xml文件报:web.xml is missing and <failOnMissingWebXml> is set to true错误

    打开eclipse准备进行开发时,发现项目上有个红星号,查看错误后发现报了一个:"web.xml is missing and <failOnMissingWebXml> is ...

  2. [Android Pro] Android studio jni中调用Log输出调试信息

    reference to : http://www.linuxidc.com/Linux/2014-02/96341.htm Android 开发中,java 可以方便的使用调试信息Log.i, Lo ...

  3. [Android Pro] Normal Permissions

    As of API level 23, the following permissions are classified as PROTECTION_NORMAL: ACCESS_LOCATION_E ...

  4. C/C++中调用python文件

    1.将python27安装目录下include.libs文件夹拷贝至Demo程序目录. 2.Demo项目设置包含Python.h.python27.lib); (因为安装python27的时候,pyt ...

  5. Swift - 开源框架总结

    苹果官方Swift文档<The Swift Programming Language> 苹果开发者Swift文档及介绍 网友整理的Swift中文文档< Apple Swift编程语言 ...

  6. GB2312、GBK和UTF-8三种编码以及QT中文显示乱码问题

    1.GB2312.GBK和UTF-8三种编码的简要说明 GB2312.GBK和UTF-8都是一种字符编码,除此之外,还有好多字符编码.只是对于我们中国人的应用来说,用这三种编码 比较多.简单的说一下, ...

  7. C语言的OOP实践(OOC)

    OOC 面向对象 C 语言编程实践 - 文章 - 伯乐在线http://blog.jobbole.com/105105/ ---硬着头皮看完了,但是感觉还是抽象有不理解的地方,感觉用C实现OOP好难啊 ...

  8. 关于Mesos和Kubernetes的区别

    这个主题应该和服务发现注册一样,进入视野...

  9. linux中socket的理解

    对linux中socket的理解 一.socket 一般来说socket有一个别名也叫做套接字. socket起源于Unix,都可以用“打开open –> 读写write/read –> ...

  10. 协处理器,王明学learn

    协处理器 协处理器用于执行特定的处理任务,如:数学协处理器可以控制数字处理,以减轻处理器的负担.ARM可支持多达16个协处理器,其中CP15是最重要的一个. CP15提供16组寄存器 通过提供的16组 ...