codeforces Polycarp at the Radio

Polycarp is a music editor at the radio station. He received a playlist for tomorrow, that can be represented as a sequence a1, a2, …, an, where ai i...

2017-04-30 21:31:17

阅读数 209

评论数 0

codeforces 474D flowers 普通计数dp

We saw the little game Marmot made for Mole’s lunch. Now it’s Marmot’s dinner time and, as we all know, Marmot eats flowers. At every dinner he eats ...

2017-04-30 11:32:24

阅读数 409

评论数 1

zoj 3778 Talented Chef (思维)

As we all know, Coach Gao is a talented chef, because he is able to cook M dishes in the same time. Tonight he is going to have a hearty dinner with ...

2017-04-30 11:25:33

阅读数 241

评论数 0

codeforces 698A Vacations 基础dp

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 this n days: ...

2017-04-30 11:19:13

阅读数 188

评论数 0

codeforces 559B Equivalent Strings (最小表示法)

Today on a lecture about strings Gerald learned a new definition of string equivalency. Two strings a and b of equal length are called equivalent in ...

2017-04-30 11:13:24

阅读数 267

评论数 0

zoj 3785 打表找规律

It’s Saturday today, what day is it after 11 + 22 + 33 + … + NN days? 一看就是个周期 一开始没找到 后来发现是294 擦。无语#include <bits/stdc++.h> using namespace st...

2017-04-30 10:30:13

阅读数 279

评论数 0

codefroces 543A Writing Code dp优化 完全背包

Programmers working on a large project have just received a task to write exactly m lines of code. There are n programmers working on a project, the ...

2017-04-30 10:28:31

阅读数 234

评论数 0

uvalive 4764 Bing it 基础dp

I guess most of you played cards on the trip to Harbin, but I’m sure you have never played the following card game. This card game has N rounds and ...

2017-04-28 01:00:12

阅读数 192

评论数 0

poj 3254 Corn Field 状态压缩dp

Farmer John has purchased a lush new rectangular pasture composed of M by N (1 ≤ M ≤ 12; 1 ≤ N ≤ 12) square parcels. He wants to grow some yummy corn...

2017-04-27 11:23:40

阅读数 207

评论数 0

hdu 2089 不要62 数位dp入门

杭州人称那些傻乎乎粘嗒嗒的人为62(音:laoer)。 杭州交通管理局经常会扩充一些的士车牌照,新近出来一个好消息,以后上牌照,不再含有不吉利的数字了,这样一来,就可以消除个别的士司机和乘客的心理障碍,更安全地服务大众。 不吉利的数字为所有含有4或62的号码。例如: 62315 734...

2017-04-27 10:00:11

阅读数 241

评论数 0

poj 2378 树形dp求树的割点

After Farmer John realized that Bessie had installed a “tree-shaped” network among his N (1 <= N <= 10,000) barns at an incredible cost, he sue...

2017-04-27 09:56:11

阅读数 243

评论数 0

poj 2342 Anniversary party 树形dp入门

There is going to be a party to celebrate the 80-th Anniversary of the Ural State University. The University has a hierarchical structure of employee...

2017-04-27 09:46:24

阅读数 157

评论数 0

poj 1463 Strategic game (树形dp 守卫)

Bob enjoys playing computer games, especially strategic games, but sometimes he cannot find the solution fast enough and then he is very sad. Now he ...

2017-04-27 01:09:18

阅读数 236

评论数 0

codeforces 494B kmp+dp

Hamed has recently found a string t and suddenly became quite fond of it. He spent several days trying to find all occurrences of t in other strings ...

2017-04-27 01:04:49

阅读数 227

评论数 0

poj 1185 炮兵 状态压缩dp

司令部的将军们打算在N*M的网格地图上部署他们的炮兵部队。一个N*M的地图由N行M列组成,地图的每一格可能是山地(用”H” 表示),也可能是平原(用”P”表示),如下图。在每一格平原地形上最多可以布置一支炮兵部队(山地上不能够部署炮兵部队);一支炮兵部队在地图上的攻击范围如图中黑色区域所示: 如果...

2017-04-26 15:59:15

阅读数 202

评论数 0

关于输入挂

普通的数字 输入 int getint(){ char c = getchar(); int t = 0; while (c < ‘0’ || c > ‘9’){ c = getchar(); } while (c...

2017-04-25 14:20:22

阅读数 381

评论数 0

codeforces Igor and his way to work

B. Igor and his way to work time limit per test3 seconds memory limit per test256 megabytes inputstandard input outputstandard output Woken up b...

2017-04-24 12:09:39

阅读数 734

评论数 2

uvalive 5026 字典树典型

All the big malls need a powerful system for the products retrieval. Now you are employed design a sub-system: reading the barcodes and return the m...

2017-04-24 00:45:39

阅读数 384

评论数 0

uvalive 5008 hdu 3717 double maze 四维bfs(好题)

A maze is made up of 6 6 cells. A cell can be either a hole or a square. Moreover, a cell may be surrounded by barriers. There is ONLY one start ce...

2017-04-21 08:55:39

阅读数 349

评论数 0

poj 2104 K-th Number (划分树模板题)

You are working for Macrohard company in data structures department. After failing your previous task about key insertion you were asked to write a n...

2017-04-20 00:24:14

阅读数 332

评论数 0

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