上一页 1 2 3 4 5 6 ··· 9 下一页

2017 Hackatari Codeathon部分题解

摘要: A 模拟+dfs暴搜 #include <iostream> #include <cstdio> #include <algorithm> using namespace std; const int MAXN = 4; int vis[MAXN][MAXN][MAXN]; int xi[] = { 阅读全文
posted @ 2017-04-06 15:59 disppr 阅读(326) 评论(0) 推荐(0) 编辑

2017哈理工校赛部分题解

摘要: A。Astonishing Combinatorial Number 题目大意:给你n, m, k,问你C(i, j)%k= 0的个数{1 <= i <=n, 1 <=j <= m } 题解:我们可以先预处理组合数,由组合数公式变形 A[i][j] = (A[i-1][j-1] + A[i-1][j 阅读全文
posted @ 2017-04-02 22:35 disppr 阅读(426) 评论(0) 推荐(0) 编辑

Codeforces Round #407 (Div. 2)B. Masha and geometric depression模拟(神坑题)

摘要: B. Masha and geometric depression time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Masha r 阅读全文
posted @ 2017-03-30 18:28 disppr 阅读(528) 评论(2) 推荐(0) 编辑

Codeforces Round #407 (Div. 2) A. Anastasia and pebbles模拟

摘要: A. Anastasia and pebbles time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Anastasia loves 阅读全文
posted @ 2017-03-30 17:46 disppr 阅读(360) 评论(0) 推荐(0) 编辑

Codeforces Round #278 (Div. 1) Strip RMQ

摘要: B. Strip time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Alexandra has a paper strip with 阅读全文
posted @ 2017-03-25 22:46 disppr 阅读(176) 评论(0) 推荐(0) 编辑

Codeforces Round #406 (Div. 2)C. Berzerk

摘要: C. Berzerk time limit per test 4 seconds memory limit per test 256 megabytes input standard input output standard output C. Berzerk time limit per tes 阅读全文
posted @ 2017-03-24 16:41 disppr 阅读(620) 评论(0) 推荐(0) 编辑

List likes playing card 公式~

摘要: Problem: List likes playing card Time limit: 2s Mem limit: 64 MB Problem Description List's father morejarphone likes playing poker with List very muc 阅读全文
posted @ 2017-03-19 22:17 disppr 阅读(265) 评论(0) 推荐(0) 编辑

[Offer收割]编程练习赛10简略题解

摘要: 题目1 : 出勤记录I(水题) 题目1 : 出勤记录I(水题) 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 小Hi的算法课老师每次上课都会统计小Hi的出勤记录。迟到会被记录一个L,缺席会被记录一 阅读全文
posted @ 2017-03-19 21:46 disppr 阅读(445) 评论(0) 推荐(0) 编辑

二叉树遍历 已知中序后序遍历求前序遍历

摘要: 已知中序、后序遍历求前序遍历的方法和已知前序、中序遍历求后序遍历的方法类似寻找根节点, 然后把中序遍历分成左右两个子树,有如此不断递归。很多文章介绍,不再累述。 阅读全文
posted @ 2017-03-19 11:03 disppr 阅读(744) 评论(0) 推荐(0) 编辑

二叉树前序中序遍历求后序遍历

摘要: 已知先序和中序遍历序列,求后序遍历序列。 已知该二叉树的先序遍历序列为:A-B-D-E-G-C-F,中序遍历序列为:D-B-G-E-A-C-F。 接下来我们就可以求出该二叉树的后序遍历序列,具体步骤如下: 第一步:先求root根节点,根据先序遍历规则我们可知root为先序遍历序列的第一个节点,因此该 阅读全文
posted @ 2017-03-19 10:30 disppr 阅读(462) 评论(0) 推荐(0) 编辑

二叉树的遍历

摘要: 二叉树的先序遍历顺序为:父亲->左儿子->右儿子 中序遍历顺序为:左儿子->父亲->右儿子 后序遍历顺序为:右儿子->左儿子->父亲 阅读全文
posted @ 2017-03-18 23:22 disppr 阅读(222) 评论(0) 推荐(0) 编辑

Codeforces Round #381 (Div. 2)

摘要: A : 题意,你有n个copybooks,你需要把他凑成4的倍数,现在书店里有三种类型的copybooks可以选择, a rubles 1 本 copybook, b rubles 2 本 copybooks, c rubles 3本 copybooks。 暴力枚举,把n凑成4的倍数 B:题意 给一 阅读全文
posted @ 2016-11-25 12:17 disppr 阅读(196) 评论(0) 推荐(1) 编辑

Codeforces Round #380 (Div. 2, Rated, Based on Technocup 2017 - Elimination Round 2)

摘要: A:题意把“ogo”是连续x(x >= 0)个“go”的子串变成“***”,输出改变后的串 先搜到“ogo”然后再判断 B:题意在一个舞台上n x m, 1代表演员,0代表空位子,你可以在一个空位子上放聚光灯, 聚光灯的放置方向有四种,问你有多少种方法,至少有一个演员在你放置聚光灯的方向上。 用四个 阅读全文
posted @ 2016-11-22 16:43 disppr 阅读(121) 评论(0) 推荐(0) 编辑

Codeforces Round #379 (Div. 2)

摘要: A :题意比较字符串中A和D的个数,输出获胜者的名字 B:题意有限定个数的数字2,3,5,6,让你组成256和32,使得它们的和最大 首先求256的个数,然后再求32的个数 C:题意需要你生产n瓶药水,你可以用两种方法来减少生产消耗的时间。第一种是改变药水生产的时间,把x改变为a[i], 第二种是立 阅读全文
posted @ 2016-11-16 15:37 disppr 阅读(200) 评论(0) 推荐(0) 编辑

HDU 2896 ac自动机裸题

摘要: 病毒侵袭 Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u 病毒侵袭 Description 当太阳的光辉逐渐被月亮遮蔽,世界失去了光明,大地迎来最黑暗的时刻。。。。在这样的时刻,人们却异常兴奋――我们能在有生之 阅读全文
posted @ 2016-10-13 12:29 disppr 阅读(187) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 9 下一页