与‘数值-二分\三分\折半枚举’有关的日志

poj2391

maksyuki 发表于 oj 分类,标签: , ,
0
poj2391

Ombrophobic Bovines

FJ's cows really hate getting wet so much that the mere thought of getting caught in the rain makes them shake in their hooves. They have decided to put a rain siren on the farm to let them know when rain is approaching. They in >>继续阅读

poj2112

maksyuki 发表于 oj 分类,标签: ,
0
poj2112

Optimal Milking

FJ has moved his K (1 <= K <= 30) milking machines out into the cow pastures among the C (1 <= C <= 200) cows. A set of paths of various lengths runs among the cows and the milking machines. The milking machine locations >>继续阅读

poj3111

maksyuki 发表于 oj 分类,标签:
0
poj3111

K Best

Demy has n jewels. Each of her jewels has some value vi and weight wi.

Since her husband John got broke after recent financial crises, Demy has decided to sell some jewels. She has decided that she would keep k best jewels for herself. She >>继续阅读

poj2976

maksyuki 发表于 oj 分类,标签:
0
poj2976

Dropping tests

In a certain course, you take n tests. If you get ai out of bi questions correct on test i, your cumulative average is defined to be. Given your test scores and a positive integer k, determine how high you can make your cumulative av >>继续阅读

hdu4417

maksyuki 发表于 oj 分类,标签: ,
0
hdu4417

Super Mario

Problem Description

Mario is world-famous plumber. His “burly” figure and amazing jumping ability reminded in our memory. Now the poor princess is >>继续阅读

poj3273

maksyuki 发表于 oj 分类,标签:
0
poj3273

Monthly Expense

Farmer John is an astounding accounting wizard and has realized he might run out of money to run the farm. He has already calculated and recorded the exact amount of money (1 ≤ moneyi≤ 10,000) that he will need to spend each day ove >>继续阅读

poj3258

maksyuki 发表于 oj 分类,标签:
0
poj3258

River Hopscotch

Every year the cows hold an event featuring a peculiar version of hopscotch that involves carefully jumping from rock to rock in a river. The excitement takes place on a long, straight river with a rock at the start and another rock >>继续阅读

poj3233

maksyuki 发表于 oj 分类,标签: ,
0
poj3233

Matrix Power Series

Given a n × n matrix A and a positive integer k, find the sum S = A + A2 + A3 + … + Ak.

Input

The input contains exactly one test case. The first line of input contains three positive integers n (n ≤ 30), k (k ≤ 109) and  >>继续阅读

poj3122

maksyuki 发表于 oj 分类,标签:
0
poj3122

Pie

My birthday is coming up and traditionally I'm serving pie. Not just one pie, no, I have a number N of them, of various tastes and of various sizes. F of my friends are coming to my party and each of them gets a piece of pie. This should be one >>继续阅读

poj2456

maksyuki 发表于 oj 分类,标签:
0
poj2456

Aggressive cows

Farmer John has built a new long barn, with N (2 <= N <= 100,000) stalls. The stalls are located along a straight line at positions x1,...,xN (0 <= xi <= 1,000,000,000). His C (2 <= C <= N) cows don't like this bar >>继续阅读

poj1064

maksyuki 发表于 oj 分类,标签:
0
poj1064

Cable master

Inhabitants of the Wonderland have decided to hold a regional programming contest. The Judging Committee has volunteered and has promised to organize the most honest contest ever. It was decided to connect computers for the contestants >>继续阅读

poj1003

maksyuki 发表于 oj 分类,标签: ,
0
poj1003

Hangover

How far can you make a stack of cards overhang a table? If you have one card, you can create a maximum overhang of half a card length. (We're assuming that the cards must be perpendicular to the table.) With two cards you can make the top >>继续阅读

hdu2141

maksyuki 发表于 oj 分类,标签:
0
hdu2141

Can you find it?

Problem Description

Give you three sequences of numbers A, B, C, then we >>继续阅读

zoj3203

maksyuki 发表于 oj 分类,标签:
0
zoj3203

Light Bulb

Compared to wildleopard's wealthiness, his brother mildleopard is rather poor. His house is narrow and he has only one light bulb in his house. Every night, he is wandering in his incommodious house, thinking of how to earn more money. O >>继续阅读

lightoj1127

maksyuki 发表于 oj 分类,标签:
0
lightoj1127

1127 - Funny Knapsack

InputGiven n integers and a knapsack of weight W, you have to count the number of combinations for which you can add the items in the knapsack without overflowing the weight.

Input starts with an integer T (≤ 100), denoting >>继续阅读

lightoj1088

maksyuki 发表于 oj 分类,标签:
0
lightoj1088

1088 - Points in Segments

For example if the points are 1, 4, 6, 8, 10. And the segment is 0 to 5. Then there are 2 points that lie in the segment.Given n points (1 dimensional) and q segments, you have to find the number of points that lie in each >>继续阅读