07 2016 档案
tyvj 1056 能量项链 区间dp (很神)
摘要:P1056 能量项链 时间: 1000ms / 空间: 131072KiB / Java类名: Main 背景 NOIP2006 提高组 第一道 描述 在Mars星球上,每个Mars人都随身佩带着一串能量项链。在项链上有N颗能量珠。能量珠是一颗有头标记与尾标记的珠子,这些标记对应着某个正整数。并且,
阅读全文
codevs 2216 线段树 两种更新方式的冲突
摘要:题目描述 Description “神州“载人飞船的发射成功让小可可非常激动,他立志长大后要成为一名宇航员假期一始,他就报名参加了“小小宇航员夏令营”,在这里小可可不仅学到了丰富的宇航知识,还参与解决了一些模拟飞行中发现的问题,今天指导老师交给他一个任务,在这次模拟飞行的路线上有N个行星,暂且称它们
阅读全文
乏力的编码很累,这里有私货..
摘要:一直想做一个自己的 记录心情,思考,生活,相片的网站,orzzzz 留点回忆,可惜代码汪只会敲点简单算法,不难,想学,但没有时间,捉急.. 今天尤其乏力,头痛且敲无力,偶然发现了网易的这个轻博客,’记录生活,发现同好‘ 闲逛中竟然发现了一些acmer,其中一个尤为印象深刻,记录着他生活的点滴,“其实
阅读全文
tyvj 1049 最长不下降子序列 n^2/nlogn
摘要:P1049 最长不下降子序列 时间: 1000ms / 空间: 131072KiB / Java类名: Main 描述 求最长不下降子序列的长度 输入格式 第一行为n,表示n个数第二行n个数 输出格式 最长不下降子序列的长度 测试样例1 输入 3 1 2 3 输出 3 备注 N小于5000for e
阅读全文
HDU 5748 最长上升子序列的长度nlogn(固定尾部)
摘要:Bellovin Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 858 Accepted Submission(s): 395 Proble
阅读全文
poj 3468 线段树区间更新/查询
摘要:Description You have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operation is to add some given number to
阅读全文
poj 2955 括号匹配 区间dp
摘要:Brackets Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 6033 Accepted: 3220 Description We give the following inductive definition of a “r
阅读全文
tyvj 1055 区间dp
摘要:P1055 沙子合并 时间: 1000ms / 空间: 131072KiB / Java类名: Main 描述 设有N堆沙子排成一排,其编号为1,2,3,…,N(N<=300)。每堆沙子有一定的数量,可以用一个整数来描述,现在要将这N堆沙子合并成为一堆,每次只能合并相邻的两堆,合并的代价为这两堆沙子
阅读全文
poj 1651 区间dp
摘要:Multiplication Puzzle Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 8487 Accepted: 5291 Description The multiplication puzzle is played w
阅读全文
poj 3280 区间dp
摘要:Cheapest Palindrome Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 8383 Accepted: 4061 Description Keeping track of all the cows can be a
阅读全文
cdoj 1259 线段树+bitset 区间更新/查询
摘要:Description 昊昊喜欢运动 他N天内会参加M种运动(每种运动用一个[1,m]的整数表示) 现在有Q个操作,操作描述如下 昊昊把第l天到第r天的运动全部换成了x(x∈[1,m]) 问昊昊第l天到第r天参加了多少种不同的运动 Description 昊昊喜欢运动 他N天内会参加M种运动(每种运
阅读全文
poj 1390 区间dp
摘要:Blocks Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 5035 Accepted: 2065 Description Some of you may have played a game called 'Blocks'.
阅读全文
poj 1037 三维dp
摘要:A decorative fence Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 7221 Accepted: 2723 Description Richard just finished building his new h
阅读全文
poj 3311 floyd+dfs或状态压缩dp 两种方法
摘要:Hie with the Pie Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 6436 Accepted: 3470 Description The Pizazz Pizzeria prides itself in deliv
阅读全文
HDU 5761 物理题
摘要:Rower Bo Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 650 Accepted Submission(s): 203Special
阅读全文
HDU 5752
摘要:Sqrt Bo Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 423 Accepted Submission(s): 188 Problem
阅读全文
Codeforces Round #328 (Div. 2) C 数学
摘要:C. The Big Race time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output C. The Big Race time limi
阅读全文
Codeforces Round #281 (Div. 2) B 模拟
摘要:B. Vasya and Wrestling time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output B. Vasya and Wres
阅读全文
Codeforces Round #281 (Div. 2) A 模拟
摘要:A. Vasya and Football time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Vasya has started
阅读全文
HDU 4786 最小生成树变形 kruscal(13成都区域赛F)
摘要:Fibonacci Tree Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4136 Accepted Submission(s): 1283
阅读全文
Codeforces Round #364 (Div. 2) D 数学/公式
摘要:D. As Fast As Possible time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output D. As Fast As Poss
阅读全文
Codeforces Round #364 (Div. 2) C 二分处理+求区间不同字符的个数 尺取法
摘要:C. They Are Everywhere time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output C. They Are Every
阅读全文
Codeforces Round #364 (Div. 2) B 标记
摘要:B. Cells Not Under Attack time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output B. Cells Not U
阅读全文
Codeforces Round #364 (Div. 2) A 水
摘要:A. Cards time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A. Cards time limit per test 1 s
阅读全文
Codeforces Round #304 (Div. 2) D 思维/数学/质因子/打表/前缀和/记忆化
摘要:D. Soldier and Number Game time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output D. Soldier an
阅读全文
Codeforces Round #304 (Div. 2) A B C 水
摘要:A. Soldier and Bananas time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A. Soldier and Ban
阅读全文
codevs 1690 开关灯 线段树区间更新 区间查询Lazy
摘要:题目描述 Description YYX家门前的街上有N(2<=N<=100000)盏路灯,在晚上六点之前,这些路灯全是关着的,六点之后,会有M(2<=m<=100000)个人陆续按下开关,这些开关可以改变从第i盏灯到第j盏灯的状态,现在YYX想知道,从第x盏灯到第y盏灯中有多少是亮着的(1<=i,
阅读全文
HDU 2795 线段树区间最大值,单点更新+二分
摘要:Billboard Time Limit: 20000/8000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 18496 Accepted Submission(s): 7751 Pro
阅读全文
codevs 1081 线段树练习 2 区间更新 单点查询 无lazy
摘要:题目描述 Description 给你N个数,有两种操作 1:给区间[a,b]的所有数都增加X 2:询问第i个数是什么? 给你N个数,有两种操作 1:给区间[a,b]的所有数都增加X 2:询问第i个数是什么? 输入描述 Input Description 第一行一个正整数n,接下来n行n个整数,再接
阅读全文
Codeforces Round #315 (Div. 2) B 水题强行set
摘要:B. Inventory time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Companies always have a lot
阅读全文
Codeforces Round #315 (Div. 2) A 水且坑
摘要:A. Music time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Little Lesha loves listening to
阅读全文
Codeforces Round #330 (Div. 2) B 容斥原理
摘要:B. Pasha and Phone time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output B. Pasha and Phone tim
阅读全文
Codeforces Round #363 (Div. 2) C dp或贪心 两种方法
摘要:Description Vasya has n days of vacations! So he decided to improve his IT skills and do sport. Vasya knows the following information about each of th
阅读全文
Codeforces Round #363 (Div. 2) B 暴力
摘要:Description You are given a description of a depot. It is a rectangular checkered field of n × m size. Each cell in a field can be empty (".") or it c
阅读全文
Codeforces Round #363 (Div. 2) A 水
摘要:Description There will be a launch of a new, powerful and unusual collider very soon, which located along a straight line. n particles will be launche
阅读全文
Codeforces Round #316 (Div. 2) C 思路/模拟
摘要:C. Replacement time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output C. Replacement time limit
阅读全文
Codeforces Round #316 (Div. 2) B 贪心
摘要:B. Simple Game time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output B. Simple Game time limit
阅读全文
Codeforces Round #316 (Div. 2) A 水
摘要:A. Elections time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A. Elections time limit per
阅读全文
Codeforces Round #323 (Div. 2) C 无敌gcd 数学/贪心
摘要:C. GCD Table time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output The GCD table G of size n ×
阅读全文
Codeforces Round #323 (Div. 2) B 贪心,暴力
摘要:B. Robot's Task time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output B. Robot's Task time limi
阅读全文
Codeforces Round #323 (Div. 2) A 水
摘要:A. Asphalting Roads time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A. Asphalting Roads t
阅读全文
BestCoder 2nd Anniversary/HDU 5719 姿势
摘要:Arrange Accepts: 221 Submissions: 1401 Time Limit: 8000/4000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others) Time Limit: 8000/4000 MS (Ja
阅读全文
BestCoder 2nd Anniversary/HDU 5718 高精度 模拟
摘要:Oracle Accepts: 599 Submissions: 2576 Time Limit: 8000/4000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others) Time Limit: 8000/4000 MS (Jav
阅读全文
FZU 2168 前缀和+dp递推
摘要:Description Description Description 部队中共有N个士兵,每个士兵有各自的能力指数Xi,在一次演练中,指挥部确定了M个需要防守的地点,按重要程度从低到高排序,依次以数字1到M标注每个地点的重要程度,指挥部将选择M个士兵依次进入指定地点进行防守任务,能力指数为X的士兵
阅读全文
poj 1088 记忆化搜索
摘要:滑雪 Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 90368 Accepted: 34028 Description Michael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑
阅读全文
Codeforces Round #241 (Div. 2) B dp
摘要:B. Art Union time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output B. Art Union time limit per
阅读全文
poj 3053 优先队列处理
摘要:Fence Repair Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 39029 Accepted: 12681 Description Farmer John wants to repair a small length o
阅读全文
HDU 5253 最小生成树 kruscal
摘要:Description 老 Jack 有一片农田,以往几年都是靠天吃饭的。但是今年老天格外的不开眼,大旱。所以老 Jack 决定用管道将他的所有相邻的农田全部都串联起来,这样他就可以从远处引水过来进行灌溉了。当老 Jack 买完所有铺设在每块农田内部的管道的时候,老 Jack 遇到了新的难题,因为每
阅读全文
CDOJ 1256 二维前缀和处理
摘要:昊昊喜欢运动 他NN 天内会参加MM 种运动(每种运动用一个[1,m][1,m] 的整数表示) 舍友有QQ 个问题 问昊昊第ll 天到第rr 天参加了多少种不同的运动 Input 输入两个数NN , MM (1≤N≤20001≤N≤2000 , 1≤M≤1001≤M≤100 ); 输入NN 个数ai
阅读全文
Educational Codeforces Round 8 B 找规律
摘要:B. New Skateboard time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output B. New Skateboard time
阅读全文
Manthan, Codefest 16 B 数学
摘要:B. A Trivial Problem time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output B. A Trivial Proble
阅读全文
HDU 3792 素数打表
摘要:Description If we define dn as: dn = pn+1-pn, where pi is the i-th prime. It is easy to see that d1 = 1 and dn=even for n>1. Twin Prime Conjecture sta
阅读全文
Codeforces Round #240 (Div. 2) B 好题
摘要:B. Mashmokh and Tokens time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output B. Mashmokh and To
阅读全文
CDOJ 30 裸最短路 SPFA
摘要:最短路 Edit Time Limit: 3000/1000MS (Java/Others) Memory Limit: 65535/65535KB (Java/Others) Submit Status 在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的T-shirt。但是每当我们的工作人员把
阅读全文
Codeforces Round #362 (Div. 2) B 模拟
摘要:B. Barnicle time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output B. Barnicle time limit per te
阅读全文
Codeforces Round #362 (Div. 2) A 水也挂
摘要:A. Pineapple Incident time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A. Pineapple Incide
阅读全文
Codeforces Round #320 (Div. 2) [Bayan Thanks-Round] D 数学+(前缀 后缀 预处理)
摘要:D. "Or" Game time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output D. "Or" Game time limit per
阅读全文
Codeforces Round #320 (Div. 2) [Bayan Thanks-Round] E 三分+连续子序列的和的绝对值的最大值
摘要:E. Weakness and Poorness time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output E. Weakness and
阅读全文
codevs 1380/HDU 1520 树形dp
摘要:1380 没有上司的舞会 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 钻石 Diamond <!-- clearfix --> 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 钻石 Diamond 时间限制: 1 s 时间限制: 1 s 空间限制: 12800
阅读全文
IX Samara Regional Intercollegiate Programming Contest F 三分
摘要:F. Two Points time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output F. Two Points time limit p
阅读全文
Codeforces Round #321 (Div. 2) B 二分+预处理
摘要:B. Kefa and Company time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output B. Kefa and Company
阅读全文
Codeforces Round #321 (Div. 2) C dfs处理(双向边叶子节点的判断)
摘要:C. Kefa and Park time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output C. Kefa and Park time l
阅读全文
Codeforces Round #350 (Div. 2) D2 二分
摘要:D2. Magic Powder - 2 time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output The term of this pro
阅读全文
UVA 11991 vector
摘要:Though Rujia Liu usually sets hard problems for contests (for example, regional contests likeXi’an 2006, Beijing 2007 and Wuhan 2009, or UVa OJ contes
阅读全文
codechef May Challenge 2016 CHSC: Che and ig Soccer dfs处理
摘要:Description All submissions for this problem are available. Read problems statements in Mandarin Chinese, Russian and Vietnamese as well. Chef is a bi
阅读全文
codechef May Challenge 2016 FORESTGA: Forest Gathering 二分
摘要:Description All submissions for this problem are available. Read problems statements in Mandarin Chinese, Russian and Vietnamese as well. Chef is the
阅读全文
codechef May Challenge 2016 LADDU: Ladd 模拟
摘要:All submissions for this problem are available. Read problems statements in Mandarin Chinese, Russian and Vietnamese as well. You might have heard abo
阅读全文
bzoj 2435 dfs处理
摘要:Description 在 W 星球上有 n 个国家。为了各自国家的经济发展,他们决定在各个国家 之间建设双向道路使得国家之间连通。但是每个国家的国王都很吝啬,他们只愿 意修建恰好 n – 1条双向道路。 每条道路的修建都要付出一定的费用, 这个费用等于道路长度乘以道路两端的国家个数之差的绝对值。例
阅读全文
Gym 100989E 字符串
摘要:Description standard input/output Islam is usually in a hurry. He often types his passwords incorrectly. He hates retyping his password several times
阅读全文
Codeforces Beta Round #95 (Div. 2) C 组合数学
摘要:C. The World is a Theatre time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output C. The World i
阅读全文
Gym 100989F 水&愚&vector
摘要:standard input/output You must have heard about Agent Mahone! Dr. Ibrahim hired him to catch the cheaters in the Algorithms course. N students cheated
阅读全文
Gym 100971C 水&愚&三角形
摘要:Description standard input/output Announcement Statements There is a set of n segments with the lengths li. Find a segment with an integer length so t
阅读全文
Gym 100971B 水&愚
摘要:Description standard input/output Announcement Statements A permutation of n numbers is a sequence of integers from 1 to n where each number is occurr
阅读全文
HDU 5696 RMQ+滑窗
摘要:区间的价值 Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 844 Accepted Submission(s): 398 Problem De
阅读全文
UVA 1619/POJ2796 滑窗算法/维护一个单调栈
摘要:Feel Good Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 12409 Accepted: 3484 Case Time Limit: 1000MS Special Judge Description Bill is de
阅读全文
HDU 4611
摘要:Balls Rearrangement Time Limit: 9000/3000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 2862 Accepted Submission(s):
阅读全文
Codeforces Round #361 (Div. 2) B bfs处理
摘要:B. Mike and Shortcuts time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output B. Mike and Shortc
阅读全文
Codeforces Round #361 (Div. 2) A
摘要:A. Mike and Cellphone time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A. Mike and Cellpho
阅读全文
浙公网安备 33010602011771号