# 51nod 1829 函数 （斯特林数）

Description 想知道f:A->B这个函数（其中|A|=n, |B|=m）的所有映射关系要使B的每个元素都要被A的一个元素覆盖到。 数字可能很大你只要输出方案数模1,000,000,007即可。  Input 一共一行两个数，n和m。（1<=n,m<=1...

# Codeforces 869 C. The Intriguing Obsession （组合数学）

Description With hands joined, go everywhere at a speed faster than our thoughts! This time, the Fire Sisters — Karen and Tsukihi — is heading for ...

# HDU 6143 Killer Names （容斥）

Description Galen Marek, codenamed Starkiller, was a male Human apprentice of the Sith Lord Darth Vader. A powerful Force-user who lived during the...

# HDU 6129 Just do it （组合数）

Description There is a nonnegative integer sequence a1…n of length n. HazelFan wants to do a type of transformation called prefix-XOR, which means ...

# Codeforces 839 D. Winter is here （莫比乌斯反演）

Description Winter is here at the North and the White Walkers are close. John Snow has an army consisting of n soldiers. While the rest of the worl...

# BZOJ 2440 [中山市选2011]完全平方数 （容斥）

Description 小 X 自幼就很喜欢数。但奇怪的是，他十分讨厌完全平方数。他觉得这些数看起来很令人难受。由此，他也讨厌所有是完全平方数的正整数倍的数。然而这丝毫不影响他对其他数的热爱。 这天是小X的生日，小 W 想送一个数给他作为生日礼物。当然他不能送一个小 X 讨厌的数。...

# BZOJ 2301 [HAOI2011]Problem b （莫比乌斯反演）

Description 对于给出的 nn 个询问，每次求有多少个数对 (x,y)(x,y) ，满足 a≤x≤b,c≤y≤da≤x≤b,c≤y≤d ，且 gcd(x,y)=k\gcd(x,y) = k ，gcd(x,y)\gcd(x,y) 函数为 xx 和 yy 的最大公约数。  Input ...

# POJ 2154 Color （Polya + 欧拉函数）

Description Beads of N colors are connected together into a circular necklace of N beads (N<=1000000000). Your job is to calculate how many diff...

# HDU 6044 Limited Permutation （组合数+逆元）

Description As to a permutation p1,p2,⋯,pn from 1 to n, it is uncomplicated for each 1≤i≤n to calculate (li,ri) meeting the condition that min(pL,p...

# 山东省第八届 ACM 省赛 fireworks （组合数+逆元）

Description Hmz likes to play fireworks, especially when they are put regularly. Now he puts some fireworks in a line. This time he put a trig...

# POJ 1026 Cipher （置换群）

Description Bob and Alice started to use a brand-new encoding scheme. Surprisingly it is not a Public Key Cryptosystem, but their encoding and deco...

# POJ 3270 Cow Sorting （置换群）

Description Farmer John’s N (1 ≤ N ≤ 10,000) cows are lined up to be milked in the evening. Each cow has a unique “grumpiness” level in the range 1...

# POJ 1286 Necklace of Beads （Polya）

Description Beads of red, blue or green colors are connected together into a circular necklace of n beads ( n < 24 ). If the repetitions that ar...

# POJ 2409 Let it Bead （Polya）

Description “Let it Bead” company is located upstairs at 700 Cannery Row in Monterey, CA. As you can deduce from the company name, their business i...

# POJ 1942 Paths on a Grid (组合数学)

Description Imagine you are attending your math lesson at school. Once again, you are bored because your teacher tells things that you already mast...

# POJ 1850 Code (组合数学)

Description Transmitting and memorizing information is a task that requires different coding systems for the best use of the available space. A wel...

# HDU 4336 Card Collector （容斥原理||概率DP）

Problem Description In your childhood, do you crazy for collecting the beautiful cards in the snacks? They said that, for example, if you collect a...

# HDU 1796:How many integers can you find（容斥原理）

How many integers can you find Time Limit: 12000/5000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 7456    Ac...

# HDU 4135：Co-prime （容斥原理）

Co-prime Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4289    Accepted Submission(s): 1...

# POJ 3370:Halloween treats（鸽巢原理）

Halloween treats Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 8099   Accepted: 2950   Special Judge Desc...

个人资料
等级：
访问量： 36万+
积分： 1万+
排名： 2006
欢迎关注 <千与梦随> 哦！
博客专栏
 那些年,我们一起追过的算法 文章：6篇 阅读：23959
最新评论