
数学
文章平均质量分 57
Techay
我是为了c币才写的简介
展开
-
Treasure Hunt IV
Alice is exploring the wonderland, suddenly she fell into a hole, when she woke up, she found there are b - a + 1 treasures labled a from b in front of her. Alice was very excited but unfortunately no原创 2015-08-27 11:51:45 · 423 阅读 · 0 评论 -
Special equations(数学筛)
Let f(x) = anxn+...+a1x+a0a_nx^n +...+ a_1x +a_0, in which ai (0 <= i <= n) are all known integers. We call f(x) 0 (mod m) congruence equation. If m is a composite, we can factor m into powers of prime原创 2016-04-13 12:39:25 · 494 阅读 · 0 评论 -
cf599D Spongebob and Squares(推公式,枚举)
Spongebob is already tired trying to reason his weird actions and calculations, so he simply asked you to find all pairs of n and m, such that there are exactly x distinct squares in the table consisti原创 2015-11-21 09:31:11 · 833 阅读 · 0 评论 -
数论基础知识测试(送)
Problem Description小Y最喜欢数学了,他有很多关于数学的问题想问你。 作为一个ACMer,你为了能尽快解决问题,当然是编写一个程序来满足小Y的要求。 小Y的问题大概有以下几类: 给定若干个数,求他们的最大公约数。 给定两个数a,b,求第一个数a关于第二个数b的逆元,逆元定义为,ax%b=1的最小正整数x。 给定一个整数a,求不超过这个数的所有数中(1~a-1),与这个数互原创 2015-10-15 19:46:52 · 352 阅读 · 0 评论 -
NT的数字(被8整除)
Problem DescriptionNT(Number Theory) 是一个很帅气的小伙子,从小就喜欢数论,整数神马的最有爱了~ 随着研究的深入,NT遇到的数字越来越大,越来越大,这让他研究的进度受到了阻碍…… 这一天,他拿到了一个很大很大的数,然后想知道这个数能否通过重新排列来被8整除? Input多组数据,每组数据只有一个“大”整数n(0<=n<=10^1000) Output对于每原创 2015-10-15 19:55:05 · 524 阅读 · 0 评论 -
小Y喜欢拆拆拆(送)
Problem Description小Y最喜欢把东西拆开了,虽然一般都无法组装回去(= =b) 在数学中,有一种一定能组装回去的方式是分解质因数,所以小Y最喜欢分解质因数了!但是小Y不是普通人,当然不想按常人的思路“组装”一个数,于是小Y是用以下方法来“组装”: 1. 对于一个数,如果这个数是合数,那么小Y用正常人的方法进行分解质因数,执行操作2,如果这个数不是合数,那么小Y把这个数写下来,结原创 2015-10-15 19:49:54 · 381 阅读 · 0 评论 -
这题占坑备用(搜索)
Problem DescriptionACdream王国的大数学家NT(Number Theory),发现了一种独特的数,称之为NT数,其定义如下: 1. 长度为1的数都是NT数。 2.对于一个长度大于1的数,当且仅当他能被长度整除,且商为NT数,那么这个数也是NT数。 NT相信这样的数是无穷无尽的!然而他还是想知道在一个区间内这样的数有多少个。 Input多组数据(大约1000组),每组数原创 2015-10-15 20:09:42 · 484 阅读 · 0 评论 -
NT的表白(数论)
Problem Description经过了很长很长的恋爱马拉松,帅气NT(Number Theory)终于决定要向迷人的CG(Computational Geometry)表白了!(对单身汪造成了0x7fffffff点伤害) CG为了考验NT,于是决定最后再出一道难题。 CG给NT两个整数a,b,说这是我们俩的幸运数字,那么我们孩子(还没结婚就想着孩子= =b)的幸运数字就是1111…1(a个原创 2015-10-15 20:05:30 · 504 阅读 · 0 评论 -
ACdream运动会(送)
Problem Description第一届ACdream运动会就要开始了,来自全国34个省级地区的n个高校都派出学生前来参与。(学校编号为1~n)开幕式中有一项活动就是参赛队伍派代表进行演讲,由于中国国情——人多,所以让每个高校都派出代表进行演讲是不切实际的,因此只能让有符合一定条件的学校的代表进行演讲。至于决定哪些学校进行演讲,就由组委会的委员负责。ACdream运动会组委会共m个人,每个人会有原创 2015-10-15 19:45:12 · 513 阅读 · 0 评论 -
Solve It(二分解方程)
Solve the equation: p ∗ e^−x + q ∗ sin(x) + r ∗ cos(x) + s ∗ tan(x) + t ∗ x^2 + u = 0 where 0 ≤ x ≤ 1. Input Input consists of multiple test cases and terminated by an EOF. Each test case consists原创 2015-10-22 00:13:12 · 1194 阅读 · 1 评论 -
Mushroom Scientists
As you very well know, the whole Universe traditionally uses three-dimensional Cartesian system of coordinates. In this system each point corresponds to three real coordinates (x, y, z). In this coordi原创 2015-08-27 11:56:01 · 445 阅读 · 0 评论 -
Plant
Dwarfs have planted a very interesting plant, which is a triangle directed “upwards”. This plant has an amusing feature. After one year a triangle plant directed “upwards” divides into four triangle pl原创 2015-08-27 11:50:11 · 621 阅读 · 0 评论 -
So Easy!
A sequence Sn is defined as:SnS_{n} = ⌈(a+b√)n⌉\lceil(a + \sqrt{b})^{n}\rceil%m Where a, b, n, m are positive integers.┌x┐is the ceil of x. For example, ┌3.14┐=4. You are to calculate Sn. You, a to原创 2016-04-13 11:37:28 · 543 阅读 · 0 评论