Dancepted

Dancing Acceped!

2018年11月15日

Codeforces1062C. Banh-mi(贪心+快速幂)

摘要: 题目链接:传送门 题目: C. Banh-mi time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output JATC loves Banh-m 阅读全文

posted @ 2018-11-15 16:58 Danceped 阅读(508) 评论(0) 推荐(0) 编辑

Codeforces1062B. Math(合数分解)

摘要: 题目链接:传送门 题目: B. Math time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output JATC's math teacher 阅读全文

posted @ 2018-11-15 16:29 Danceped 阅读(434) 评论(0) 推荐(0) 编辑

Codeforces1062A. A Prank(暴力)

摘要: 题目链接:传送门 题目: A. A Prank time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output JATC and his frie 阅读全文

posted @ 2018-11-15 15:56 Danceped 阅读(629) 评论(0) 推荐(0) 编辑

2018年11月14日

Codeforces1076E. Vasya and a Tree(dfs+离线+动态维护前缀和)

摘要: 题目链接:传送门 题目: E. Vasya and a Tree time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Vasya h 阅读全文

posted @ 2018-11-14 19:41 Danceped 阅读(424) 评论(0) 推荐(0) 编辑

CH3401 石头游戏(矩阵快速幂加速递推)

摘要: 题目链接:传送门 题目: 3401 石头游戏 0x30「数学知识」例题 描述 石头游戏在一个 n 行 m 列 (1≤n,m≤8) 的网格上进行,每个格子对应一种操作序列,操作序列至多有10种,分别用0~9这10个数字指明。 操作序列是一个长度不超过6且循环执行、每秒执行一个字符的字符串。每秒钟,所有 阅读全文

posted @ 2018-11-14 19:09 Danceped 阅读(568) 评论(0) 推荐(0) 编辑

洛谷P1357 花园(状态压缩 + 矩阵快速幂加速递推)

摘要: 题目链接:传送门 题目: 题目描述 小L有一座环形花园,沿花园的顺时针方向,他把各个花圃编号为1~N(2<=N<=10^15)。他的环形花园每天都会换一个新花样,但他的花园都不外乎一个规则,任意相邻M(2<=M<=5,M<=N)个花圃中有不超过K(1<=K<M)个C形的花圃,其余花圃均为P形的花圃。 阅读全文

posted @ 2018-11-14 16:47 Danceped 阅读(325) 评论(0) 推荐(0) 编辑

CH0101 a^b、 CH0102 64位整数乘法(快速幂、快速乘)【模板题】

摘要: 题目链接:传送门 //a^b 传送门 //64位整数乘法 题目: 描述 求 a 的 b 次方对 p 取模的值,其中 1≤a,b,p≤10^9 输入格式 三个用空格隔开的整数a,b和p。 输出格式 一个整数,表示a^b mod p的值。 样例输入 2 3 9 样例输出 8 模板:(快速幂) #incl 阅读全文

posted @ 2018-11-14 16:19 Danceped 阅读(166) 评论(0) 推荐(0) 编辑

2018年11月13日

POJ3070 Fibonacci(矩阵快速幂加速递推)【模板题】

摘要: 题目链接:传送门 题目大意: 求斐波那契数列第n项F(n)。 (F(0) = 0, F(1) = 1, 0 ≤ n ≤ 109) 思路: 用矩阵乘法加速递推。 算法竞赛进阶指南的模板: #include <iostream> #include <cstring> using namespace st 阅读全文

posted @ 2018-11-13 23:28 Danceped 阅读(158) 评论(0) 推荐(0) 编辑

Codeforces1076D. Edge Deletion(最短路树+bfs)

摘要: 题目链接:传送门 题目: D. Edge Deletion time limit per test 2.5 seconds memory limit per test 256 megabytes input standard input output standard output You are 阅读全文

posted @ 2018-11-13 13:35 Danceped 阅读(717) 评论(2) 推荐(1) 编辑

Codeforces483B. Friends and Presents(二分+容斥原理)

摘要: 题目链接:传送门 题目: B. Friends and Presents time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You 阅读全文

posted @ 2018-11-13 13:23 Danceped 阅读(190) 评论(0) 推荐(0) 编辑

导航