
ITAK的ACM之路
文章平均质量分 52
关于一些ACM数学方面的知识,比赛题目的解题报告
ITAK
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
HDU 5245 Joyful(概率求期望)——2015年上海邀请赛
传送门Sakura has a very magical tool to paint walls. One day, kAc asked Sakura to paint a wall that looks like an M×NM \times N matrix. The wall has M×NM \times N squares in all. In the whole problem we d原创 2017-10-26 17:32:07 · 1048 阅读 · 2 评论 -
Gym 101503C Twisting the Number(思维+枚举)
题目大意:有一个整数 nn,其中W(n)W(n)表示 nn 的二进制循环的数的集合,比如说: n=11n=11 二进制表示为 10111011,循环一次得到: 0111==>70111 ==> 7 1110==>141110 ==> 14 1101==>131101 ==> 13 所以 w(11)=7,11,13,14w(原创 2017-10-20 09:20:29 · 859 阅读 · 0 评论 -
HDU 4946 Area of Mushroom(凸包)
传送门 Teacher Mai has a kingdom with the infinite area. He has n students guarding the kingdom. The i-th student stands at the position (xi,yi), and his walking speed is vi. If a point can be rea原创 2017-10-16 10:51:10 · 656 阅读 · 0 评论 -
HDU 5446 Unknown Treasure(中国剩余定理+卢卡斯定理)——2015 ACM/ICPC Asia Regional Changchun Online
传送门On the way to the next secret treasure hiding place, the mathematician discovered a cave unknown to the map. The mathematician entered the cave because it is there. Somewhere deep in the cave, she f原创 2017-10-10 20:34:54 · 998 阅读 · 0 评论 -
HDU 5936 Difference(思维+二分)——2016年中国大学生程序设计竞赛(杭州)
传送门Little Ruins is playing a number game, first he chooses two positive integers yy and KK and calculates f(y,K)f(y, K), heref(y,K)=∑z in every digits of yzK(f(233,2)=22+32+32=22)f(y, K) = \sum_{z\text原创 2017-10-09 20:38:12 · 1129 阅读 · 0 评论 -
HDU 5954 Do not pour out(二分+积分)
传送门You have got a cylindrical cup. Its bottom diameter is 2 units and its height is 2 units as well.The height of liquid level in the cup is d (0 ≤ d ≤ 2). When you incline the cup to the maximal angle原创 2017-10-07 09:46:57 · 980 阅读 · 0 评论 -
FZU Problem 1919 K-way Merging sort(大数+记忆化搜索)
传送门As we all known, merge sort is an O(nlogn) comparison-based sorting algorithm. The merge sort achieves its good runtime by a divide-and-conquer strategy, namely, that of halving the list being sorte原创 2017-10-05 21:10:30 · 1350 阅读 · 0 评论 -
2017 ACM-ICPC 亚洲区(西安赛区)网络赛 F.Trig Function(论文+组合数)
传送门 f(cos(x))=cos(n∗x)f(cos(x)) = cos(n*x) holds for all xx.Given two integers nn and mm, you need to calculate the coefficient of xmx^m in f(x)f(x), modulo 998244353998244353.Input FormatMultiple te原创 2017-09-17 20:49:59 · 1261 阅读 · 0 评论 -
2017 ACM-ICPC 亚洲区(西安赛区)网络赛 B.Coin(基本概率+二项式展开)
传送门 Bob has a not even coin, every time he tosses the coin, the probability that the coin’s front face up is qp(qp≤12)\frac{q}{p}(\frac{q}{p} \le \frac{1}{2}).The question is, when Bob tosses the coi原创 2017-09-16 20:59:24 · 756 阅读 · 0 评论 -
HDU 4336 Card Collector(状态压缩+概率DP)
传送门In your childhood, do you crazy for collecting the beautiful cards in the snacks? They said that, for example, if you collect all the 108 people in the famous novel Water Margin, you will win an ama原创 2017-09-06 16:38:50 · 928 阅读 · 0 评论 -
ZOJ 3380 Patchouli's Spell Cards(概率DP)
传送门 Patchouli Knowledge, the unmoving great library, is a magician who has settled down in the Scarlet Devil Mansion (紅魔館). Her specialty is elemental magic employing the seven elements fire, water原创 2017-09-05 17:46:28 · 732 阅读 · 0 评论 -
Codeforces 148D. Bag of mice(概率DP)
传送门The dragon and the princess are arguing about what to do on the New Year’s Eve. The dragon suggests flying to the mountains to watch fairies dancing in the moonlight, while the princess thinks they原创 2017-09-03 18:23:18 · 613 阅读 · 0 评论 -
POJ 2151 Check the difficulty of problems(概率DP)
传送门 Organizing a programming contest is not an easy job. To avoid making the problems too difficult, the organizer usually expect the contest result satisfy the following two terms: 1. All of the te原创 2017-09-03 15:44:50 · 716 阅读 · 0 评论 -
ZOJ 3329 One Person Game——(概率DP+待定系数求解方程)
传送门 There is a very simple and interesting one-person game. You have 3 dice, namely Die1, Die2 and Die3. Die1 has K1 faces. Die2 has K2 faces. Die3 has K3 faces. All the dice are fair dice, so原创 2017-09-01 18:10:22 · 774 阅读 · 0 评论 -
ZOJ 3203 Light Bulb——(三分求极值)
传送门 Compared to wildleopard’s wealthiness, his brother mildleopard is rather poor. His house is narrow and he has only one light bulb in his house. Every night, he is wandering in his incommodio原创 2017-08-29 19:22:52 · 661 阅读 · 0 评论 -
POJ 3301 Texas Trip(最小正方形覆盖+三分)
传送门 After a day trip with his friend Dick, Harry noticed a strange pattern of tiny holes in the door of his SUV. The local American Tire store sells fiberglass patching material only in square sheets.原创 2017-08-28 19:59:02 · 1115 阅读 · 0 评论 -
HDU 6134 Battlestation Operational(基本数论+莫比乌斯反演)——2017 Multi-University Training Contest - Team 8
传送门Battlestation OperationalTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 570 Accepted Submission(s): 317Problem Description > The Death Sta原创 2017-08-27 14:10:38 · 858 阅读 · 0 评论 -
HDU 6128 Inverse of sum(数论)——2017 Multi-University Training Contest - Team 7
传送门 Inverse of sumTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 326 Accepted Submission(s): 112Problem Description There are nn nonnegati原创 2017-08-16 20:59:06 · 1312 阅读 · 2 评论 -
BZOJ 3884: 上帝与集合的正确用法(欧拉函数)——有趣的题目
传送门3884: 上帝与集合的正确用法Time Limit: 5 Sec Memory Limit: 128 MBSubmit: 2439 Solved: 1079[Submit][Status][Discuss]Description根据一些书上的记载,上帝的一次失败的创世经历是这样的:第一天, 上帝创造了一个世界的基本元素,称做“元”。第二天, 上帝创造了一个新的元素,称作“α”。原创 2017-08-14 13:53:37 · 405 阅读 · 0 评论 -
HDU 2298 Toxophily(三分+二分)
传送门 Toxophily Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2304 Accepted Submission(s): 1270Problem Description The recreation center of W原创 2017-08-11 20:17:08 · 857 阅读 · 0 评论 -
HDU 6093 Rikka with Number(java大数+思维)
传送门 Rikka with NumberTime Limit: 8000/4000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 79 Accepted Submission(s): 18Problem Description As we know, Rikka is po原创 2017-08-08 20:44:37 · 1221 阅读 · 0 评论 -
HDU 6061 RXD and functions(NTT+卷积)
传送门 RXD and functionsTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 532 Accepted Submission(s): 211Problem Description RXD has a polynomia原创 2017-08-04 12:07:23 · 1123 阅读 · 0 评论 -
HDU 6069 Counting Divisors(素数筛法+枚举+技巧)——2017 Multi-University Training Contest - Team 4
传送门 Counting DivisorsTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 741 Accepted Submission(s): 248Problem Description In mathematics, th原创 2017-08-03 20:34:11 · 1711 阅读 · 2 评论 -
HDU 6053 TrickGCD(分块+容斥)——2017 Multi-University Training Contest - Team 2
传送门 TrickGCDTime Limit: 5000/2500 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 2177 Accepted Submission(s): 842Problem Description You are given an array AA ,原创 2017-07-30 11:28:14 · 677 阅读 · 0 评论 -
HDU 6050 Funny Function(构造矩阵+推公式)——2017 Multi-University Training Contest - Team 2
传送门 Funny FunctionTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 724 Accepted Submission(s): 343Problem Description Function Fx,yF_{x,y}sati原创 2017-07-28 16:07:18 · 937 阅读 · 0 评论 -
HDU 6055 Regular polygon(计算几何+思维)——2017 Multi-University Training Contest - Team 2
传送门 Regular polygonTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1187 Accepted Submission(s): 461Problem Description On a two-dimensional p原创 2017-07-28 11:26:10 · 937 阅读 · 0 评论 -
HDU 6038 Function(找规律)——2017 Multi-University Training Contest - Team 1
传送门 FunctionTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1034 Accepted Submission(s): 464Problem Description You are given a permutation原创 2017-07-26 17:51:09 · 942 阅读 · 0 评论 -
FOJ Problem 2283 Tic-Tac-Toe(暴力枚举)——第八届福建省大学生程序设计竞赛-重现赛
传送门 Kim likes to play Tic-Tac-Toe.Given a current state, and now Kim is going to take his next move. Please tell Kim if he can win the game in next 2 moves if both player are clever enough.Here “next原创 2017-07-24 19:41:01 · 1355 阅读 · 0 评论 -
玲珑杯 1144 - 数论你还会快速幂(打表找规律)
传送门解题思路:官方题解:B. 数论你还会快速幂看到nn比pp大了不到100个,我们可以思考一下假如我们只算到pp或者p−1p-1会是怎么样的即考虑函数∑p−1i=1ik mod p\sum_{i=1}^{p-1}i^k\ mod \ p我们先打个表能发现当kk是p−1p-1的倍数的时候这个值是p−1p-1,别的时候都是00然而这是否正确的呢? 我们可以简单的推导一下:假设gg是pp的原根,那么根据原创 2017-07-17 19:34:34 · 1015 阅读 · 0 评论 -
ZOJ 3829 Known Notation(模拟+YY)——The 2014 ACM-ICPC Asia Mudanjiang Regional Cont
传送门Do you know reverse Polish notation (RPN)? It is a known notation in the area of mathematics and computer science. It is also known as postfix notation since every operator in an expression follows原创 2017-07-11 21:11:01 · 787 阅读 · 0 评论 -
HDU 5531 Rebuild(三分)——2015ACM/ICPC亚洲区长春站
传送门 RebuildTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 2483 Accepted Submission(s): 548Problem Description Archaeologists find ruins of原创 2017-07-08 18:13:52 · 1244 阅读 · 0 评论 -
51NOD 1806 wangyurzee的树(容斥原理 + 组合数学)
传送门 wangyurzee有n个各不相同的节点,编号从1到n。wangyurzee想在它们之间连n-1条边,从而使它们成为一棵树。 可是wangyurzee发现方案数太多了,于是他又给出了m个限制条件,其中第i个限制条件限制了编号为u[i]的节点的度数不能为d[i]。 一个节点的度数,就是指和该节点相关联的边的条数。 这样一来,方案数就减少了,问题也就变得容易了,现在请你告诉wangyur原创 2017-06-29 17:46:05 · 958 阅读 · 7 评论 -
HDU 5514 Collision(扩展欧几里得+解方程)——2014ACM/ICPC亚洲区北京站
传送门 Matt is playing a naive computer game with his deeply loved pure girl. The playground is a rectangle with walls around. Two balls are put in different positions inside the rectangle. The bal原创 2017-06-26 18:45:09 · 772 阅读 · 0 评论 -
HDU - 5120 Intersection(简单几何)——2014ACM/ICPC亚洲区北京站
传送门 Matt is a big fan of logo design. Recently he falls in love with logo made up by rings. The following figures are some famous examples you may know. A ring is a 2-D figure bounded by two circl原创 2017-06-25 20:53:50 · 928 阅读 · 0 评论 -
51NOD 1678 lyk与gcd(容斥+素数筛)
传送门 这天,lyk又和gcd杠上了。 它拥有一个n个数的数列,它想实现两种操作。1:将 aia_i 改为 bb。 2:给定一个数i,求所有 gcd(i,j)=1gcd(i,j)=1 时的 aja_j 的总和。Input 第一行两个数n,Q(1<=n,Q<=100000)。 接下来一行n个数表示ai(1<=ai<=10^4)。 接下来Q行,每行先读入一个数A(1<=A<=2)。原创 2017-06-11 21:13:48 · 879 阅读 · 0 评论 -
51NOD 1341 混合序列(构造矩阵)
传送门 题目描述: Input共1行,4个整数数p, q, r, n中间用空格分隔(1 <= p, q, r, n<=1000000000)。Output对于每一个数据,在一行中输出答案。Input示例2 2 1 1Output示例3解题思路:令 f(n)=∑ni=0ai∗bn−if(n)=\sum_{i=0}^na_i*b_{n-i},将其展开有: f(n)=a0∗bn+a1∗bn−1+..原创 2017-06-07 10:55:06 · 828 阅读 · 0 评论 -
计蒜客47——圈果树(二维凸包)
传送门 小马承包了一个果园,想修一个围栏,但是不希望砍掉任何的果树。对于给出的所有的果树的坐标,计算一下最小的围住所有的果树的围栏的长度。输入数据的第一行包括一个整数 N(0≤ N ≤10,000)表示农夫约翰想要围住的放牧点的数目。接下来 N 行,每行由两个由空格分隔的实数组成,Xi 和 Yi,对应平面上的放牧点坐标(-1,000,000 ≤原创 2017-06-06 19:11:31 · 664 阅读 · 0 评论 -
HDU 5953 Game of Taking Stones(威佐夫博弈+高精度+二分)——The 2016 ACM-ICPC Asia Dalian Regional Contest
传送门 Two people face two piles of stones and make a game. They take turns to take stones. As game rules, there are two different methods of taking stones: One scheme is that you can take any number of原创 2017-06-04 15:50:26 · 1777 阅读 · 0 评论 -
HDU 4572 Bottles Arrangement(数学推公式)——2013 ACM-ICPC长沙赛区全国邀请赛
传送门 Bottles ArrangementTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 746 Accepted Submission(s): 565Problem Description Hunan cuisine is原创 2017-06-02 21:11:26 · 1110 阅读 · 0 评论 -
玲珑杯 1131 - 喵哈哈村的几何大师╰☆莣メ誋こ月(三角函数)
传送门1131 - 喵哈哈村的几何大师╰☆莣メ誋こ月Time Limit:1s Memory Limit:256MByteSubmissions:280Solved:60DESCRIPTION╰☆莣メ誋こ月是月大叔的ID,他是一个掌握着429种几何画法的的几何大师,最擅长的技能就是搞事,今天他又要开始搞事了。给原创 2017-05-31 15:11:55 · 882 阅读 · 0 评论