小坏蛋_千千

I was caught in a heavy rain!

LOJ 6160 二分图染色 (dp,组合数学)

题目描述 给定一个完全二分图,图的左右两边的顶点数目相同。我们要把图中的每条边染成红色、蓝色、或者绿色,并使得任意两条红边不共享端点、同时任意两条蓝边也不共享端点。计算所有满足条件的染色的方案数,并对 109+7109+710^9+7 取模。   输入格...

2018-04-06 21:56:38

阅读数:90

评论数:0

51nod 1829 函数 (斯特林数)

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

2017-11-02 21:54:13

阅读数:355

评论数:0

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 ...

2017-10-07 15:47:52

阅读数:543

评论数:0

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...

2017-08-17 17:50:01

阅读数:1158

评论数:15

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 ...

2017-08-16 17:48:39

阅读数:145

评论数:0

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...

2017-08-13 11:58:59

阅读数:775

评论数:0

BZOJ 2440 [中山市选2011]完全平方数 (容斥)

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

2017-08-06 20:37:53

阅读数:227

评论数:0

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 ...

2017-08-04 15:07:42

阅读数:181

评论数:0

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...

2017-08-02 11:47:46

阅读数:198

评论数:0

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...

2017-07-30 12:54:40

阅读数:294

评论数:0

山东省第八届 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...

2017-05-23 16:52:38

阅读数:570

评论数:0

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...

2017-04-13 15:10:36

阅读数:291

评论数:0

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...

2017-04-12 21:46:58

阅读数:316

评论数:0

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...

2017-04-12 12:51:44

阅读数:370

评论数:0

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...

2017-04-05 13:14:54

阅读数:364

评论数:0

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...

2017-01-21 13:49:35

阅读数:208

评论数:0

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...

2017-01-21 13:36:36

阅读数:236

评论数:0

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...

2016-11-25 12:37:16

阅读数:315

评论数:0

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...

2016-11-01 21:41:59

阅读数:250

评论数:0

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...

2016-11-01 21:35:17

阅读数:201

评论数:0

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