关闭

UVA 10651 - Pebble Solitair (状压+记忆化搜索)

Pebble solitaire is an interesting game. This is a game where you are given a board with an arrangement of small caviti...
阅读(236) 评论(0)

BZOJ 1009: [HNOI2008]GT考试(DP+KMP失配+矩阵快速幂)

1009: [HNOI2008]GT考试 Time Limit: 1 Sec Memory Limit: 162 MB Submit: 4181 Solved: 2552 [Submit][Status][Discuss] Description   阿申准备报名参加GT考试,准考证号为N位数X1X2....Xn(0<=Xi<=9),他不希望准考证号上出现不吉利的数字。 他的不吉利数学A1A2...Am(0<=Ai<=9)有M位,不出现是指X1X2...Xn中没有恰好一段等于A1A2...Am. A...
阅读(255) 评论(0)

Codeforces Round #440 (Div. 2, based on Technocup 2018 Elimination Round 2) A-C题解

A. Search for Pretty Integers time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output You are given two lists of non-zero digits. Let's call an integer pretty if its (base 10) representation has at least on...
阅读(195) 评论(0)

Codeforces Round #441 (Div. 2, by Moscow Team Olympiad) A-D题解

A. Trip For Meal time limit per test1 second memory limit per test512 megabytes inputstandard input outputstandard output Winnie-the-Pooh likes honey very much! That is why he decided to visit his friends. Winnie has got three best friends: Rabbit, Owl and...
阅读(256) 评论(0)

最小生成树 Prim、Kruscal算法 (以HDU 1863为例)

畅通工程 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 32680 Accepted Submission(s): 14407 Problem Description 省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可)。经过调查评估,得到的统计表中列出了有可能建设公...
阅读(181) 评论(0)

HDU 5115 Dire Wolf (区间DP)

Dire Wolf Time Limit: 5000/5000 MS (Java/Others) Memory Limit: 512000/512000 K (Java/Others) Total Submission(s): 2761 Accepted Submission(s): 1632 Problem Description Dire wolves, also known as Dark wolves, are extraordinarily large and powerful...
阅读(274) 评论(0)

BZOJ 1072 [SCOI2007]排列perm (状态压缩+dp+同余定理)

1072: [SCOI2007]排列perm Time Limit: 10 Sec Memory Limit: 128 MB Submit: 2537 Solved: 1583 [Submit][Status][Discuss] Description   给一个数字串s和正整数d, 统计s有多少种不同的排列能被d整除(可以有前导0)。例如123434有90种排列能 被2整除,其中末位为2的有30种,末位为4的有60种。 Input   输入第一行是一个整数T,表示测试数据的个数,以下每行一组s...
阅读(258) 评论(0)

Codeforces Round #439 (Div. 2) A-C题解

A. The Artful Expedient time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Rock... Paper! After Karen have found the deterministic winning (losing?) strategy for rock-paper-scissors, her brother, Koyom...
阅读(462) 评论(0)

Codeforces Round #438 by Sberbank and Barcelona Bootcamp (Div. 1 + Div. 2 combined) A-C题解

A. Bark to Unlock time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output As technologies develop, manufacturers are making the process of unlocking a phone as user-friendly as possible. To unlock its new p...
阅读(502) 评论(0)

USACO Milking Cows (模拟)

Milking Cows Three farmers rise at 5 am each morning and head for the barn to milk three cows. The first farmer begins milking his cow at time 300 (measured in seconds after 5 am) and ends at time 1000. The second farmer begins at time 700 and ends at time...
阅读(391) 评论(0)

HDU 6063 RXD and math (数论+快速幂)

RXD and math Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others) Total Submission(s): 1363 Accepted Submission(s): 747 Problem Description RXD is a good mathematician. One day he wants to calculate: ∑i=1nkμ2(i)×⌊nki−...
阅读(397) 评论(0)

HDU 5514 Frogs (容斥+数论)

Frogs Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 2810 Accepted Submission(s): 904 Problem Description There are m stones lying on a circle, and n frogs are jumping over them. The stones ar...
阅读(440) 评论(0)
    个人资料
    • 访问:35821次
    • 积分:1617
    • 等级:
    • 排名:千里之外
    • 原创:129篇
    • 转载:1篇
    • 译文:0篇
    • 评论:13条
    联系方式
    欢迎谈论交流:1245985209
    博客专栏
    最新评论