摘要: 洛谷P3387 【模板】缩点 题目背景 缩点+DP 题目描述 给定一个n个点m条边有向图,每个点有一个权值,求一条路径,使路径经过的点权值之和最大。你只需要求出这个权值和。 允许多次经过一条边或者一个点,但是,重复经过的点,权值只计算一次。 输入输出格式 输入格式: 第一行,n,m 第二行,n个整数 阅读全文
posted @ 2017-11-07 20:57 氟铷氡氦 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 洛谷P3216 [HNOI2011]数学作业 题目描述 小 C 数学成绩优异,于是老师给小 C 留了一道非常难的数学作业题: 给定正整数 N 和 M,要求计算 Concatenate (1 .. N) Mod M 的值,其中 Concatenate (1 ..N)是将所有正整数 1, 2, …, N 阅读全文
posted @ 2017-11-07 20:46 氟铷氡氦 阅读(255) 评论(0) 推荐(0) 编辑
摘要: 洛谷P1471 方差 题目背景 滚粗了的HansBug在收拾旧数学书,然而他发现了什么奇妙的东西。 题目描述 蒟蒻HansBug在一本数学书里面发现了一个神奇的数列,包含N个实数。他想算算这个数列的平均数和方差。 输入输出格式 输入格式: 第一行包含两个正整数N、M,分别表示数列中实数的个数和操作的 阅读全文
posted @ 2017-11-07 20:22 氟铷氡氦 阅读(235) 评论(2) 推荐(0) 编辑
摘要: Disney's FastPass Problem Description Disney's FastPass is a virtual queuing system created by the Walt Disney Company. First introduced in 1999 (thug 阅读全文
posted @ 2017-11-02 13:32 氟铷氡氦 阅读(272) 评论(2) 推荐(0) 编辑
摘要: Gems Fight! Problem Description Alice and Bob are playing "Gems Fight!": There are Gems of G different colors , packed in B bags. Each bag has several 阅读全文
posted @ 2017-11-01 11:08 氟铷氡氦 阅读(231) 评论(2) 推荐(0) 编辑
摘要: Number String Problem Description The signature of a permutation is a string that is computed as follows: for each pair of consecutive elements of the 阅读全文
posted @ 2017-10-31 22:20 氟铷氡氦 阅读(136) 评论(0) 推荐(0) 编辑
摘要: Transfer water Problem Description XiaoA lives in a village. Last year flood rained the village. So they decide to move the whole village to the mount 阅读全文
posted @ 2017-10-31 21:33 氟铷氡氦 阅读(281) 评论(0) 推荐(1) 编辑
摘要: Qin Shi Huang's National Road System Problem Description During the Warring States Period of ancient China(476 BC to 221 BC), there were seven kingdom 阅读全文
posted @ 2017-10-29 22:13 氟铷氡氦 阅读(808) 评论(1) 推荐(1) 编辑
摘要: Carcassonne Problem Description Carcassonne is a tile-based board game for two to five players.Square tiles are printed by city segments,road segments 阅读全文
posted @ 2017-10-29 19:24 氟铷氡氦 阅读(421) 评论(0) 推荐(0) 编辑
摘要: Matrix Power Series Time Limit:3000MS Memory Limit:131072K Description Given a n × n matrix A and a positive integer k, find the sum S = A + A2 + A3 + 阅读全文
posted @ 2017-10-29 16:01 氟铷氡氦 阅读(177) 评论(0) 推荐(0) 编辑