Dressing Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3735    Accepted Submission(s): 1681 Problem Description Wangpeng has N clothes, M pants and K shoes so theoretically he can have N×M×K…
HDU 4451 Dressing 题目链接http://acm.split.hdu.edu.cn/showproblem.php?pid=4451 Description Wangpeng has N clothes, M pants and K shoes so theoretically he can have N×M×K different combinations of dressing. One day he wears his pants Nike, shoes Adiwang t…
How many integers can you find Time Limit: 12000/5000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4249    Accepted Submission(s): 1211 Problem Description   Now you get a number N, and a M-integers set, you shoul…
题目链接:https://ac.nowcoder.com/acm/contest/548/F 题意:简化题意之后就是求[1,n]中不能被[2,m]中的数整除的数的个数. 思路:简单容斥题,求[1,n]中不能被[2,m]中的数整除的数的个数,可以通过求能够被整除的数. 首先,[2,m]中的合数肯定能由[2,m]中的素数的乘积来表示,所以我们仅需要考虑[1,n]中能由[2,m]中的素数整除的数的个数即可,记为sum. 然后,我们知道[1,n]中能够被x整除的数的个数为n/x(向下整除). then,…
LINK:回首过去 考试的时候没推出来 原因:状态真的很差 以及 数论方面的 我甚至连除数分块都给忘了. 手玩几个数据 可以发现 \(\frac{x}{y}\)满足题目中的条件当且仅当 这个是一个既约分数 且 y中只含2,5的因子. 枚举y考虑贡献 先除掉本身的2,5的倍数后变成w1 之后考虑x 1~n中x只要是w1的倍数那么都是不合法的. 把这些数给去掉即可.这样就得到了一个O(n)的做法. 观察数据范围 容易想到 考察的是一个根号的算法. 此时考虑枚举w1 那么可以发现w1要满足 不是2,5…
How many integers can you find Time Limit: 12000/5000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3315    Accepted Submission(s): 937 Problem Description   Now you get a number N, and a M-integers set, you shoul…
C - To Be an Dream Architect Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Practice HDU 3682 Appoint description:  System Crawler  (2014-11-09) Description The “dream architect” is the key role in a team o…
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 amazing award. As a smart boy, you notice that to win t…
链接:https://ac.nowcoder.com/acm/contest/548/F来源:牛客网 题目描述 立华奏是一个天天打比赛的萌新. 省选将至,萌新立华奏深知自己没有希望进入省队,因此开始颓废.她正在颓废一款名为<IODS 9102>的游戏. 在游戏中,立华奏拥有 k 点血量,而她的对手拥有 q 点血量.当她的血量变为 0 时,游戏便结束了:同理,如果对方的血量变为 0,立华奏就获胜了.在立华奏手中,有 n 种武器,编号分别为1,2,⋯,n1,2,⋯,n,每一种武器在使用后,都能让对…
Senior PanⅡ Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others) Problem Description Senior Pan had just failed in his math exam, and he can only prepare to make up for it. So he began a daily task with Master Dong, D…