摘要: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
阅读全文
摘要:1033 : 交错和 1033 : 交错和 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 给定一个数 x,设它十进制展从高位到低位上的数位依次是 a0, a1, ..., an - 1,定义交错和函数: f(x) = a0 - a1 + a2 - ... + ( -
阅读全文
摘要: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
阅读全文
摘要:题目:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4712 1. 这题数据范围太小,直接暴力即可 2. 不过其实这题也是很“直白的”求乘法逆的题目,即当b=1的特殊的模线性方程问题ax≡b mod(n),可以通过扩展欧几里得算
阅读全文
摘要:青蛙的约会 Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 103163 Accepted: 20023 Description 两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上
阅读全文
摘要:吉哥系列故事――恨7不成妻 Time Limit:500MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u 吉哥系列故事――恨7不成妻 Description 单身! 依然单身! 吉哥依然单身! DS级码农吉哥依然单身! 所以,他生平最恨情人节
阅读全文
摘要:Beautiful numbers Time Limit:4000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u Beautiful numbers Description Volodya is an odd boy and his ta
阅读全文
摘要:Balanced Numbers Time Limit:123MS Memory Limit:1572864KB 64bit IO Format:%lld & %llu Balanced Numbers Description Balanced numbers have been used by m
阅读全文
摘要:Balanced Number Time Limit:5000MS Memory Limit:65535KB 64bit IO Format:%I64d & %I64u Balanced Number Description A balanced number is a non-negative i
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:不要62 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description 杭州人称那些傻乎乎粘嗒嗒的人为62(音:laoer)。杭州交通管理局经常会扩充一些的士车
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:Fibonacci Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 12190 Accepted: 8651 Description In the Fibonacci integer sequence, F0 = 0, F1 =
阅读全文
摘要:Fibonacci again and again Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description 任何一个大学生对菲波那契数列(Fibonacc
阅读全文
摘要:Good Luck in CET-4 Everybody! Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description 大学英语四级考试就要来临了,你是不是在
阅读全文
摘要:Being a Good Boy in Spring Festival Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description 一年在外 父母时刻牵挂春节
阅读全文
摘要:Public Sale Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description 虽然不想,但是现实总归是现实,Lele始终没有逃过退学的命运,因为他没有拿
阅读全文
摘要:nim游戏定义: anti-nim游戏定义: NIM游戏 和 anti-NIM游戏的区别: NIM游戏,是取走最后一个石子者胜 而anti-NIM游戏,是取走最后一个石子者败 游戏通用准则: 1. 若一个局面为必胜态,则总存在一种操作方式将当前状态转化为必败态 2. 若一个局面为必败态,则所有操作都
阅读全文
摘要: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
阅读全文
摘要:Brave Game Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description 各位勇敢者要玩的第一个游戏是什么呢?很简单,它是这样定义的:1、 本游戏是一
阅读全文
摘要:Balls Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 878 Accepted: 578 Description The classic Two Glass Balls brain-teaser is often posed
阅读全文
摘要:Description 移动信息工程学院即将要离开中珠了, KY在珠海认识了很多女孩,自然很舍不得中珠。于是,他想为这些女孩留下一些礼物,最近中珠阴雨绵绵,五行缺水的他于是想到留下最珍贵的中珠雨水作为纪念。现在他想尽可能地收集到多一点的中珠雨水,假设中珠的地形抽象为一张二维的海拔图,区域的个数为n,
阅读全文
摘要:题目:http://acm.hdu.edu.cn/showproblem.php?pid=1244 Problem Description 给定一个由n个正整数组成的整数序列a1 a2 a3 ... an求按先后次序在其中取m段长度分别为l1、l2、l3...lm的不交叠的连续整数的和的最大值。 I
阅读全文
摘要:题目: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
阅读全文
摘要:经典区间DP:最大m段和 “最大连续和问题”是最大m段和问题的一个特例,其实是当m=1的一种特殊情况。 OJ题目:http://acm.nyist.net/JudgeOnline/problem.php?pid=742 参考: http://blog.csdn.net/liufeng_king/ar
阅读全文
摘要: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
阅读全文
摘要:多边形划分 时间限制:1000 ms | 内存限制:65535 KB 多边形划分 时间限制:1000 ms | 内存限制:65535 KB Give you a convex(凸边形), diagonal n-3 disjoint divided into n-2 triangles(直线), fo
阅读全文
摘要:卡特兰数 首先,我们对卡特兰数的定义如下: 当然, Cn也有通项公式的定义: <!--[endif]--> 卡特兰数的前几项: <!--[endif]--> 卡特兰数,在组合数学里有非常广泛的应用: 1. 凸n边形的三角剖分个数 凸n边形三角剖分后,每一条边都会属于一个三角形。假设,我们将该凸n边形
阅读全文
摘要: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
阅读全文
摘要:整数划分(三) 时间限制:1000 ms | 内存限制:65535 KB 整数划分(三) 时间限制:1000 ms | 内存限制:65535 KB 整数划分是一个经典的问题。请写一个程序,完成以下要求。
阅读全文
摘要:整数划分 时间限制:3000 ms | 内存限制:65535 KB 描述 整数划分 时间限制:3000 ms | 内存限制:65535 KB 描述 所谓整数划分,是指把一个正整数n写成如下形式: n=m1+m2+...+mi; (其中mi为正整数,并且1 <= mi <= n),则:{m1,m2,.
阅读全文
摘要:整数划分(四) 时间限制:1000 ms | 内存限制:65535 KB 整数划分(四) 时间限制:1000 ms | 内存限制:65535 KB 给出两个整数 n , m ,要求在 n 中加入m - 1 个乘号,将n分成m段,求出这m段的最大乘积
阅读全文
摘要:整数划分(二) 时间限制:1000 ms | 内存限制:65535 KB 时间限制:1000 ms | 内存限制:65535 KB 把一个正整数m分成n个正整数的和,有多少种分法? 例:把5分成3个正正数的和,有两种分法: 1 1 3 1 2 2 n的m划分,记为dp[n][m],可以分为两种类型:
阅读全文
摘要:题目:http://acm.nyist.net/JudgeOnline/problem.php?pid=1077 描述 Yougth和Hrdv这对黄金博弈搭档又要玩游戏了,有n个石子,每次最多可以取a个,最少可以取b个,当剩下少于b的话就要一次性取完,Yougth先取,谁先面对石子为0的局面则赢,他
阅读全文
摘要:取石子(一) 时间限制:3000 ms | 内存限制:65535 KB 描述 取石子(一) 时间限制:3000 ms | 内存限制:65535 KB 描述
阅读全文