K键盘里的青春K

我曾经失去的荣耀,我定加倍夺回

【CodeForces 626E】Simple Skewness (三分)

思路转自:http://www.cnblogs.com/flipped/p/5211693.html 题意 给出n个数的集合,求一个 (平均数-中位数)最大 (偏度最大)的子集,输出子集元素个数和各个元素(任意顺序)。 分析 因为是子集,所以不一定是连续的序列。然后我们有下面几个结...

2017-08-31 15:27:32

阅读数:177

评论数:0

CodeForces 526F Pudding Monsters (分治)

Description 经过侦查,你绘制出了魔族大本营的地图,然后发现,魔族大本营是一个N×N的网格图,一共有N支军队驻扎在一些网格中(不会有两只军队驻扎在一起)。  在大本营中,每有一个k×k(1≤k≤N)的子网格图包含恰好k支军队,我们袭击的难度就会增加1点。  保证每一行和每一...

2017-08-30 23:29:28

阅读数:250

评论数:0

hdu 5036 Explosion (期望+传递闭包)

Explosion Problem Description Everyone knows Matt enjoys playing games very much. Now, he is playing such a game. There are N rooms, each with one...

2017-08-30 22:54:51

阅读数:234

评论数:0

HDU 5616 Jam's balance (折半枚举or正反背包)

Jam's balance Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 2073    Accepted Submission(...

2017-08-30 16:53:06

阅读数:145

评论数:0

SPOJ Query on a tree II (倍增LCA)

QTREE2 - Query on a tree II #graph-theory #tree You are given a tree (an undirected acyclic connected graph) with N nodes, and edges numbered 1,...

2017-08-29 20:35:48

阅读数:187

评论数:0

Codeforces 18D Seller Bob (贪心)

D. Seller Bob time limit per test 2 seconds memory limit per test 128 megabytes input standard input output standard output ...

2017-08-29 18:50:41

阅读数:208

评论数:0

Codeforces 755 F. PolandBall and Gifts (简单贪心+二进制优化多重背包)

F. PolandBall and Gifts time limit per test 1.5 seconds memory limit per test 256 megabytes input standard input output stand...

2017-08-29 13:23:12

阅读数:199

评论数:0

计算几何模板

多圆面积交 typedef long long LL; typedef unsigned long long ULL; typedef vector VI; const int INF = 0x3f3f3f3f; const double eps = 1e-10; cons...

2017-08-29 11:49:03

阅读数:226

评论数:0

HDU 5733 tetrahedron (求四面体内切球模板)

转自:点击打开链接 给四个点让求内接圆心。 就求呗~ 内心公式: 设四面体A1A2A3A4的顶点Ai多对的侧面积为Si(i=1,2,3,4),顶点Ai的坐标为(xi,yi,zi)(i=1,2,3,4),四面体内心I的坐标为(xi,yi,zi),则 x1=(...

2017-08-29 11:40:34

阅读数:219

评论数:0

POJ 3977 Subset (简单折半枚举)

Subset Time Limit: 30000MS   Memory Limit: 65536K Total Submissions: 5161   Accepted: 952 Description Given a list of...

2017-08-29 01:09:00

阅读数:349

评论数:0

HDU 1423 && ZOJ 2432 (LCIS模板)

定义状态 F[i][j]表示以a串的前i个整数与b串的前j个整数且以b[j]为结尾构成的LCIS的长度。 状态转移方程: ①F[i][j] = F[i-1][j] (a[i] != b[j]) ②F[i][j] = max(F[i-1][k]+1) (1 b[k]) ...

2017-08-29 00:13:24

阅读数:374

评论数:0

HDU 6166 Senior Pan (思维枚举+最短路 求最近点对)

Senior Pan Time Limit: 12000/6000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 898    Accepted Submission(s...

2017-08-25 00:19:53

阅读数:599

评论数:0

2017 Multi-University Training Contest 10 1011 Two Paths HDU 6181 (次短路+最短路数量)

Two Paths Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 153428/153428 K (Java/Others) Total Submission(s): 0    Accepted Submission(s): 0...

2017-08-24 22:10:18

阅读数:256

评论数:0

2017 Multi-University Training Contest 10 1008 Monkeys&& HDU 6178 (贪心+超级读入挂fread)

Monkeys Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 153428/153428 K (Java/Others) Total Submission(s): 0    Accepted Submission(s): 0 ...

2017-08-24 21:56:20

阅读数:565

评论数:8

2017 Multi-University Training Contest 10 1010 Schedule && HDU 6180 (贪心)

Schedule Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 153428/153428 K (Java/Others) Total Submission(s): 0    Accepted Submission(s): 0 ...

2017-08-24 21:53:42

阅读数:222

评论数:0

1277 字符串中的最大值 (kmp)

1277 字符串中的最大值 题目来源: Codility 基准时间限制:1 秒 空间限制:131072 KB 分值: 80 难度:5级算法题  收藏  关注 一个字符串的前缀是指包含该字符第一个字母的连续子串,例如:abcd的所有前缀为a,...

2017-08-24 00:10:06

阅读数:205

评论数:0

HDU 6165 FFF at Valentine (tarjan缩点+拓扑判任意两点联通)

FFF at Valentine Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 786    Accepted Submission(...

2017-08-23 21:08:47

阅读数:244

评论数:0

POJ 1236 Network of Schools (tarjan求强连通,缩点)

Network of Schools Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 19356   Accepted: 7615 Description A ...

2017-08-23 19:43:41

阅读数:136

评论数:0

POJ 2186 Popular Cows(tarjan求强连通)

Popular Cows Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 35096   Accepted: 14308 Description Every cow's dream is to bec...

2017-08-23 18:23:11

阅读数:156

评论数:0

HDU 6170 Two strings (二维DP)

Two strings Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 626    Accepted Submission(s):...

2017-08-23 01:08:19

阅读数:186

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭