04 2016 档案

hiho 1290 —— Demo Day 【DP】
摘要:Demo Day Demo Day 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 You work as an intern at a robotics startup. Today is your company's demo day. During the dem 阅读全文

posted @ 2016-04-26 13:23 SuperChan 阅读(229) 评论(0) 推荐(0)

hiho 1033 —— 交错和 【数位DP】
摘要:1033 : 交错和 1033 : 交错和 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 给定一个数 x,设它十进制展从高位到低位上的数位依次是 a0, a1, ..., an - 1,定义交错和函数: f(x) = a0 - a1 + a2 - ... + ( -  阅读全文

posted @ 2016-04-25 21:47 SuperChan 阅读(326) 评论(0) 推荐(0)

POJ - 3286 - How many 0's? 【数位DP】
摘要:How many 0's? Time Limit: 1000MS Memory Limit: 65536KB 64bit IO Format: %I64d & %I64u Description A Benedict monk No.16 writes down the decimal repres 阅读全文

posted @ 2016-04-24 22:37 SuperChan 阅读(267) 评论(0) 推荐(0)

ZOJ - 3609 —— Modular Inverse 【乘法逆,扩展欧几里得】
摘要:题目:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4712 1. 这题数据范围太小,直接暴力即可 2. 不过其实这题也是很“直白的”求乘法逆的题目,即当b=1的特殊的模线性方程问题ax≡b mod(n),可以通过扩展欧几里得算 阅读全文

posted @ 2016-04-16 01:22 SuperChan 阅读(339) 评论(0) 推荐(0)

POJ 1061 —— 青蛙的约会
摘要:青蛙的约会 Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 103163 Accepted: 20023 Description 两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上 阅读全文

posted @ 2016-04-14 23:15 SuperChan 阅读(279) 评论(0) 推荐(0)

HDU 4507 —— 吉哥系列故事――恨7不成妻
摘要:吉哥系列故事――恨7不成妻 Time Limit:500MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u 吉哥系列故事――恨7不成妻 Description 单身! 依然单身! 吉哥依然单身! DS级码农吉哥依然单身! 所以,他生平最恨情人节 阅读全文

posted @ 2016-04-14 22:27 SuperChan 阅读(215) 评论(0) 推荐(0)

CodeForces 55D - Beautiful numbers
摘要:Beautiful numbers Time Limit:4000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u Beautiful numbers Description Volodya is an odd boy and his ta 阅读全文

posted @ 2016-04-14 17:11 SuperChan 阅读(174) 评论(0) 推荐(0)

SPOJ BALNUM - Balanced Numbers
摘要:Balanced Numbers Time Limit:123MS Memory Limit:1572864KB 64bit IO Format:%lld & %llu Balanced Numbers Description Balanced numbers have been used by m 阅读全文

posted @ 2016-04-14 13:49 SuperChan 阅读(162) 评论(0) 推荐(0)

HDU 3709 —— Balanced Number
摘要:Balanced Number Time Limit:5000MS Memory Limit:65535KB 64bit IO Format:%I64d & %I64u Balanced Number Description A balanced number is a non-negative i 阅读全文

posted @ 2016-04-14 09:35 SuperChan 阅读(191) 评论(0) 推荐(0)

HDU 3652 —— B-number
摘要:B-number Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u B-number Description A wqb-number, or B-number for short, is a non-negat 阅读全文

posted @ 2016-04-14 00:47 SuperChan 阅读(199) 评论(0) 推荐(0)

POJ 3252 —— Round Numbers
摘要:Round Numbers Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Round Numbers Description The cows, as you know, have no fingers or 阅读全文

posted @ 2016-04-13 23:40 SuperChan 阅读(135) 评论(0) 推荐(0)

HDU 2089 —— 不要62
摘要:不要62 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description 杭州人称那些傻乎乎粘嗒嗒的人为62(音:laoer)。杭州交通管理局经常会扩充一些的士车 阅读全文

posted @ 2016-04-13 22:54 SuperChan 阅读(174) 评论(0) 推荐(0)

HDU 3555 —— Bomb
摘要:Bomb Problem Description The counter-terrorists found a time bomb in the dust. But this time the terrorists improve on the time bomb. The number seque 阅读全文

posted @ 2016-04-13 22:52 SuperChan 阅读(107) 评论(0) 推荐(0)

HDU 4734 —— F(x)
摘要:F(x) Time Limit:500MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u F(x) Description For a decimal number x with n digits (A nA n-1A n-2 ... A 2A 阅读全文

posted @ 2016-04-13 22:48 SuperChan 阅读(158) 评论(0) 推荐(0)

POJ 3070 —— Fibonacci 【矩阵快速幂】
摘要:Fibonacci Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 12190 Accepted: 8651 Description In the Fibonacci integer sequence, F0 = 0, F1 = 阅读全文

posted @ 2016-04-10 00:50 SuperChan 阅读(193) 评论(0) 推荐(0)

HDU 1848 —— Fibonacci again and again 【博弈 sg函数】
摘要:Fibonacci again and again Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description 任何一个大学生对菲波那契数列(Fibonacc 阅读全文

posted @ 2016-04-09 22:23 SuperChan 阅读(179) 评论(0) 推荐(0)

HDU 1847 ——Good Luck in CET-4 Everybody!
摘要:Good Luck in CET-4 Everybody! Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description 大学英语四级考试就要来临了,你是不是在 阅读全文

posted @ 2016-04-09 21:39 SuperChan 阅读(261) 评论(0) 推荐(0)

HDU 1850 —— Being a Good Boy in Spring Festival
摘要:Being a Good Boy in Spring Festival Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description 一年在外 父母时刻牵挂春节 阅读全文

posted @ 2016-04-09 20:55 SuperChan 阅读(161) 评论(0) 推荐(0)

HDU 2149 —— Public Sale
摘要:Public Sale Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description 虽然不想,但是现实总归是现实,Lele始终没有逃过退学的命运,因为他没有拿 阅读全文

posted @ 2016-04-09 20:22 SuperChan 阅读(152) 评论(0) 推荐(0)

HDU 1907、2907 【NIM、anti-NIM】
摘要:nim游戏定义: anti-nim游戏定义: NIM游戏 和 anti-NIM游戏的区别: NIM游戏,是取走最后一个石子者胜 而anti-NIM游戏,是取走最后一个石子者败 游戏通用准则: 1. 若一个局面为必胜态,则总存在一种操作方式将当前状态转化为必败态 2. 若一个局面为必败态,则所有操作都 阅读全文

posted @ 2016-04-09 11:43 SuperChan 阅读(240) 评论(0) 推荐(0)

HDU 2147 —— kiki's game
摘要:kiki's game Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 40000/10000 K (Java/Others) Problem Description Recently kiki has nothing to do. Whil 阅读全文

posted @ 2016-04-08 21:00 SuperChan 阅读(121) 评论(0) 推荐(0)

HDU 1846 —— Brave Game
摘要:Brave Game Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description 各位勇敢者要玩的第一个游戏是什么呢?很简单,它是这样定义的:1、 本游戏是一 阅读全文

posted @ 2016-04-08 20:09 SuperChan 阅读(133) 评论(0) 推荐(0)

POJ 3783 ——Balls 【DP】
摘要:Balls Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 878 Accepted: 578 Description The classic Two Glass Balls brain-teaser is often posed 阅读全文

posted @ 2016-04-07 16:21 SuperChan 阅读(210) 评论(0) 推荐(0)

Sicily - Water 【寻找规律】
摘要:Description 移动信息工程学院即将要离开中珠了, KY在珠海认识了很多女孩,自然很舍不得中珠。于是,他想为这些女孩留下一些礼物,最近中珠阴雨绵绵,五行缺水的他于是想到留下最珍贵的中珠雨水作为纪念。现在他想尽可能地收集到多一点的中珠雨水,假设中珠的地形抽象为一张二维的海拔图,区域的个数为n, 阅读全文

posted @ 2016-04-06 22:46 SuperChan 阅读(156) 评论(0) 推荐(0)

HDU 2746 ——Max Sum Plus Plus Plus 【dfs+带备忘 或 DP】
摘要:题目:http://acm.hdu.edu.cn/showproblem.php?pid=1244 Problem Description 给定一个由n个正整数组成的整数序列a1 a2 a3 ... an求按先后次序在其中取m段长度分别为l1、l2、l3...lm的不交叠的连续整数的和的最大值。 I 阅读全文

posted @ 2016-04-05 21:23 SuperChan 阅读(155) 评论(0) 推荐(0)

tyvj 1305 —— 长度不超过m的最大连续和 【前缀和+单调队列】
摘要:题目:http://www.tyvj.cn/p/1305 定义: sum[i]=a[1]+a[2]+...+a[i] 即,sum[i]为序列a的前缀和 dp[i] = sum[i] - min(sum[j]) (i-j≤m) 即,dp[i]为以i结尾的满足长度不大于m的最大连续和 则: 答案为 ma 阅读全文

posted @ 2016-04-05 17:36 SuperChan 阅读(403) 评论(0) 推荐(0)

NYOJ 742 —— 最大m段和 【区间DP】
摘要:经典区间DP:最大m段和 “最大连续和问题”是最大m段和问题的一个特例,其实是当m=1的一种特殊情况。 OJ题目:http://acm.nyist.net/JudgeOnline/problem.php?pid=742 参考: http://blog.csdn.net/liufeng_king/ar 阅读全文

posted @ 2016-04-05 15:53 SuperChan 阅读(165) 评论(0) 推荐(0)

Sicily - 17958 - Algorithm Lectures 【找规律】
摘要:Algorithm Lectures Time Limit: 1 secs, Memory Limit: 256 MB Description Ante and Goran are preparing N teams of young ambitious students for a student 阅读全文

posted @ 2016-04-05 10:06 SuperChan 阅读(167) 评论(0) 推荐(0)

NYOJ 1103 —— m划分为n个正整数的个数
摘要:多边形划分 时间限制:1000 ms | 内存限制:65535 KB 多边形划分 时间限制:1000 ms | 内存限制:65535 KB Give you a convex(凸边形), diagonal n-3 disjoint divided into n-2 triangles(直线), fo 阅读全文

posted @ 2016-04-03 23:18 SuperChan 阅读(203) 评论(0) 推荐(0)

卡特兰数
摘要:卡特兰数 首先,我们对卡特兰数的定义如下: 当然, Cn也有通项公式的定义: <!--[endif]--> 卡特兰数的前几项: <!--[endif]--> 卡特兰数,在组合数学里有非常广泛的应用: 1. 凸n边形的三角剖分个数 凸n边形三角剖分后,每一条边都会属于一个三角形。假设,我们将该凸n边形 阅读全文

posted @ 2016-04-03 23:13 SuperChan 阅读(571) 评论(0) 推荐(0)

NYOJ 651 —— n划分为2个以上不同正整数的划分个数
摘要:Cut the rope 时间限制:1000 ms | 内存限制:65535 KB Cut the rope 时间限制:1000 ms | 内存限制:65535 KB We have a rope whose length is L. We will cut the rope into two or 阅读全文

posted @ 2016-04-02 23:38 SuperChan 阅读(313) 评论(0) 推荐(0)

NYOJ 571 —— 各种划分数
摘要:整数划分(三) 时间限制:1000 ms | 内存限制:65535 KB 整数划分(三) 时间限制:1000 ms | 内存限制:65535 KB 整数划分是一个经典的问题。请写一个程序,完成以下要求。 阅读全文

posted @ 2016-04-02 15:28 SuperChan 阅读(309) 评论(0) 推荐(0)

NYOJ 90 —— 求正整数n划分为若干个正整数的划分个数
摘要:整数划分 时间限制:3000 ms | 内存限制:65535 KB 描述 整数划分 时间限制:3000 ms | 内存限制:65535 KB 描述 所谓整数划分,是指把一个正整数n写成如下形式: n=m1+m2+...+mi; (其中mi为正整数,并且1 <= mi <= n),则:{m1,m2,. 阅读全文

posted @ 2016-04-01 19:22 SuperChan 阅读(839) 评论(0) 推荐(0)

NYOJ 746 - 正整数n划分为m段,求m段的最大乘积 【区间DP】
摘要:整数划分(四) 时间限制:1000 ms | 内存限制:65535 KB 整数划分(四) 时间限制:1000 ms | 内存限制:65535 KB 给出两个整数 n , m ,要求在 n 中加入m - 1 个乘号,将n分成m段,求出这m段的最大乘积 阅读全文

posted @ 2016-04-01 17:10 SuperChan 阅读(585) 评论(0) 推荐(1)

NYOJ 176 、POJ 1664 —— m划分为n个正整数的划分个数
摘要:整数划分(二) 时间限制:1000 ms | 内存限制:65535 KB 时间限制:1000 ms | 内存限制:65535 KB 把一个正整数m分成n个正整数的和,有多少种分法? 例:把5分成3个正正数的和,有两种分法: 1 1 3 1 2 2 n的m划分,记为dp[n][m],可以分为两种类型: 阅读全文

posted @ 2016-04-01 14:29 SuperChan 阅读(387) 评论(0) 推荐(0)

NYOJ 1077 【博弈+大整数取模】
摘要:题目:http://acm.nyist.net/JudgeOnline/problem.php?pid=1077 描述 Yougth和Hrdv这对黄金博弈搭档又要玩游戏了,有n个石子,每次最多可以取a个,最少可以取b个,当剩下少于b的话就要一次性取完,Yougth先取,谁先面对石子为0的局面则赢,他 阅读全文

posted @ 2016-04-01 10:55 SuperChan 阅读(181) 评论(0) 推荐(0)

NYOJ 23 —— 取石子(一)【博弈】
摘要:取石子(一) 时间限制:3000 ms | 内存限制:65535 KB 描述 取石子(一) 时间限制:3000 ms | 内存限制:65535 KB 描述 阅读全文

posted @ 2016-04-01 01:14 SuperChan 阅读(171) 评论(0) 推荐(0)

导航