关闭

UVA 11806 Cheerleaders(容斥原理 + 组合数)

传送门 In most professional sporting events, cheerleaders play a major role in entertaining the spectators. Their roles are substantial during breaks and prior to start of play. The world cup soccer is...
阅读(601) 评论(0)

UVA 6859 Points(凸包的应用)

传送门 Peter and Bob are playing a “Points” game on a math sheet of paper. Peter places a few points on the paper — grid nodes. Bob wants to surround them with a polygon so that all marked nodes are lyin...
阅读(541) 评论(0)

UVA 11300 Spreading the Wealth(技巧:中位数 推公式)

题目链接Spreading the Wealth A Communist regime is trying to redistribute wealth in a village. They have have decided to sit everyone around a circular table. First, everyone has converted all of their p...
阅读(2430) 评论(0)

UVALive 7040 Color (容斥原理 + 组合数学递推公式 + 求逆元 + 基础数论)

传送门 英文题目:Recently, Mr. Big recieved n owers from his fans. He wants to recolor those owers with m colors. The owers are put in a line. It is not allowed to color any adjacent owers with the same colo...
阅读(1300) 评论(0)

UVA 11624

点击打开链接 /* 2015 - 09 - 14 晚上 Author: ITAK Motto: 今日的我要超越昨日的我,明日的我要胜过今日的我, 以创作出更好的代码为目标,不断地超越自己。 */ #include #include #include #include #include #include #include #include using namespac...
阅读(280) 评论(0)

UVA 10325

题目连接:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=32762题意:求1~n中不能被给定m个数中任意一个数整除的数的个数 分析: 和之前的例题非常像,我们可以 n –sum,sum表示所有能被这些数整除的数的个数。 sum = sum +/- n/某种组合的最小公倍数 在做的过程中我们需要枚举子集,枚举子集...
阅读(542) 评论(0)

UVA 10791

题目链接:https://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=1732 hint:素因子分解#include #include #include using namespace std; typedef long long LL;...
阅读(534) 评论(0)
    个人资料
    • 访问:466372次
    • 积分:10882
    • 等级:
    • 排名:第1626名
    • 原创:634篇
    • 转载:5篇
    • 译文:0篇
    • 评论:93条
    博客专栏