关闭

福建第六届省赛 H 贪心 哈夫曼思想

ZB loves playing StarCraft and he likes Zerg most! One day, when ZB was playing SC2, he came up with an idea: He wants to change the queen's ability, the queen's new ability is to choose a worker at any time, and turn it into an egg, after K units of tim...
阅读(191) 评论(0)

福建第六届省赛 G题 字符串最大乘积dp

Recently, you have found your interest in string theory. Here is an interesting question about strings. You are given a string S of length n consisting of the first k lowercase letters. You are required to find two non-empty substrings (note that substri...
阅读(184) 评论(0)

福建第六届省赛 最长连续串(贪心)

ZB is playing a card game where the goal is to make straights. Each card in the deck has a number between 1 and M(including 1 and M). A straight is a sequence of cards with consecutive values. Values do not wrap around, so 1 does not come after M. In addit...
阅读(206) 评论(0)

洛谷P3031 [USACO11NOV](中位数,树状数组)

题目描述 Farmer John has lined up his N (1 <= N <= 100,000) cows in a row to measure their heights; cow i has height H_i (1 <= H_i <= 1,000,000,000) nanometers--FJ believes in precise measurements! He wants to take a picture of some contiguous subsequence of ...
阅读(184) 评论(0)

欧拉函数 codeforces 776E - The Holmes Children

The Holmes children are fighting over who amongst them is the cleverest. Mycroft asked Sherlock and Eurus to find value of f(n), where f(1) = 1 and for n ≥ 2, f(n) is the number of distinct ordered positive integer pairs (x, y) that satisfy x + y = n and...
阅读(307) 评论(0)
168条 共34页1 2 3 4 5 ... 下一页 尾页
    个人资料
    • 访问:62805次
    • 积分:2211
    • 等级:
    • 排名:第18806名
    • 原创:159篇
    • 转载:9篇
    • 译文:0篇
    • 评论:29条
    博客专栏
    最新评论