
组合数学
tokers
所有的魅力在“习惯”面前都将无色。
展开
-
hdu1796---How many integers can you find(容斥原理)
Problem Description Now you get a number N, and a M-integers set, you should find out how many integers which are small than N, that they can divided exactly by any integers in the set. For example,原创 2015-05-26 21:34:33 · 754 阅读 · 0 评论 -
UVA10325--- The Lottery (容斥)
The Sports Association of Bangladesh is in great problem with their latest lottery ‘Jodi laiga Jai’. There are so many participants this time that they cannot manage all the numbers. In an urgent meet原创 2015-05-27 20:49:30 · 882 阅读 · 0 评论 -
ZOJ2836---Number Puzzle(容斥原理)
Given a list of integers (A1, A2, …, An), and a positive integer M, please find the number of positive integers that are not greater than M and dividable by any integer from the given list.InputThe inp原创 2015-05-28 16:00:02 · 1152 阅读 · 0 评论 -
hdu4059---The Boss on Mars(容斥原理+前n项的4次方和)
Problem Description On Mars, there is a huge company called ACM (A huge Company on Mars), and it’s owned by a younger boss.Due to no moons around Mars, the employees can only get the salaries per-year原创 2015-05-28 18:30:20 · 1094 阅读 · 0 评论 -
POJ2773---Happy 2006(容斥+二分)
Description Two positive integers are said to be relatively prime to each other if the Great Common Divisor (GCD) is 1. For instance, 1, 3, 5, 7, 9…are all relatively prime to 2006.Now your job is eas原创 2015-05-28 19:46:17 · 810 阅读 · 0 评论 -
LightOJ1005---Rooks(简单组合数学)
A rook is a piece used in the game of chess which is played on a board of square grids. A rook can only move vertically or horizontally from its current position and two rooks attack each other if one原创 2015-06-03 21:10:37 · 1620 阅读 · 0 评论 -
hdu4135---Co-prime(容斥原理)
Problem Description Given a number N, you are asked to count the number of integers between A and B inclusive which are relatively prime to N. Two integers are said to be co-prime or relatively prime原创 2015-05-26 21:02:21 · 630 阅读 · 0 评论