数论
大白QQly成长日记
小白自远方来
展开
-
异或(另类斐波那契数列题)
从前,Apojacsleam家的水族箱里,养了一群热带鱼。 在这几条热带鱼里,Apojacsleam特别喜欢一条叫做TbGx(请勿人肉)的热带鱼,所以每次都让她第一个吃食物。对于每一条鱼,Apojacsleam都有一个顺序,鱼会按照这个顺序排序,越靠前的地位越高。 吃饱喝足是要睡觉的,这是人的刚需,也是鱼的刚需。 如果TbGx吃了Apojacsleam的食物,她就会睡觉...原创 2018-07-24 20:49:54 · 649 阅读 · 0 评论 -
HDU1264、1280、1425、1496、1800(简单哈希练习)
Counting Squares Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2439 Accepted Submission(s): 1184 Problem DescriptionYour inpu...原创 2018-07-11 20:39:25 · 315 阅读 · 0 评论 -
HDU1250 Hat's Fibonacci、1042 N! 、1002 A + B Problem II(大数练习)
A - A + B Problem IITime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmitStatusDescriptionI have a very simple problem for you. Given two integers A and B, your ...原创 2018-07-16 11:00:56 · 206 阅读 · 0 评论 -
HDU 6318 Swaps and Inversions(归并)
Long long ago, there was an integer sequence a.Tonyfang think this sequence is messy, so he will count the number of inversions in this sequence. Because he is angry, you will have to pay x yuan for ...原创 2018-07-26 10:09:42 · 165 阅读 · 0 评论 -
水题也挺重要
标题:G、max | 时间限制:1 秒 | 内存限制:256M Give two positive integer c, n. You need to find a pair of integer (a,b) satisfy 1<=a,b<=n and the greatest common division of a and b is c.And you need to maxim...原创 2018-08-03 09:19:50 · 281 阅读 · 1 评论 -
HDU 6335 Nothing is Impossible
Problem Description m students, including Kazari, will take an exam tomorrow. The paper consists of exactly n problems, the i -th problem contains ai correct answers and bi incorrect answer...原创 2018-08-02 10:10:27 · 241 阅读 · 0 评论 -
HDU 6343 Graph Theory Homework(水题)
Problem Description There is a complete graph containing n vertices, the weight of the i -th vertex is wi . The length of edge between vertex i and j (i≠j) is ⌊|wi−wj|−−−−−−−√⌋ . Calcula...原创 2018-08-02 10:03:37 · 297 阅读 · 0 评论 -
HDU 6322 Euler Function
Problem Description In number theory, Euler's totient function φ(n) counts the positive integers up to a given integer n that are relatively prime to n . It can be defined more formally as the...原创 2018-07-31 11:26:43 · 337 阅读 · 0 评论 -
CF #499 div2 C. Fly(模拟)
outputstandard outputNatasha is going to fly on a rocket to Mars and return to Earth. Also, on the way to Mars, she will land on n−2n−2 intermediate planets. Formally: we number all the planets fr...原创 2018-07-27 17:22:19 · 250 阅读 · 0 评论 -
nyoj 236 心急的C小加(偏序集问题)
描述C小加有一些木棒,它们的长度和质量都已经知道,需要一个机器处理这些木棒,机器开启的时候需要耗费一个单位的时间,如果第i+1个木棒的重量和长度都大于等于第i个处理的木棒,那么将不会耗费时间,否则需要消耗一个单位的时间。因为急着去约会,C小加想在最短的时间内把木棒处理完,你能告诉他应该怎样做吗? 输入第一行是一个整数T(1<T<1500),表示输入数据一共有T组。每组测...原创 2018-08-04 10:57:04 · 234 阅读 · 0 评论 -
Diff-prime Pairs
. Eddy has solved lots of problem involving calculating the number of coprime pairs within some range. This problem can be solved with inclusion-exclusion method. Eddy has implemented it lots of times...原创 2018-07-27 09:03:19 · 206 阅读 · 0 评论 -
P1582-倒水
一天,CC买了N个容量可以认为是无限大的瓶子,开始时每个瓶子里有1升水。接着~~CC发现瓶子实在太多了,于是他决定保留不超过K个瓶子。每次他选择两个当前含水量相同的瓶子,把一个瓶子的水全部倒进另一个里,然后把空瓶丢弃。(不能丢弃有水的瓶子)显然在某些情况下CC无法达到目标,比如N=3,K=1。此时CC会重新买一些新的瓶子(新瓶子容量无限,开始时有1升水),以到达目标。现在CC想知道,最少需...原创 2018-10-26 18:39:22 · 250 阅读 · 0 评论