
数学题
lyhvoyage
不抛弃,不放弃!
展开
-
NYOJ 762 第k个互质数(二分 + 容斥)
第k个互质数时间限制:1000 ms | 内存限制:65535 KB难度:4描述两个数的a,b的gcd为1,即a,b互质,现在给你一个数m,你知道与它互质的第k个数是多少吗?与m互质的数按照升序排列。输入输入m ,k (1输出输出第k个数。样例输入10 110 210 3样例输出137首先,根据欧几里得可知,gcd原创 2014-11-12 17:24:58 · 1960 阅读 · 0 评论 -
NYOJ 928 小M的因子和(数论)
小M的因子和时间限制:1000 ms | 内存限制:65535 KB难度:2描述小M在上课时有些得意忘形,老师想出道题目难住他。小M听说是求因子和,还是非常得意,但是看完题目是求A的B次方的因子和,有些手足无措了,你能解决这个问题吗?输入有多组测试样例每行两个数 A ,B ,(1≤A,B≤10^9) 输出输出A的B次方的因子和,并对9901取余。样例输入2原创 2014-10-09 19:14:43 · 1660 阅读 · 0 评论 -
CodeForces 321A Ciel and Robot(数学模拟)
题目链接:http://codeforces.com/problemset/problem/321/A题意:在一个二维平面中,开始时在(0,0)点,目标点是(a,b),问能不能通过重复操作题目中的指令,从原点移动到目标点。分析:假设一次完成所有的命令后,移动到了(xx,yy),并且从(Xi,Yi)重复操作k次指令到达目标点,则可以列出方程 Xi + k * xx = a && Yi + k原创 2014-10-08 20:01:32 · 1380 阅读 · 0 评论 -
NYOJ 1076 方案数量(公式 或 递推)
方案数量时间限制:1000 ms | 内存限制:65535 KB难度:2描述给出一个N*M的棋盘,左下角坐标是(0,0),右上角坐标是(N,M),规定每次只能向上或者向右走,问从左下角走到右上角,一共有多少种方案。上图是一个4*3的棋盘。输入多组测试数据。每组输入两个整数N,M(0≤N,M≤30)。输入0,0时表示结束,不做任原创 2014-09-29 08:39:00 · 1477 阅读 · 0 评论 -
hdu 4937 Lucky Number(数学题 进制转换)2014多校训练第7场
Lucky Number Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Problem Description原创 2014-08-13 10:05:46 · 1859 阅读 · 0 评论 -
NYOJ 1066 CO-PRIME(数论)
CO-PRIME时间限制:1000 ms | 内存限制:65535 KB难度:3描述This problem is so easy! Can you solve it?You are given a sequence which contains n integers a1,a2……an, your task is to find how man原创 2014-08-09 17:04:22 · 1789 阅读 · 3 评论 -
hdu 4923 Room and Moor(数学题)2014多校训练第6场
Room and Moor Time Limit: 12000/6000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Problem Descriptio原创 2014-08-08 16:45:59 · 1303 阅读 · 0 评论 -
hdu 4960 Another OCD Patient(dp)2014多校训练第9场
Another OCD Patient Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Problem Descri原创 2014-08-20 16:34:40 · 1841 阅读 · 0 评论 -
CodeForce 424C Magic Formulas(数学题)
Magic Formulastime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPeople in the Tomskaya region like magic for原创 2014-07-21 10:17:17 · 1382 阅读 · 0 评论 -
UVA 10168 Summation of Four Primes(数论)
Summation of Four PrimesInput: standard inputOutput: standard outputTime Limit: 4 secondsEuler proved in one of his classic theorems that prime numbers are infinite in number. But can every nu原创 2014-07-17 18:10:49 · 1566 阅读 · 0 评论 -
UVA 10139 Factovisors(数论)
FactovisorsThe factorial function, n! is defined thus for n a non-negative integer: 0! = 1 n! = n * (n-1)! (n > 0)We say that a divides b if there exists an integer k such that k*a =原创 2014-07-17 17:45:14 · 1522 阅读 · 0 评论 -
zoj 3696 Alien's Organ(泊松分布)
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3696Alien's OrganTime Limit: 2 Seconds Memory Limit: 65536 KBThere's an alien whose name is Marjar. It is an univer原创 2014-11-17 09:07:54 · 1936 阅读 · 0 评论 -
ZOJ 3702 Gibonacci number(数学推导题)
Gibonacci numberTime Limit: 2 Seconds Memory Limit: 65536 KBIn mathematical terms, the normal sequence F(n) of Fibonacci numbers is defined by the recurrence relationF(n)=F(n-1)+F(n-2)原创 2014-11-16 20:27:46 · 1474 阅读 · 0 评论 -
UVA 10910 Marks Distribution(组合数学 或 递推)
Marks DistributionTime limit: 3.000 secondsIn an examination one student appeared in N subjects and has got total T marks. He has passed in all the Nsubjects where minimum mark for passing i原创 2014-10-13 18:34:38 · 1466 阅读 · 0 评论 -
CodeForce 236B Easy Number Challenge(筛法求素数 + 整数因式分解)
题目链接:http://codeforces.com/problemset/problem/236/BEasy Number Challengetime limit per test2 secondsmemory limit per test256 megabytesLet's denote d(n) as the number of divis原创 2016-04-05 19:27:00 · 981 阅读 · 0 评论 -
CodeForce 538C Tourist's Notes(贪心 + 数学)
C. Tourist's Notestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA tourist hiked along the mountain ran原创 2015-05-01 14:44:05 · 2461 阅读 · 0 评论 -
POJ 3808 Malfatti Circles(计算几何)
Malfatti CirclesTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 250 Accepted: 125 Special JudgeDescriptionThe configuration of three circles packed i原创 2015-05-01 20:33:37 · 1799 阅读 · 0 评论 -
HDU 5212 Code(容斥 或 莫比乌斯反演)
CodeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Problem DescriptionWLD likes playing with codes.One day he is writing a function.Howerver,his c原创 2015-04-27 09:49:25 · 2838 阅读 · 1 评论 -
CodeForce 534C Polycarpus' Dice (数学推理)
Polycarpus' Dicetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp has n dice d1, d2, ..., dn. The原创 2015-04-21 19:00:11 · 1432 阅读 · 0 评论 -
Bnuoj 4275 Your Ways(数学题 + 动态规划)
Your Ways You live in a small well-planned rectangular town in Phuket. The size of the central area of the town is H kilometers x W kilometers. The central area is divided into HW unit blocks, e原创 2015-04-19 19:37:52 · 1340 阅读 · 0 评论 -
CodeForce 534B Covered Path(简单推理)
Covered Pathtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe on-board computer on Polycarp's car measure原创 2015-04-19 09:26:52 · 1498 阅读 · 0 评论 -
UVA 10892 LCM Cardinality(数论 质因数分解)
LCM CardinalityInput: Standard InputOutput: Standard OutputTime Limit: 2 Seconds A pair of numbers has a unique LCM but a single number can be the LCM of more than one possible pairs. For ex原创 2014-10-17 14:21:44 · 1867 阅读 · 0 评论 -
poj 1730Perfect Pth Powers(分解质因数)
Perfect Pth PowersTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 16746 Accepted: 3799DescriptionWe say that x is a perfect square if, for some inte原创 2014-10-18 12:26:32 · 2262 阅读 · 0 评论 -
POJ 1061 青蛙的约会(扩展欧几里得)
青蛙的约会Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 91753 Accepted: 16849Description两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西原创 2014-10-17 19:18:47 · 2842 阅读 · 1 评论 -
POJ 1026 Cipher(置换)
CipherTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 19502 Accepted: 5239DescriptionBob and Alice started to use a brand-new encoding scheme.原创 2014-10-15 15:06:17 · 1940 阅读 · 0 评论 -
UVA 10042 Smith Numbers(数论)
Smith NumbersBackgroundWhile skimming his phone directory in 1982, Albert Wilansky, a mathematician of Lehigh University , noticed that the telephone number of his brother-in-law H. Smith had原创 2014-07-17 19:42:00 · 1883 阅读 · 0 评论 -
UVA 10198 Counting
CountingThe ProblemGustavo knows how to count, but he is now learning how write numbers. As he is a very good student, he already learned 1, 2, 3 and 4. But he didn't realize yet tha原创 2014-07-16 18:29:14 · 1222 阅读 · 0 评论 -
UVA 10006 - Carmichael Numbers 数论(快速幂取模 + 筛法求素数)
Carmichael Numbers An important topic nowadays in computer science is cryptography. Some people even think that cryptography is the only important field in computer science, and that life原创 2013-08-03 15:13:42 · 2964 阅读 · 0 评论 -
Codeforce 144B-Meeting 数学题
B. Meetingtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe Super Duper Secret Meeting of the Super Dupe原创 2013-07-13 17:27:30 · 1386 阅读 · 0 评论 -
hdu 1861-游船出租
游船出租 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem Description原创 2013-07-13 10:57:33 · 2650 阅读 · 0 评论 -
Codeforce 313C Ilya and Matrix
C. Ilya and Matrixtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIlya is a very good-natured lion. He lik原创 2013-06-01 17:02:14 · 1444 阅读 · 0 评论 -
NYOJ 179 LK's problem
LK's problem时间限制:3000 ms | 内存限制:65535 KB难度:1描述LK has a question.Coule you help her?It is the beginning of the day at a bank, and a crowd of clients is already waiting for the entran原创 2013-05-26 17:44:18 · 1391 阅读 · 0 评论 -
NYOJ 303 序号转换 数学题
序号互换时间限制:1000 ms | 内存限制:65535 KB难度:2描述Dr.Kong设计了一个聪明的机器人卡多,卡多会对电子表格中的单元格坐标快速计算出来。单元格的行坐标是由数字编号的数字序号,而列坐标使用字母序号。观察字母序号,发现第1列到第26列的字母序号分别为A,B,…,Z,接着,第27列序号为AA,第28列为AB,依此类推。若给Dr原创 2013-05-10 10:45:38 · 1151 阅读 · 0 评论 -
hdu 1722 Cake 数学题
Cake Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem Description一次生日Party可能有p人原创 2013-05-09 08:24:29 · 1420 阅读 · 0 评论 -
hdu 1339 A Simple Task 数学题
A Simple Task Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Problem DescriptionGiven a p原创 2013-05-22 11:04:03 · 1897 阅读 · 0 评论 -
hdu 1071 The area 数学题
The areaTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5917 Accepted Submission(s): 4130Problem DescriptionIgnatius bought a原创 2013-05-08 08:10:48 · 1021 阅读 · 0 评论 -
NYOJ 312 20岁生日
20岁生日时间限制:1000 ms | 内存限制:65535 KB难度:1描述路过这的20岁生日就要到了,他当然很开心,可是他突然想到一个问题,是不是每个人从出生开始,到达20岁生日时所经过的天数都是一样的呢?似乎并不全都是这样,所以他想请你帮忙计算一下他和他的几个朋友从出生到达20岁生日所经过的总天数,让他好来比较一下。输入一个数T,后面T行每行有原创 2013-05-18 15:34:07 · 1243 阅读 · 0 评论 -
hdu 2199 Can you solve this equation? 简单二分查找
Can you solve this equation? Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem原创 2013-04-28 11:43:37 · 1523 阅读 · 0 评论 -
UVA 10820 - Send a Table 数论 (欧拉函数)
Send a TableInput: Standard InputOutput: Standard Output When participating in programming contests, you sometimes face the following problem: You know how to calcutale the output for the give原创 2013-08-03 18:26:49 · 2142 阅读 · 0 评论 -
hdu 1042 N! 高精度运算
N! Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Problem DescriptionGive原创 2013-08-07 11:27:49 · 2029 阅读 · 0 评论